If at least one source dimension has a static zero dimension, rewrite the PadTensorOp into a tensor::GenerateOp.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Added a few ppl from the discussion at https://llvm.discourse.group/t/what-is-the-semantics-of-memref-0xf32-and-tensor-0xf32/3557 for better visibility.
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp | ||
---|---|---|
1187–1189 | Can we inline the original region instead of cloning it? I think you should be able to do something like: |
Comment Actions
Thanks for the review.
After talking with Nicolas, we decided to not generate tensors with 0 dims in the first place. Abandoning this commit.
Can we inline the original region instead of cloning it?
I think you should be able to do something like:
rewriter.inlineRegionBefore(padOp.region(), generateOp.getRegion(), generateOp.getRegion().begin());