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

Artem Kroviakov llvmlistbot at llvm.org
Wed Dec 10 09:33:12 PST 2025


================
@@ -538,6 +538,56 @@ bool LayoutInfoPropagation::hasParamsOfLayoutKind(
   return false;
 }
 
+FailureOr<std::pair<SmallVector<int>, SmallVector<int>>>
+chooseLayout(llvm::ArrayRef<int64_t> big, llvm::ArrayRef<int> small,
----------------
akroviakov wrote:

>  just look at the num_sg and tile dimension

>  if we get 32 number of sg, then it simply returns 4x8

But you did not consider the tile dimension you suggested.

Do we pick the least different factors of num_sg and additionally adjust if the layout*inst_data is over the tensor size in some dimension?

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


More information about the Mlir-commits mailing list