[Mlir-commits] [mlir] [MLIR][XeGPU] Add 2D `vector.multi_reduction` optimization (PR #171154)
Jianhui Li
llvmlistbot at llvm.org
Wed Dec 17 11:59:17 PST 2025
================
@@ -472,6 +562,17 @@ struct XeGPUOptimizeBlockLoadsPass final
auto laneData = layout.getEffectiveLaneDataAsInt();
return !canBeOptimizedForTranspose(laneLayout, laneData);
});
+
+ target.addDynamicallyLegalOp<vector::MultiDimReductionOp>(
+ [=](Operation *op) -> bool {
+ auto layout = xegpu::getDistributeLayoutAttr(op->getResult(0));
+ if (!layout || !layout.isForSubgroup())
----------------
Jianhui-Li wrote:
what is the scenario that multiReduction doesn't have layout at the sg level?
https://github.com/llvm/llvm-project/pull/171154
More information about the Mlir-commits
mailing list