[Mlir-commits] [mlir] [MLIR][XeGPU] Enable WG-level mxfp GEMM via generalized shape_cast collapse inference (PR #201496)

Charitha Saumya llvmlistbot at llvm.org
Tue Jun 9 00:16:43 PDT 2026


================
@@ -504,19 +504,26 @@ DistributeLayoutAttr LayoutAttr::dropDims(SmallVector<int64_t> dimGroup) {
     }
   }
 
+  // Only emit a new order attribute when the input had one, so that "no
+  // order" inputs do not gain a synthetic default that would later trip
+  // adjacency checks in collapseDims.
   SmallVector<int64_t> newOrder;
-  for (int64_t d : origOrder) {
-    if (llvm::is_contained(dimGroup, d))
-      continue;
-    int64_t offset = llvm::count_if(dimGroup, [&](int64_t s) { return s < d; });
-    newOrder.push_back(d - offset);
+  if (origOrderAttr && !origOrderAttr.empty()) {
----------------
charithaintc wrote:

why is this needed? Why is does not work if you keep getEffectiveOrderAsInt(). We should avoid using getOrder because user sometimes omit the order attribute. getEffectiveOrderAsInt always gives the "intended" order by the user. 

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


More information about the Mlir-commits mailing list