[Mlir-commits] [mlir] [MLIR][XeGPU] Support partial subgroup lane distribution (PR #201667)

Artem Kroviakov llvmlistbot at llvm.org
Mon Jun 8 05:05:55 PDT 2026


================
@@ -729,11 +729,23 @@ bool LayoutAttr::isCompatibleWith(const xegpu::DistributeLayoutAttr &other,
       if (getEffectiveSgLayoutAsInt() == other.getEffectiveSgLayoutAsInt() &&
           getEffectiveSgDataAsInt() == other.getEffectiveSgDataAsInt())
         return true;
-    if (level == xegpu::LayoutKind::Lane)
-      if (getEffectiveLaneLayoutAsInt() ==
-              other.getEffectiveLaneLayoutAsInt() &&
-          getEffectiveLaneDataAsInt() == other.getEffectiveLaneDataAsInt())
-        return true;
+    if (level == xegpu::LayoutKind::Lane) {
+      auto laneLayout = getEffectiveLaneLayoutAsInt();
+      auto otherLaneLayout = other.getEffectiveLaneLayoutAsInt();
+      auto laneData = getEffectiveLaneDataAsInt();
+      auto otherLaneData = other.getEffectiveLaneDataAsInt();
+      if (laneLayout == otherLaneLayout) {
+        return laneData == otherLaneData;
+      } else if (laneData == otherLaneData) {
+        if (laneLayout.size() == 2 && otherLaneLayout.size() == 2) {
+          // Target LaneLayout may be a fraction of this along distibuted dim
----------------
akroviakov wrote:

Does this check assume only one distributed dim?

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


More information about the Mlir-commits mailing list