[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


================
@@ -80,7 +80,8 @@ static constexpr unsigned highPatternBenefit = 2;
 /// | 2x32x16               | [1, 16]     | 2x32x1                   |
 static FailureOr<VectorType>
 getDistVecTypeBasedOnLaneLayout(xegpu::DistributeLayoutAttr layout,
-                                VectorType originalType) {
+                                VectorType originalType,
+                                bool allowUnitDim = false) {
----------------
charithaintc wrote:

I would try to avoid this type of flag passing. It makes it very hard to understand what this helper is doing.

In this case, if them dim == 1 we should not call this function at all for broadcast case (this is a special case for broadcast). changing this function to allow only 1 corner case is not worth it. 

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


More information about the Mlir-commits mailing list