[Mlir-commits] [mlir] [MLIR][XeGPU] Extend propagation and sg_to_lane distribution pass support broadcast with low rank and scalar source input (PR #170409)

Charitha Saumya llvmlistbot at llvm.org
Sun Dec 7 21:29:35 PST 2025


================
@@ -1424,6 +1428,145 @@ struct VectorMultiReductionDistribution : public gpu::WarpDistributionPattern {
   }
 };
 
+/// This pattern distributes the `vector.broadcast` operation across lanes in a
+/// warp. The pattern supports three use cases:
+///
+/// 1) Broadcast a low-rank vector to high-rank vector: The low-rank input
+/// vector
+///    must have a slice layout of the result. If the distributed source and
+///    target vector types are identical, this lowers to a no-op; otherwise, it
+///    remains a broadcast but operates on distributed vectors.
+///
+/// 2) Broadcast a same-rank vector with identical layouts for source and
+/// target:
+///    The source vector must have unit dimensions, and lane_layout must be unit
----------------
charithaintc wrote:

this is special case. if the dim is 1 it is assumed to be shared among all lanes. because there is not other valid explanation. this is trivially true. 

Also as I commented above we should **not call** `getDistVecTypeBasedOnLaneLayout` on such vectors. It is pattern's responsibility to check this (for not broadcast is the only case). 

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


More information about the Mlir-commits mailing list