Skip to content

Commit 50c6283

Browse files
committed
Add more chunk_size test cases
1 parent f502c66 commit 50c6283

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

mlir/test/Dialect/XeGPU/invalid.mlir

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,23 @@ func.func @tensor_desc_scatter_invalid_map_data_1(%src: ui64, %offsets: vector<1
447447
#xegpu.sg_map<wi_layout = [1, 8], wi_data = [1, 2]>>
448448
return
449449
}
450+
451+
// -----
452+
func.func @tensor_desc_scatter_invalid_chunk_size_1D(%src: ui64, %offsets: vector<16xindex>) {
453+
%1 = xegpu.create_tdesc %src, %offsets : ui64, vector<16xindex> ->
454+
// expected-error@+1 {{expected non-contiguous elements for 1D tensor}}
455+
!xegpu.tensor_desc<16xf32,
456+
#xegpu.scatter_tdesc_attr<chunk_size = 2>,
457+
#xegpu.sg_map<wi_layout = [1, 8], wi_data = [1, 2]>>
458+
return
459+
}
460+
461+
// -----
462+
func.func @tensor_desc_scatter_invalid_chunk_size_2D(%src: ui64, %offsets: vector<16xindex>) {
463+
%1 = xegpu.create_tdesc %src, %offsets : ui64, vector<16xindex> ->
464+
// expected-error@+1 {{expected chunk blocks for 2D tensor}}
465+
!xegpu.tensor_desc<16x2xf32,
466+
#xegpu.scatter_tdesc_attr<chunk_size = 1>,
467+
#xegpu.sg_map<wi_layout = [8, 1], wi_data = [1, 2]>>
468+
return
469+
}

0 commit comments

Comments
 (0)