@@ -183,8 +183,8 @@ func.func @test_create_tdesc_vc_1(%src: ui64) {
183
183
// -----
184
184
func.func @test_create_tdesc_vc_2 (%src: ui64 ) {
185
185
%0 = arith.constant dense <[0 , 2 , 4 , 6 , 8 , 10 , 12 , 14 ]> : vector <8 xindex >
186
- // expected-error@+1 {{Incorrect TensorDesc shape}}
187
186
%1 = xegpu.create_tdesc %src , %0 : ui64 , vector <8 xindex >
187
+ // expected-error@+1 {{expected chunk blocks for 2D tensor}}
188
188
-> !xegpu.tensor_desc <8 x4 xf16 , #xegpu.scatter_tdesc_attr <>>
189
189
return
190
190
}
@@ -219,23 +219,23 @@ func.func @test_prefetch_vc_2(%src: ui64) {
219
219
// -----
220
220
func.func @test_create_tdesc_sg_map_1 (%src: ui64 ) {
221
221
%cst = arith.constant dense <[0 , 8 , 16 , 24 ]> : vector <4 xindex >
222
- // expected-error@+1 {{Detected a conflict between SG map's work-item layout and TensorDesc shape. Check the index of `subgroup_size` in WI layout map }}
222
+ // expected-error@+1 {{outer layout distribution and data mapping must be 1 for 1D tensor }}
223
223
%1 = xegpu.create_tdesc %src , %cst : ui64 , vector <4 xindex > -> !xegpu.tensor_desc <4 xf32 , #xegpu.scatter_tdesc_attr <>, #xegpu.sg_map <wi_layout = [4 , 1 ], wi_data = [1 , 1 ]>>
224
224
return
225
225
}
226
226
227
227
// -----
228
228
func.func @test_create_tdesc_sg_map_2 (%src: ui64 ) {
229
229
%cst = arith.constant dense <[0 , 8 , 16 , 24 ]> : vector <4 xindex >
230
- // expected-error@+1 {{TensorDesc's SG map only supports multiple elements contiguous along rows }}
230
+ // expected-error@+1 {{cannot map over non- contiguous scattered row elements }}
231
231
%1 = xegpu.create_tdesc %src , %cst : ui64 , vector <4 xindex > -> !xegpu.tensor_desc <4 x2 xf32 , #xegpu.scatter_tdesc_attr <chunk_size = 2 >, #xegpu.sg_map <wi_layout = [1 , 4 ], wi_data = [2 , 1 ]>>
232
232
return
233
233
}
234
234
235
235
// -----
236
236
func.func @test_create_tdesc_sg_map_3 (%src: ui64 ) {
237
237
%cst = arith.constant dense <[0 , 8 , 16 , 24 ]> : vector <4 xindex >
238
- // expected-error@+1 {{TensorDesc's chunkSize must match WI's data mapping }}
238
+ // expected-error@+1 {{work item data mapping must match the number of contiguous elements }}
239
239
%1 = xegpu.create_tdesc %src , %cst : ui64 , vector <4 xindex > -> !xegpu.tensor_desc <4 x3 xf32 , #xegpu.scatter_tdesc_attr <chunk_size = 3 >, #xegpu.sg_map <wi_layout = [4 , 1 ], wi_data = [1 , 2 ]>>
240
240
return
241
241
}
@@ -366,55 +366,63 @@ func.func @test_atomic_rmw(%src: ui64, %value : vector<16x4xf32>, %mask : vector
366
366
// -----
367
367
func.func @tensor_desc_invalid_rank (%src: memref <24 x32 xf32 >) {
368
368
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
369
- // expected-error@+1 {{desc shape rank exceeds 2 }}
369
+ // expected-error@+1 {{expected 1D or 2D tensor }}
370
370
!xegpu.tensor_desc <16 x2 x2 xf32 >
371
371
return
372
372
}
373
373
374
+ // -----
375
+ func.func @tensor_desc_invalid_rank_1 (%src: memref <24 x32 xf32 >) {
376
+ %0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
377
+ // expected-error@+1 {{expected 1D or 2D tensor}}
378
+ !xegpu.tensor_desc <f32 >
379
+ return
380
+ }
381
+
374
382
// -----
375
383
func.func @tensor_desc_1D_invalid_map_layout (%src: memref <24 x32 xf32 >) {
376
384
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
377
- // expected-error@+1 {{outer layout and data mapping must be 1 for 1D tensor}}
385
+ // expected-error@+1 {{outer layout distribution and data mapping must be 1 for 1D tensor}}
378
386
!xegpu.tensor_desc <16 xf32 , #xegpu.sg_map <wi_layout = [2 , 16 ], wi_data = [1 , 1 ]>>
379
387
return
380
388
}
381
389
382
390
// -----
383
391
func.func @tensor_desc_1D_invalid_map_data (%src: memref <24 x32 xf32 >) {
384
392
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
385
- // expected-error@+1 {{outer layout and data mapping must be 1 for 1D tensor}}
393
+ // expected-error@+1 {{outer layout distribution and data mapping must be 1 for 1D tensor}}
386
394
!xegpu.tensor_desc <16 xf32 , #xegpu.sg_map <wi_layout = [1 , 16 ], wi_data = [2 , 1 ]>>
387
395
return
388
396
}
389
397
390
398
// -----
391
399
func.func @tensor_desc_invalid_map_layout (%src: memref <24 x32 xf32 >) {
392
400
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
393
- // expected-error@+1 {{cannot map 8 elements into 16 by 1 tiles }}
401
+ // expected-error@+1 {{cannot distribute 8 over 16 work items with 1 elements each }}
394
402
!xegpu.tensor_desc <4 x8 xf32 , #xegpu.sg_map <wi_layout = [1 , 16 ], wi_data = [1 , 1 ]>>
395
403
return
396
404
}
397
405
398
406
// -----
399
407
func.func @tensor_desc_invalid_map_layout_1 (%src: memref <24 x32 xf32 >) {
400
408
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
401
- // expected-error@+1 {{cannot map 4 elements into 8 by 1 tiles }}
409
+ // expected-error@+1 {{cannot distribute 4 over 8 work items with 1 elements each }}
402
410
!xegpu.tensor_desc <4 x8 xf32 , #xegpu.sg_map <wi_layout = [8 , 2 ], wi_data = [1 , 1 ]>>
403
411
return
404
412
}
405
413
406
414
// -----
407
415
func.func @tensor_desc_invalid_map_data (%src: memref <24 x32 xf32 >) {
408
416
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
409
- // expected-error@+1 {{cannot map 4 elements into 2 by 4 tiles }}
417
+ // expected-error@+1 {{cannot distribute 4 over 2 work items with 4 elements each }}
410
418
!xegpu.tensor_desc <4 x8 xf32 , #xegpu.sg_map <wi_layout = [2 , 8 ], wi_data = [4 , 1 ]>>
411
419
return
412
420
}
413
421
414
422
// -----
415
423
func.func @tensor_desc_invalid_map_data_1 (%src: memref <24 x32 xf32 >) {
416
424
%0 = xegpu.create_nd_tdesc %src [0 , 0 ] : memref <24 x32 xf32 > ->
417
- // expected-error@+1 {{cannot map 4 elements into 8 by 1 tiles }}
425
+ // expected-error@+1 {{cannot distribute 4 over 8 work items with 1 elements each }}
418
426
!xegpu.tensor_desc <4 x8 xf32 , #xegpu.sg_map <wi_layout = [8 , 2 ], wi_data = [1 , 2 ]>>
419
427
return
420
428
}
@@ -423,7 +431,7 @@ func.func @tensor_desc_invalid_map_data_1(%src: memref<24x32xf32>) {
423
431
func.func @tensor_desc_scatter_invalid_map_data (%src: ui64 ) {
424
432
%0 = arith.constant dense <[0 , 8 , 16 , 24 ]> : vector <4 xindex >
425
433
%1 = xegpu.create_tdesc %src , %0 : ui64 , vector <4 xindex > ->
426
- // expected-error@+1 {{cannot map over non-contiguous scattered elements}}
434
+ // expected-error@+1 {{cannot map over non-contiguous scattered row elements}}
427
435
!xegpu.tensor_desc <4 x2 xf32 ,
428
436
#xegpu.scatter_tdesc_attr <chunk_size = 2 >,
429
437
#xegpu.sg_map <wi_layout = [1 , 1 ], wi_data = [2 , 1 ]>>
@@ -433,7 +441,7 @@ func.func @tensor_desc_scatter_invalid_map_data(%src: ui64) {
433
441
// -----
434
442
func.func @tensor_desc_scatter_invalid_map_data_1 (%src: ui64 , %offsets: vector <16 xindex >) {
435
443
%1 = xegpu.create_tdesc %src , %offsets : ui64 , vector <16 xindex > ->
436
- // expected-error@+1 {{too few contiguous elements for work item mapping }}
444
+ // expected-error@+1 {{work item data mapping must match the number of contiguous elements }}
437
445
!xegpu.tensor_desc <16 xf32 ,
438
446
#xegpu.scatter_tdesc_attr <chunk_size = 1 >,
439
447
#xegpu.sg_map <wi_layout = [1 , 8 ], wi_data = [1 , 2 ]>>
0 commit comments