[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


================
@@ -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.
----------------
akroviakov wrote:

Why is adding `convert_layout` needed to serve as an anchor op for _scalars_? 
Can a reduction result layout for scalars disappear in cases where vector result layouts persist?

https://github.com/llvm/llvm-project/pull/189133


More information about the Mlir-commits mailing list