[Mlir-commits] [clang-tools-extra] [mlir] [MLIR][XeGPU] Refactor Layout access interface (PR #172125)
Jianhui Li
llvmlistbot at llvm.org
Tue Dec 16 11:50:53 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");
----------------
Jianhui-Li wrote:
Thanks for the idea. Adding an interface requires adding extra code to XeGPUOps.td for each anchor op. So At this point, I think it does not worth it.
https://github.com/llvm/llvm-project/pull/172125
More information about the Mlir-commits
mailing list