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

Quinn Dawkins llvmlistbot at llvm.org
Wed Sep 10 07:12:05 PDT 2025


================
@@ -680,8 +680,11 @@ void mlir::scf::promote(RewriterBase &rewriter, scf::ForallOp forallOp) {
   SmallVector<Value> results;
   results.reserve(forallOp.getResults().size());
   for (auto &yieldingOp : terminator.getYieldingOps()) {
+    // Skip non-ParallelInsertSliceOp operations
     auto parallelInsertSliceOp =
-        cast<tensor::ParallelInsertSliceOp>(yieldingOp);
+        dyn_cast<tensor::ParallelInsertSliceOp>(yieldingOp);
----------------
qedawkins wrote:

> Can we make this all work with the interface?

Yeah a pair of `serializable` + `serialize` methods can work. Being able to drop the dep is one of the main benefits of the interface.

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


More information about the Mlir-commits mailing list