[Mlir-commits] [mlir] [mlir][bufferization] implement BufferizableOpInterface for concat op (PR #140171)
Jeremy Kun
llvmlistbot at llvm.org
Fri May 16 13:03:47 PDT 2025
j2kun wrote:
Turns out this was a bug in my code, and I added another test where the dimension not being concatenated along is dynamic to exercise the fix.
```patch
@@ -1110,7 +1110,7 @@ struct ConcatOpInterface
for (const auto &[dimIdx, dimSize] :
llvm::enumerate(tensorType.getShape())) {
if (dimSize == ShapedType::kDynamic) {
- auto dimOp = rewriter.create<memref::DimOp>(loc, dstBuffer, dimSize);
+ auto dimOp = rewriter.create<memref::DimOp>(loc, dstBuffer, dimIdx);
sizes.push_back(dimOp.getResult());
if (dimIdx == concatDim)
dynamicConcatDim = true;
```
https://github.com/llvm/llvm-project/pull/140171
More information about the Mlir-commits
mailing list