Skip to content

[ttl] Annotate ops for FPU#247

Draft
brnorris03 wants to merge 5 commits intomainfrom
bnorris/annotate-fpu-ops
Draft

[ttl] Annotate ops for FPU#247
brnorris03 wants to merge 5 commits intomainfrom
bnorris/annotate-fpu-ops

Conversation

@brnorris03
Copy link
Contributor

@brnorris03 brnorris03 commented Jan 18, 2026

What?

Annotate the binary tile operations (add, sub, mul) that can use the FPU instead of SFPU.

Why?

FPU performance is much better (~2x) than SFPU for add, sub, mul.

How?

Binary operations are classified into three strategies based on operand provenance:

Strategy Condition Attribute Value TTKernel Lowering DST Behavior
FPU Both operands are block arguments (from CB) execution_target = "fpu" add_tiles(cb0, cb1, ...) No copy_tile for inputs
Dest-Reuse Exactly one operand is block argument execution_target = "dest_reuse" binary_dest_reuse_tiles(cb, ...) copy_tile only for CB operand
SFPU Neither operand is block argument (both DST) execution_target = "sfpu" or no attribute add_binary_tile(dst0, dst1, ...) copy_tile for both inputs

How to Test?

New MLIR test: test/ttlang/Conversion/TTLToCompute/test_annotate_binary_strategy.mlir

Future

  • Add lowering (waiting for ttkernel support of necessary ops to be merged, open tt-mlir pr)

Checklist:

  • Self-reviewed (style, logic)
  • Added tests (or justified none needed)
  • PR is small and focused (one task)

@brnorris03 brnorris03 force-pushed the bnorris/annotate-fpu-ops branch from 9076f6d to c1edbd0 Compare January 18, 2026 05:47
@brnorris03 brnorris03 force-pushed the bnorris/annotate-fpu-ops branch from c1edbd0 to 47a6f48 Compare January 18, 2026 05:47
@brnorris03 brnorris03 force-pushed the bnorris/annotate-fpu-ops branch from 7f08b2e to 97df6d7 Compare January 18, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant