Skip to content

Commit

Permalink
remote CB operands from ttir.generic (#2376)
Browse files Browse the repository at this point in the history
### Ticket
Closes #1969

### Problem description
We are moving lowering of operands to CB slots to a lower section of the
d2m pipeline and hence decided to remove CB operand-related arguments
from ttir.generic op.

### What's changed
There are two main changes, the first is a generic tablegen cleanup
action and is somewhat independent of the second:

1. a new `getDpsOutputs()` helper method in
`ttmlir/Dialect/TTIR/IR/Utils.h` will auto-detect whether a concrete OP
has single or variadic outputs; using it in `extraClassDeclaration` of
selected base tablegen `class`es allows multiple such trivial/repeated
declarations to be removed from a number of TTIROps `def`s.
2. ttir.generic has lost CB operands/mapping attributes; the `enqueue
program` rewriter in `TTIRToTTMetal.cpp` pass that depends on that logic
has been removed for now

### Checklist
- [x] multiple existing tests had their operand_cb_mapping attributes
removed and `operandSegmentSizes` adjusted accordingly
  • Loading branch information
vroubtsovTT authored and vwellsTT committed Mar 6, 2025
1 parent 90775db commit 03cdb65
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 1,487 deletions.
1 change: 1 addition & 0 deletions include/ttmlir/Dialect/TTIR/IR/TTIROps.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "ttmlir/Dialect/TT/IR/TTOpsTypes.h"
#include "ttmlir/Dialect/TTIR/IR/TTIROpsInterfaces.h"
#include "ttmlir/Dialect/TTIR/IR/TTIRTraits.h"
#include "ttmlir/Dialect/TTIR/IR/Utils.h"

#include "mlir/Bytecode/BytecodeOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
Expand Down
Loading

0 comments on commit 03cdb65

Please sign in to comment.