[Mlir-commits] [mlir] [mlir][xegpu] Add initial skeleton implementation for lowering ConvertLayoutOp (PR #146176)

Jianhui Li llvmlistbot at llvm.org
Mon Jul 21 08:46:35 PDT 2025


================
@@ -76,6 +76,30 @@ resolveUnrealizedConversionCastOp(UnrealizedConversionCastOp castOp) {
   }
 }
 
+// This pattern rewrites ConvertLayoutOp by removing the inst_data field
+// from the layout attributes. As the surrounding extract_strided_slice
+// and insert_strided_slice operations reconstruct the original value
----------------
Jianhui-Li wrote:

The explanation could leave to misundertanding as it states the Inst_data is dropped due to "surrounding operations" - but the code doesn't check "surrounding operations".
Consider this version:  
"The convertLayout is a no-op for different inst_data attributes since both the producer and consumer operations control the distribution based on their respective inst_data. Each operation is decomposed into smaller tiles that match the inst_data, while the input and output tile sizes remain the same as sg_data."

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


More information about the Mlir-commits mailing list