[Mlir-commits] [mlir] [MLIR] Add `InParallelOpInterface` for parallel combining operations (PR #157736)
Alan Li
llvmlistbot at llvm.org
Wed Sep 10 08:02:46 PDT 2025
================
@@ -1911,8 +1917,9 @@ struct FoldTensorCastOfOutputIntoForallOp
auto terminator = newForallOp.getTerminator();
for (auto [yieldingOp, outputBlockArg] : llvm::zip(
terminator.getYieldingOps(), newForallOp.getRegionIterArgs())) {
- auto insertSliceOp = cast<tensor::ParallelInsertSliceOp>(yieldingOp);
- insertSliceOp.getDestMutable().assign(outputBlockArg);
+ auto insertSliceOp = dyn_cast<tensor::ParallelInsertSliceOp>(yieldingOp);
+ if (insertSliceOp)
+ insertSliceOp.getDestMutable().assign(outputBlockArg);
----------------
lialan wrote:
Should be applicable to all ops implementing the interface. Updated.
https://github.com/llvm/llvm-project/pull/157736
More information about the Mlir-commits
mailing list