[Mlir-commits] [mlir] [MLIR][XeGPU] Add sg layout propagation (PR #170879)

Adam Siemieniuk llvmlistbot at llvm.org
Wed Dec 10 10:09:28 PST 2025


================
@@ -487,10 +531,63 @@ bool LayoutInfoPropagation::hasParamsOfLayoutKind(
   } else if (layoutKind == LayoutKind::Lane) {
     return !(anchorLayout.getEffectiveLaneLayoutAsInt().empty() ||
              anchorLayout.getEffectiveLaneDataAsInt().empty());
+  } else if (layoutKind == LayoutKind::Subgroup) {
+    return !(anchorLayout.getEffectiveSgLayoutAsInt().empty() ||
+             anchorLayout.getEffectiveSgDataAsInt().empty());
   }
   return false;
 }
 
+FailureOr<std::pair<SmallVector<int>, SmallVector<int>>>
+chooseLayout(llvm::ArrayRef<int64_t> big, llvm::ArrayRef<int> small,
+             const int64_t count) {
+  const int64_t n = big.size();
+  assert(n == small.size());
----------------
adam-smnk wrote:

nit: add msg to the assert for easier debugging

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


More information about the Mlir-commits mailing list