[Mlir-commits] [mlir] [MLIR][XeGPU] Disable block count usage in layout propagation (PR #168504)
Artem Kroviakov
llvmlistbot at llvm.org
Tue Nov 18 00:54:50 PST 2025
https://github.com/akroviakov created https://github.com/llvm/llvm-project/pull/168504
This small PR disables block count usage in the xegpu layout propagation.
Block count allows for handling larger instruction sizes. It comes as a separate operand in the xevm operation and implies a certain semantics for the loaded vectors. Currently, the xegpu infra is not fully ready for it.
- The lowering to xevm does not have a way to safely retrieve it yet (tensor desc is not modified by the propagation).
- The transforms also need to be aware of the block count semantics.
For now, the block count decision appears to be better suited for some subsequent optimization pass that might fuse loads, rather than the default setting right away. Therefore, to keep the pipeline functional, the block count is no longer considered when setting `inst_data`.
>From 3358a59c590cb712cfe46edf1e62ab7dcbcee6b0 Mon Sep 17 00:00:00 2001
From: Artem Kroviakov <artem.kroviakov at intel.com>
Date: Tue, 18 Nov 2025 08:43:56 +0000
Subject: [PATCH] [MLIR][XeGPU] Disable block count usage in layout propagation
---
mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp b/mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
index b3a780abd3f12..6b3ba5a5981ce 100644
--- a/mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
+++ b/mlir/lib/Dialect/XeGPU/Transforms/XeGPUPropagateLayout.cpp
@@ -495,8 +495,7 @@ void LayoutInfoPropagation::visitPrefetchNdOp(
auto [bWidth, bHeight, bCount] = blockWHC.value();
SmallVector<int> instData;
int instWidth = xegpu::getLargestDivisor(
- static_cast<int>(tdescTy.getDimSize(tdescTy.getRank() - 1)), bWidth,
- bCount);
+ static_cast<int>(tdescTy.getDimSize(tdescTy.getRank() - 1)), bWidth);
if (instWidth == -1)
prefetch.emitWarning(
"No suitable instruction multiple found for the given shape.");
@@ -702,8 +701,7 @@ void LayoutInfoPropagation::visitStoreNdOp(
auto [bWidth, bHeight, bCount] = blockWHC.value();
SmallVector<int> instData;
int instWidth = xegpu::getLargestDivisor(
- static_cast<int>(dataTy.getDimSize(dataTy.getRank() - 1)), bWidth,
- bCount);
+ static_cast<int>(dataTy.getDimSize(dataTy.getRank() - 1)), bWidth);
if (instWidth == -1)
store.emitWarning(
"No suitable instruction multiple found for the given shape.");
More information about the Mlir-commits
mailing list