[Mlir-commits] [mlir] [MLIR][XeGPU] Recover temporary layout from Anchor Layout (PR #191947)

Jianhui Li llvmlistbot at llvm.org
Mon Apr 20 11:47:18 PDT 2026


================
@@ -585,6 +635,11 @@ gpu.func @constant_mask_2d() {
   %mask = vector.constant_mask [2, 3]
     {layout_result_0 = #xegpu.layout<lane_layout = [8, 2], lane_data = [1, 1]>}
     : vector<8x4xi1>
+      %mask_cl = xegpu.convert_layout %mask
+        <{
+          input_layout = #xegpu.layout<lane_layout = [8, 2], lane_data = [1, 1]>,
+          target_layout = #xegpu.layout<lane_layout = [8, 2], lane_data = [1, 1]>
+        }> : vector<8x4xi1>
----------------
Jianhui-Li wrote:

The convert_layout is the proper way to fix the original test so they contains an anchor layout. With the refactoring, it mandates any layout must starting from anchor layout. 
User is expected to learn to use convert_layout to set anchor layout when it is missing. I don't it is confusing. 
Instead, honoring the existing incorrect test protocol (using the temporary layout) and try to use a different way of testing is confusing if we want to establish the new rule across tests: every test should have anchor layout properly set. 


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


More information about the Mlir-commits mailing list