[Mlir-commits] [mlir] [MLIR][XeGPU] Improve multi-reduction layout inference (PR #224618)
Jianhui Li
llvmlistbot at llvm.org
Tue Sep 22 09:46:17 PDT 2026
================
@@ -2493,13 +2458,39 @@ xegpu::SliceAttr xegpu::setupMultiReductionResultLayout(
"source shape not divisible by sg_layout");
sgData[i] = srcShape[i] / sgLayout[i];
remainingSgCount /= sgLayout[i];
- order[i] = remainOrder++;
}
}
- DenseI32ArrayAttr resOrderAttr = DenseI32ArrayAttr::get(
- context, SmallVector<int32_t>(order.begin(), order.end()));
- if (!orderAttr || orderAttr.empty())
- resOrderAttr = nullptr;
+
+ DenseI32ArrayAttr resOrderAttr = nullptr;
----------------
Jianhui-Li wrote:
nit: please add a comment here to describe the logic below is to set orderAttr so that reductionDims are in row-major contiguous with its left-hand neighbor
https://github.com/llvm/llvm-project/pull/224618
More information about the Mlir-commits
mailing list