11// RUN: mlir-opt -xegpu-subgroup-distribute='print-analysis-only=true' -split-input-file %s | FileCheck %s
22
3- // CHECK: function: test_dpas_op_1:
4- // CHECK: op : %{{.*}} = arith.constant 0 : index
5- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
3+ // CHECK: function: test_dpas_f16:
4+ // CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf16>' at index: 0
5+ // CHECK-NEXT: sg_map : Not assigned.
6+ // CHECK-NEXT: argument: <block argument> of type 'memref<16x16xf16>' at index: 1
7+ // CHECK-NEXT: sg_map : Not assigned.
8+ // CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf32>' at index: 2
9+ // CHECK-NEXT: sg_map : Not assigned.
10+ // CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
11+ // CHECK-NEXT: sg_map for result #0: Not assigned.
612// CHECK-NEXT: op : %{{.*}} = arith.constant dense<0.000000e+00> : vector<8x16xf32>
713// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
814// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xf16> -> !xegpu.tensor_desc<8x16xf16>
1723// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
1824// CHECK-NEXT: op : %{{.*}} = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xf32> -> !xegpu.tensor_desc<8x16xf32>
1925// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
20- func.func @test_dpas_op_1 (%arg0: memref <8 x16 xf16 >, %arg1: memref <16 x16 xf16 >, %arg2: memref <8 x16 xf32 >) {
26+ func.func @test_dpas_f16 (%arg0: memref <8 x16 xf16 >, %arg1: memref <16 x16 xf16 >, %arg2: memref <8 x16 xf32 >) {
2127 %c0 = arith.constant 0 : index
2228 %cst = arith.constant dense <0.000000e+00 > : vector <8 x16 xf32 >
2329 %0 = xegpu.create_nd_tdesc %arg0 [%c0 , %c0 ] : memref <8 x16 xf16 > -> !xegpu.tensor_desc <8 x16 xf16 >
@@ -32,20 +38,20 @@ func.func @test_dpas_op_1(%arg0: memref<8x16xf16>, %arg1: memref<16x16xf16>, %ar
3238
3339
3440// -----
35- // CHECK: function: test_dpas_op_2 :
41+ // CHECK: function: test_dpas_i8 :
3642// CHECK-NEXT: argument: <block argument> of type 'vector<8x32xi8>' at index: 0
3743// CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 2]
3844// CHECK-NEXT: argument: <block argument> of type 'vector<32x16xi8>' at index: 1
3945// CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [4, 1]
4046// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xi32>' at index: 2
41- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
47+ // CHECK-NEXT: sg_map : Not assigned.
4248// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
43- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
49+ // CHECK-NEXT: sg_map for result #0: Not assigned.
4450// CHECK-NEXT: op : %[[T0:.*]] = xegpu.dpas %{{.*}} : vector<8x32xi8>, vector<32x16xi8> -> vector<8x16xi32>
4551// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
4652// CHECK-NEXT: op : %[[T1:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xi32> -> !xegpu.tensor_desc<8x16xi32>
4753// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
48- func.func @test_dpas_op_2 (%arg0: vector <8 x32 xi8 >, %arg1: vector <32 x16 xi8 >, %arg2: memref <8 x16 xi32 >) {
54+ func.func @test_dpas_i8 (%arg0: vector <8 x32 xi8 >, %arg1: vector <32 x16 xi8 >, %arg2: memref <8 x16 xi32 >) {
4955 %c0 = arith.constant 0 : index
5056 %0 = xegpu.dpas %arg0 , %arg1 : vector <8 x32 xi8 >, vector <32 x16 xi8 > -> vector <8 x16 xi32 >
5157 %1 = xegpu.create_nd_tdesc %arg2 [%c0 , %c0 ] : memref <8 x16 xi32 > -> !xegpu.tensor_desc <8 x16 xi32 >
@@ -56,13 +62,13 @@ func.func @test_dpas_op_2(%arg0: vector<8x32xi8>, %arg1: vector<32x16xi8>, %arg2
5662// -----
5763// CHECK: function: test_transpose_op_1:
5864// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf16>' at index: 0
59- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
65+ // CHECK-NEXT: sg_map : Not assigned.
6066// CHECK-NEXT: argument: <block argument> of type 'memref<16x16xf16>' at index: 1
61- // CHECK-NEXT: sg_map : wi_layout: [16, 1], wi_data: [1, 2]
67+ // CHECK-NEXT: sg_map : Not assigned.
6268// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf32>' at index: 2
63- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
69+ // CHECK-NEXT: sg_map : Not assigned.
6470// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
65- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
71+ // CHECK-NEXT: sg_map for result #0: Not assigned.
6672// CHECK-NEXT: op : %[[CST:.*]] = arith.constant dense<0.000000e+00> : vector<8x16xf32>
6773// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
6874// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xf16> -> !xegpu.tensor_desc<8x16xf16>
@@ -92,13 +98,13 @@ func.func @test_transpose_op_1(%arg0: memref<8x16xf16>, %arg1: memref<16x16xf16>
9298
9399// -----
94100// CHECK: argument: <block argument> of type 'memref<8x16xf16>' at index: 0
95- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
101+ // CHECK-NEXT: sg_map : Not assigned.
96102// CHECK-NEXT: argument: <block argument> of type 'memref<16x16xf16>' at index: 1
97- // CHECK-NEXT: sg_map : wi_layout: [16, 1], wi_data: [1, 2]
103+ // CHECK-NEXT: sg_map : Not assigned.
98104// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf32>' at index: 2
99- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
105+ // CHECK-NEXT: sg_map : Not assigned.
100106// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
101- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
107+ // CHECK-NEXT: sg_map for result #0: Not assigned.
102108// CHECK-NEXT: op : %[[CST:.*]] = arith.constant dense<0.000000e+00> : vector<8x16xf32>
103109// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
104110// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xf16> -> !xegpu.tensor_desc<8x16xf16>
@@ -156,13 +162,13 @@ func.func @test_extf_truncf_op(%arg0: !xegpu.tensor_desc<8x16xf16>, %arg1: !xegp
156162// -----
157163// CHECK: function: test_load_gather_op_1:
158164// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf16>' at index: 0
159- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
165+ // CHECK-NEXT: sg_map : Not assigned.
160166// CHECK-NEXT: argument: <block argument> of type 'memref<256xf16>' at index: 1
161- // CHECK-NEXT: sg_map : wi_layout: [16, 1], wi_data: [1, 2]
167+ // CHECK-NEXT: sg_map : Not assigned.
162168// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf32>' at index: 2
163- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
169+ // CHECK-NEXT: sg_map : Not assigned.
164170// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
165- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
171+ // CHECK-NEXT: sg_map for result #0: Not assigned.
166172// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xf16> -> !xegpu.tensor_desc<8x16xf16>
167173// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
168174// CHECK-NEXT: op : %[[T1:.*]] = xegpu.load_nd %[[T0]] : !xegpu.tensor_desc<8x16xf16> -> vector<8x16xf16>
@@ -195,7 +201,7 @@ func.func @test_load_gather_op_1(%arg0: memref<8x16xf16>, %arg1: memref<256xf16>
195201
196202// -----
197203// CHECK: argument: <block argument> of type 'memref<256xf32>' at index: 0
198- // CHECK-NEXT: sg_map : wi_layout: [16], wi_data: [1]
204+ // CHECK-NEXT: sg_map : Not assigned.
199205// CHECK-NEXT: argument: <block argument> of type '!xegpu.tensor_desc<16xf32>' at index: 1
200206// CHECK-NEXT: sg_map : wi_layout: [16], wi_data: [1]
201207// CHECK-NEXT: op : %[[CST:.*]] = arith.constant dense<[0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240]> : vector<16xindex>
@@ -217,7 +223,7 @@ func.func @test_load_gather_op_2(%arg0: memref<256xf32>, %arg1: !xegpu.tensor_de
217223
218224// -----
219225// CHECK: argument: <block argument> of type 'memref<128xf32>' at index: 0
220- // CHECK-NEXT: sg_map : wi_layout: [16, 1], wi_data: [1, 1]
226+ // CHECK-NEXT: sg_map : Not assigned.
221227// CHECK-NEXT: op : %[[CST:.*]] = arith.constant dense<1.000000e+00> : vector<8x16xf32>
222228// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
223229// CHECK-NEXT: op : %[[CST0:.*]] = arith.constant dense<true> : vector<16xi1>
@@ -239,7 +245,7 @@ func.func @test_store_scatter_op_1(%arg0: memref<128xf32>) {
239245// CHECK: argument: <block argument> of type 'vector<16xf32>' at index: 0
240246// CHECK-NEXT: sg_map : wi_layout: [16], wi_data: [1]
241247// CHECK-NEXT: argument: <block argument> of type 'memref<256xf32>' at index: 1
242- // CHECK-NEXT: sg_map : wi_layout: [16], wi_data: [1]
248+ // CHECK-NEXT: sg_map : Not assigned.
243249// CHECK-NEXT: op : %[[CST:.*]] = arith.constant dense<[0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240]> : vector<16xindex>
244250// CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
245251// CHECK-NEXT: op : %[[CST1:.*]] = arith.constant dense<true> : vector<16xi1>
@@ -256,13 +262,13 @@ func.func @test_store_scatter_op_2(%arg0: vector<16xf32>, %arg1: memref<256xf32>
256262
257263// -----
258264// CHECK: argument: <block argument> of type 'memref<8x16xi16>' at index: 0
259- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
265+ // CHECK-NEXT: sg_map : Not assigned.
260266// CHECK-NEXT: argument: <block argument> of type 'memref<32x16xi8>' at index: 1
261- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [4, 1]
267+ // CHECK-NEXT: sg_map : Not assigned.
262268// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xi32>' at index: 2
263- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
269+ // CHECK-NEXT: sg_map : Not assigned.
264270// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
265- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
271+ // CHECK-NEXT: sg_map for result #0: Not assigned.
266272// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x16xi16> -> !xegpu.tensor_desc<8x16xi16>
267273// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
268274// CHECK-NEXT: op : %[[T1:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<32x16xi8> -> !xegpu.tensor_desc<32x16xi8>
@@ -292,13 +298,13 @@ func.func @test_vector_bitcast_op_1(%arg0: memref<8x16xi16>, %arg1: memref<32x16
292298
293299// -----
294300// CHECK: argument: <block argument> of type 'memref<8x32xi8>' at index: 0
295- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 2]
301+ // CHECK-NEXT: sg_map : Not assigned.
296302// CHECK-NEXT: argument: <block argument> of type 'memref<16x32xi8>' at index: 1
297- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [4, 1]
303+ // CHECK-NEXT: sg_map : Not assigned.
298304// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf32>' at index: 2
299- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
305+ // CHECK-NEXT: sg_map : Not assigned.
300306// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
301- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
307+ // CHECK-NEXT: sg_map for result #0: Not assigned.
302308// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x32xi8> -> !xegpu.tensor_desc<8x32xi8>
303309// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 2]
304310// CHECK-NEXT: op : %[[T1:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<16x32xi8> -> !xegpu.tensor_desc<16x32xi8>
@@ -388,17 +394,17 @@ func.func @test_binary_op_2(%arg0: !xegpu.tensor_desc<8x16xf16>, %arg1: !xegpu.t
388394
389395// -----
390396// CHECK: argument: <block argument> of type 'memref<8x128xf16>' at index: 0
391- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
397+ // CHECK-NEXT: sg_map : Not assigned.
392398// CHECK-NEXT: argument: <block argument> of type 'memref<128x16xf16>' at index: 1
393- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [2, 1]
399+ // CHECK-NEXT: sg_map : Not assigned.
394400// CHECK-NEXT: argument: <block argument> of type 'memref<8x16xf32>' at index: 2
395- // CHECK-NEXT: sg_map : wi_layout: [1, 16], wi_data: [1, 1]
401+ // CHECK-NEXT: sg_map : Not assigned.
396402// CHECK-NEXT: op : %{{.*}} = arith.constant 0 : index
397- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
403+ // CHECK-NEXT: sg_map for result #0: Not assigned.
398404// CHECK-NEXT: op : %{{.*}} = arith.constant 128 : index
399405// CHECK-NEXT: sg_map for result #0: Not assigned.
400406// CHECK-NEXT: op : %{{.*}} = arith.constant 16 : index
401- // CHECK-NEXT: sg_map for result #0: wi_layout: [16], wi_data: [1]
407+ // CHECK-NEXT: sg_map for result #0: Not assigned.
402408// CHECK-NEXT: op : %[[T0:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<8x128xf16> -> !xegpu.tensor_desc<8x16xf16>
403409// CHECK-NEXT: sg_map for result #0: wi_layout: [1, 16], wi_data: [1, 1]
404410// CHECK-NEXT: op : %[[T1:.*]] = xegpu.create_nd_tdesc %{{.*}} : memref<128x16xf16> -> !xegpu.tensor_desc<16x16xf16>
0 commit comments