[Mlir-commits] [mlir] [MLIR][XeGPU]Enhance Pack/Unpack for XeGPUUnroll (PR #163459)
Jianhui Li
llvmlistbot at llvm.org
Wed Oct 15 10:07:12 PDT 2025
================
@@ -145,8 +145,13 @@ XeGPUBlockingPass::getTileShape(const T &operandOrResult) const {
xegpu::DistributeLayoutAttr layout =
xegpu::getDistributeLayoutAttr(operandOrResult);
if (layout && layout.isForSubgroup()) {
- if (!layout.getEffectiveInstDataAsInt().empty())
- return layout.getEffectiveInstDataAsInt();
+ if (!layout.getEffectiveInstDataAsInt().empty()) {
+ SmallVector<int64_t> instData = layout.getEffectiveInstDataAsInt();
+ // Remove all leading unit dimensions from inst_data
+ while (!instData.empty() && instData.front() == 1)
----------------
Jianhui-Li wrote:
It doesn't work for all xegpu operations. Say load_nd would need 2 dim inst_data since its output is 2d. Should this logic happen per operation after they getTileShape?
https://github.com/llvm/llvm-project/pull/163459
More information about the Mlir-commits
mailing list