[PATCH] D78996: [MLIR][LINALG] Convert Linalg to Linalg
Alex Zinenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 09:06:16 PDT 2020
ftynse added inline comments.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp:77
+ auto type = result.getType().cast<ShapedType>();
+ entryBlock.addArgument(type.getElementType());
+ }
----------------
ftynse wrote:
> .addArgument (and any inplace modification) is not allowed in a conversion pattern because it's not undoable. You'll have to create a new block with `rewriter.createBlock` and move/clone the operations from the existing block.
I filed a feature request to make this easier, PR45738. But this needs to be correct in the meantime.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78996/new/
https://reviews.llvm.org/D78996
More information about the llvm-commits
mailing list