[llvm] [mlir] [MLIR] Add `InParallelOpInterface` for parallel combining operations (PR #157736)

Han-Chung Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 12 13:41:27 PDT 2025


================
@@ -2018,12 +2023,15 @@ OpResult InParallelOp::getParentResult(int64_t idx) {
 }
 
 SmallVector<BlockArgument> InParallelOp::getDests() {
-  return llvm::to_vector<4>(
-      llvm::map_range(getYieldingOps(), [](Operation &op) {
-        // Add new ops here as needed.
-        auto insertSliceOp = cast<tensor::ParallelInsertSliceOp>(&op);
-        return llvm::cast<BlockArgument>(insertSliceOp.getDest());
-      }));
+  SmallVector<BlockArgument> updatedDests;
+  for (Operation &yieldingOp : getYieldingOps()) {
+    auto inParallelOp = dyn_cast<ParallelCombiningOpInterface>(&yieldingOp);
----------------
hanhanW wrote:

ditto

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


More information about the llvm-commits mailing list