Skip to content

Commit dfca5d6

Browse files
committed
Add invalid IR test for distribution type mismatch
1 parent 103db33 commit dfca5d6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

mlir/test/Dialect/XeGPU/invalid.mlir

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ func.func @test_load_nd_vc_3(%src: memref<8x16xf16>) {
7777
return
7878
}
7979

80+
// -----
81+
func.func @test_load_nd_vc_4(%src: memref<24x32xf32>) {
82+
%1 = xegpu.create_nd_tdesc %src[0, 0] : memref<24x32xf32> ->
83+
!xegpu.tensor_desc<8x16xf32, #xegpu.sg_map<wi_layout = [1, 16], wi_data = [1, 1]>>
84+
// expected-error@+1 {{Result shape doesn't match TensorDesc shape.}}
85+
%2 = xegpu.load_nd %1 <{l1_hint = #xegpu.cache_hint<cached>, l2_hint = #xegpu.cache_hint<uncached>}> : !xegpu.tensor_desc<8x16xf32, #xegpu.sg_map<wi_layout = [1, 16], wi_data = [1, 1]>> -> vector<8x2xf32>
86+
return
87+
}
88+
8089
// -----
8190
func.func @test_store_nd_vc_1(%dst: memref<24x32xf16>) {
8291
%1 = arith.constant dense<1.0>: vector<24x32xf16>

0 commit comments

Comments
 (0)