Instead of folding the transpose into the linalg.generic keep the
transposition in the packing operation, effectively making the
linalg.generic transparent to the propagation. Additionally, if the init
operand of the generic has users pack the init and pass it as the
operand to the generic.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LG, thanks!
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp | ||
---|---|---|
108–111 | We can rewrite it with for (unsigned [pos, expr] : llvm::enumerate(exprs) { unsigned posInDomain = expr.cast<....>().... } This fits more about LLVM style, and explicitly tell us that the pos is iterating on exprs. | |
280 | Can this be genericOp.getRegionOutputArgs()[0].use_empty()? please also move it to the line right before the usage. (btw, I think we don't need to declare a variable for it) |
We can rewrite it with
This fits more about LLVM style, and explicitly tell us that the pos is iterating on exprs.