[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:26 PDT 2025


================
@@ -1971,19 +1973,22 @@ LogicalResult InParallelOp::verify() {
   if (!forallOp)
     return this->emitOpError("expected forall op parent");
 
-  // TODO: InParallelOpInterface.
   for (Operation &op : getRegion().front().getOperations()) {
-    if (!isa<tensor::ParallelInsertSliceOp>(op)) {
-      return this->emitOpError("expected only ")
-             << tensor::ParallelInsertSliceOp::getOperationName() << " ops";
+    auto inParallelOp = dyn_cast<ParallelCombiningOpInterface>(&op);
+    if (!inParallelOp) {
+      return this->emitOpError("expected only ParallelCombiningOpInterface")
+             << " ops";
     }
----------------
hanhanW wrote:

ditto: should we rename it to `parallelOp` or `parallelCombiningOp`?

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


More information about the llvm-commits mailing list