[Mlir-commits] [mlir] [mlir][tensor] Fix FoldTensorCastProducerOp for multiple result operations (PR #93374)

Prashant Kumar llvmlistbot at llvm.org
Thu Jun 6 10:12:35 PDT 2024


================
@@ -4531,17 +4531,17 @@ struct FoldTensorCastProducerOp
     if (!hasTensorCastOperand)
       return failure();
 
-    SmallVector<Type, 4> newResultTypes;
-    newResultTypes.reserve(op->getNumResults());
+    SmallVector<Type, 4> newResultTypes(op->getResultTypes());
     SmallVector<Value, 4> newOperands;
     newOperands.reserve(op->getNumOperands());
+    int64_t dpsInitIdx = 0;
     for (OpOperand &opOperand : op->getOpOperands()) {
----------------
pashu123 wrote:

@MaheshRavishankar I think the issue is that there are some operands that are not presented in the DPS interface.
E.g., the pack op has padding_value, but it is neither Inputs nor Inits. Thanks @hanhanW for the quick debug.

https://github.com/llvm/llvm-project/pull/93374


More information about the Mlir-commits mailing list