[Mlir-commits] [mlir] [MLIR][XeGPU] Switch to the new sg to wi pass (PR #188627)
Charitha Saumya
llvmlistbot at llvm.org
Tue Mar 31 09:02:27 PDT 2026
================
@@ -1519,9 +1520,15 @@ struct XeGPUSgToWiDistributeExperimentalPass
void XeGPUSgToWiDistributeExperimentalPass::runOnOperation() {
+ // Recover temporary operand layouts for usage in patterns.
+ Operation *root = getOperation();
+ if (!xegpu::recoverTemporaryLayouts(root)) {
----------------
charithaintc wrote:
ok. but this can be done using `getDistributedLayout(Value)` version. We use this function anyway. This is unavoidable for type conversion since we have access to values not operands. And conversion pattern driver calls the type converter basically everywhere.
Personally I think operand layouts should be avoided since they bloat the IR and make it harder to read for larger kernels. Also I don't think its that expensive to lookup. in worst case we will have max of 2 levels of nesting in loops but that type of lookup is rare.
https://github.com/llvm/llvm-project/pull/188627
More information about the Mlir-commits
mailing list