Replace the uses of deprecated Structured Op Interface methods in FusionOnTensors.cpp. This patch is based on https://reviews.llvm.org/D103394.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp | ||
---|---|---|
252 | @mravishankar shouldn't we use the indexing map of the consumer op operands used for fusion here as well as for the inputs? |
Overall looks ok to me. One comment in response to the question below.
Another minor nit: Why change signature from OpOperand & to OpOperand *. I prefer the former to the latter.
mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp | ||
---|---|---|
102 | If you are using OpOperand you dont need to send the consumer, consumerIdx or producer. You should be able to get the consumer with getOwner(), consumerIdx with getOperandNumber() and producer with get().getDefiningOp() | |
252 | (things have changed here, so my recollection of this is based on what I originally wrote)
So answer to your specific question might be, drop this if cause it shouldnt exist. I think the similar logic above should be fine. |
Had offline chat about resolving issues.
- Dropping the fusion at init_tensor will be done as a follow up.
- Use of pointer is the convention.
LGTM!
If you are using OpOperand you dont need to send the consumer, consumerIdx or producer. You should be able to get the consumer with getOwner(), consumerIdx with getOperandNumber() and producer with get().getDefiningOp()