[Mlir-commits] [mlir] [MLIR][Vector] Add warp distribution for `scf.if` (PR #157119)

Artem Kroviakov llvmlistbot at llvm.org
Wed Sep 10 01:19:14 PDT 2025


================
@@ -371,6 +371,36 @@ static VectorType getDistributedType(VectorType originalType, AffineMap map,
   return targetType;
 }
 
+/// Given a warpOp that contains ops with regions, the corresponding op's
+/// "inner" region and the distributionMapFn, get all values used by the op's
+/// region that are defined within the warpOp. Return the set of values, their
+/// types and their distributed types.
+std::tuple<llvm::SmallSetVector<Value, 32>, SmallVector<Type>,
+           SmallVector<Type>>
+getInnerRegionEscapingValues(WarpExecuteOnLane0Op warpOp, Region &innerRegion,
----------------
akroviakov wrote:

Right, sorry, I rolled back the entire `scf.for` distribution after unsuccessful `encloseRegionInWarpOp` experimenting and missed it. 
Added `getInnerRegionEscapingValues` to `scf.for` distribution.

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


More information about the Mlir-commits mailing list