[Mlir-commits] [mlir] [MLIR][XeGPU] Add Layout Propagation support for multi-reduction/reduction op with scalar result (PR #189133)
Jianhui Li
llvmlistbot at llvm.org
Wed Apr 1 11:01:58 PDT 2026
================
@@ -1294,6 +1349,21 @@ LogicalResult ResolveLayoutConflicts::run() {
// Scan all operations in the parent op and resolve layout conflicts at
// tensor descriptor and vector use points.
auto r = parentOp->walk([&](Operation *op) -> WalkResult {
+ // if the operation inputs vector and output scalar, like multi-reduction we
+ // need to check if the result has layout and add a convert_layout to serve
+ // as anchor op for the reduction op's layout.
----------------
Jianhui-Li wrote:
The main reason is that the propagation doesn't support scalar so we can't get consumer layout for reduction scalar result: The vector result layout can recovered from neighbour anchor layout, but scalar can't.
https://github.com/llvm/llvm-project/pull/189133
More information about the Mlir-commits
mailing list