[Mlir-commits] [mlir] [MLIR][Tensor] Fix out-of-bounds FoldEmptyTensorWithDimOp crash #111270 (PR #112196)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Oct 16 22:59:25 PDT 2024
================
@@ -979,7 +979,9 @@ struct FoldEmptyTensorWithDimOp : public OpRewritePattern<DimOp> {
auto emptyTensorOp = dimOp.getSource().getDefiningOp<EmptyOp>();
if (!emptyTensorOp || !maybeConstantIndex)
return failure();
- if (!emptyTensorOp.getType().isDynamicDim(*maybeConstantIndex))
+ auto emptyTensorType = emptyTensorOp.getType();
----------------
brod4910 wrote:
Thank you both for the fruitful and insightful discussion, I've learned a ton from your conversation.
Judging from @MaheshRavishankar comments, there might be other places where non-local properties are being used to verify valid IR?
If that is the case, is this something that should be changed to uphold the non-localness principle? Do you have any examples of when this happens that should be changed? I'm happy to take on the task.
https://github.com/llvm/llvm-project/pull/112196
More information about the Mlir-commits
mailing list