[Mlir-commits] [mlir] [mlir][XeGPU] Add optional layout attribute to LoadGather StoreScatter ops (PR #163414)

Dmitry Chigarev llvmlistbot at llvm.org
Mon Nov 3 06:38:04 PST 2025


================
@@ -171,6 +186,13 @@ xegpu::getDistributeLayoutAttr(const OpOperand &opr) {
   std::string layoutName = xegpu::getLayoutName(opr);
   if (op->hasAttr(layoutName))
     return op->getAttrOfType<xegpu::DistributeLayoutAttr>(layoutName);
+
+  // check for "permament" layout only after "temporary" layout name lookup
+  // for backward compatibility
+  if (auto storeScatterOp = dyn_cast<xegpu::StoreScatterOp>(op))
----------------
dchigarev wrote:

> not sure why there is only storescatter, no loadgather? Note that there are both load_matrix and store_matrix.

this function handles `OpOperands` and the permament layout attr for the load-op describes `OpResult`, so no reason to access the layout here

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


More information about the Mlir-commits mailing list