[Mlir-commits] [mlir] [mlir][tensor] Fix FoldTensorCastProducerOp for multiple result operations (PR #93374)
Han-Chung Wang
llvmlistbot at llvm.org
Thu Jun 6 12:01:11 PDT 2024
================
@@ -4531,17 +4531,18 @@ 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());
+ // Assumes that the result has dpsInits followed by nonDpsInits.
----------------
hanhanW wrote:
I had a chat with Prashant offline, and we found that it is actually not documented in DPS interface. However, all the implementation has the assumption. So we ended up with having a comment here.
https://github.com/llvm/llvm-project/pull/93374
More information about the Mlir-commits
mailing list