[Mlir-commits] [mlir] [mlir][memref.expand_shape] Add verifier check to ensure correct output_shape is provided by user (PR #91245)
Prathamesh Tagore
llvmlistbot at llvm.org
Mon May 6 21:17:07 PDT 2024
================
@@ -2353,6 +2353,16 @@ LogicalResult ExpandShapeOp::verify() {
<< " dynamic dims while output_shape has " << getOutputShape().size()
<< " values";
+ // Verify if provided output shapes are in agreement with output type.
+ DenseI64ArrayAttr staticOutputShapes = getStaticOutputShapeAttr();
+ ArrayRef<int64_t> resShape = getResult().getType().getShape();
----------------
meshtag wrote:
That is already checked[ here](https://github.com/llvm/llvm-project/blob/02ce8227ac28e0b83cf780716ae8f912d076eebe/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp#L2342).
https://github.com/llvm/llvm-project/pull/91245
More information about the Mlir-commits
mailing list