[Mlir-commits] [mlir] [mlir][xegpu] Block a convert_layout at a tile both layouts accept (PR #227892)
Jianhui Li
llvmlistbot at llvm.org
Thu Oct 1 12:45:56 PDT 2026
================
@@ -112,11 +112,12 @@ XeGPUBlockingPass::getTileShape(Operation *op) const {
convertLayoutOp.getEffectiveInputLayout().getEffectiveInstDataAsInt();
auto targetInstData =
convertLayoutOp.getTargetLayout().getEffectiveInstDataAsInt();
- // return the one with larger size
- if (computeProduct(inputInstData) >= computeProduct(targetInstData))
- return inputInstData;
- else
- return targetInstData;
+ assert(inputInstData.size() == targetInstData.size() &&
+ "convert_layout layouts must both carry inst_data of the same rank");
+ SmallVector<int64_t> tile(inputInstData.size());
+ for (size_t i = 0; i < tile.size(); ++i)
+ tile[i] = std::max(inputInstData[i], targetInstData[i]);
----------------
Jianhui-Li wrote:
Note that the inst_data picked is only feed to convert_layout. For convert_layout op, it has to conduct on a new data tile, even if it is bigger than other uArch sizes,or else the layout lost the meaning.
https://github.com/llvm/llvm-project/pull/227892
More information about the Mlir-commits
mailing list