[Mlir-commits] [mlir] [MLIR][XeGPU] Add Layout Propagation support for multi-reduction/reduction op with scalar result (PR #189133)
Artem Kroviakov
llvmlistbot at llvm.org
Wed Apr 1 02:55:56 PDT 2026
================
@@ -652,13 +686,14 @@ xegpu::DistributeLayoutAttr xegpu::setupInsertStridedSliceResultLayout(
}
} else if (layoutKind == xegpu::LayoutKind::Lane) {
for (int dim = 0; dim < srcRank; dim++) {
- assert(srcShape[dim] % consumerLaneLayout[dim] == 0 &&
- "srcShape must be divisible by laneLayout for all dimensions");
- laneDataValue = std::min(srcShape[dim] / consumerLaneLayout[dim],
- consumerLaneData[dim]);
-
- requiredResLayout =
- requiredResLayout.setDimData(dim, -1, -1, laneDataValue);
+ if (consumerLaneData[dim] != srcShape[dim]) {
----------------
akroviakov wrote:
Why is this check needed here, but not for the `layoutKind == xegpu::LayoutKind::InstData` case above?
https://github.com/llvm/llvm-project/pull/189133
More information about the Mlir-commits
mailing list