[Mlir-commits] [mlir] [mlir][XeGPU][VectorToXeGPU] Propagate vector layouts to xegpu ops (PR #163071)

Dmitry Chigarev llvmlistbot at llvm.org
Thu Oct 23 11:48:59 PDT 2025


================
@@ -374,22 +388,30 @@ static Value computeOffsets(PatternRewriter &rewriter, OpType gatScatOp,
         arith::AddIOp::create(rewriter, loc, baseOffset, offsetContrib);
   }
   Value indices = gatScatOp.getIndices();
+  // Extract indices layout and propagate it to all 'vector' ops created here
+  auto indicesLayout = mlir::xegpu::getDistributeLayoutAttr(indices);
   VectorType vecType = cast<VectorType>(indices.getType());
----------------
dchigarev wrote:

> Did I answer your question?

yes, thank you, just making sure that we're aware of that after merging just <i>this</i> PR we won't fully cover the vector-op layouts propagation, since arith.broadcast/mul/etc would have default layouts, and not the user-set-layouts from the lowered op (so the fuser team won't be satisfied). 

Does it make sense leave this temporary logic that manually sets vector-op layouts to all the ops generated by `vector-to-xegpu` pass (without relying on the propagate-layout pass), or we should avoid this logic and start working on the changes in the propagate-layout pass right away?

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


More information about the Mlir-commits mailing list