[Mlir-commits] [clang-tools-extra] [mlir] [MLIR][XeGPU] Refactor Layout access interface (PR #172125)
Tuomas Kärnä
llvmlistbot at llvm.org
Mon Dec 15 07:08:36 PST 2025
================
@@ -285,6 +397,14 @@ void xegpu::removeLayoutAttrs(Operation *op) {
removeLayoutAttr(opr);
for (OpResult result : nestOp->getOpResults())
removeLayoutAttr(result);
+ if (op->hasAttrOfType<DistributeLayoutAttr>("layout"))
+ op->removeAttr("layout");
+ if (op->hasAttrOfType<DistributeLayoutAttr>("layout_a"))
+ op->removeAttr("layout_a");
+ if (op->hasAttrOfType<DistributeLayoutAttr>("layout_b"))
+ op->removeAttr("layout_b");
+ if (op->hasAttrOfType<DistributeLayoutAttr>("layout_cd"))
+ op->removeAttr("layout_cd");
----------------
tkarna wrote:
nit: I wonder if this could be part of the AnchorLayoutInterface, e.g. removeAnchorLayout(), so that we would not need to replicate op specific attr names here.
https://github.com/llvm/llvm-project/pull/172125
More information about the Mlir-commits
mailing list