Skip to content

Commit 428e2b1

Browse files
Post review comments for #4743 (#4746)
1. added back the CHECK for function declaration to ensure the function attributes are as expected. 2. removed the test case for `intel_sub_group_2d_block_write_8b_1r32x1c`, as we already have subgroup size 32 test case. Signed-off-by: Whitney Tsang <[email protected]>
1 parent 24986bd commit 428e2b1

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

test/TritonGEN/tritongen-2Dblockstore-to-llvm.mlir

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base
3030

3131
// -----
3232

33+
// CHECK: llvm.func spir_funccc @_Z33__spirv_Subgroup2DBlockStoreINTELiiiiPvPU3AS1viiiDv2_i(i32, i32, i32, i32, !llvm.ptr {llvm.nonnull, llvm.readonly}, !llvm.ptr<1> {llvm.nonnull, llvm.writeonly}, i32, i32, i32, vector<2xi32>) attributes {no_unwind, will_return}
34+
3335
module attributes {"ttg.threads-per-warp" = 16 : i32} {
3436
llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base_height : i32, %base_pitch : i32, %x : i32, %y : i32, %stored_val : vector<8xi8>) {
3537
// CHECK: llvm.func @triton_gen.2Dblockstore(%arg0: !llvm.ptr<1>, %arg1: i32, %arg2: i32, %arg3: i32, %arg4: i32, %arg5: i32, %arg6: vector<8xi8>) {
@@ -65,20 +67,6 @@ llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base
6567
}
6668
// -----
6769

68-
llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base_height : i32, %base_pitch : i32, %x : i32, %y : i32, %stored_val : vector<8xi16>) {
69-
// CHECK: [[ELEM_BITS:%.*]] = llvm.mlir.constant(8 : i32) : i32
70-
// CHECK: [[TILE_WIDTH:%.*]] = llvm.mlir.constant(32 : i32) : i32
71-
// CHECK: [[TILE_HEIGHT:%.*]] = llvm.mlir.constant(1 : i32) : i32
72-
// CHECK: [[VBLOCKS:%.*]] = llvm.mlir.constant(1 : i32) : i32
73-
// CHECK: [[TRANSPOSE:%.*]] = llvm.mlir.constant(false) : i1
74-
// CHECK: [[VNNI:%.*]] = llvm.mlir.constant(false) : i1
75-
// CHECK: llvm.call spir_funccc @llvm.genx.GenISA.LSC2DBlockWrite.v8i16({{.*}}, {{.*}}, {{.*}}, {{.*}}, {{.*}}, [[ELEM_BITS]], [[TILE_WIDTH]], [[TILE_HEIGHT]], [[VBLOCKS]], [[TRANSPOSE]], [[VNNI]], {{.*}})
76-
triton_gen.2Dblockstore %ptr, %base_width, %base_height, %base_pitch, %x, %y, %stored_val {elem_size_in_bits=8, tile_width=32, tile_height=1, v_blocks=1, cache_control=Default} : (!llvm.ptr<1>, i32, i32, i32, i32, i32, vector<8xi16>)
77-
llvm.return
78-
}
79-
80-
// -----
81-
8270
module attributes {"ttg.threads-per-warp" = 16 : i32} {
8371
llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base_height : i32, %base_pitch : i32, %x : i32, %y : i32, %stored_val : vector<8xi16>) {
8472
// CHECK-COUNT-2: llvm.mlir.constant(1 : i32) : i32
@@ -108,8 +96,8 @@ llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base
10896

10997
// -----
11098

99+
// COM: threads-per-warp = 32 case.
111100
llvm.func @triton_gen.2Dblockstore(%ptr : !llvm.ptr<1>, %base_width : i32, %base_height : i32, %base_pitch : i32, %x : i32, %y : i32, %stored_val : vector<1xi16>) {
112-
// COM: threads-per-warp = 32 case.
113101
// CHECK: [[ELEM_BITS:%.*]] = llvm.mlir.constant(16 : i32) : i32
114102
// CHECK: [[TILE_WIDTH:%.*]] = llvm.mlir.constant(16 : i32) : i32
115103
// CHECK: [[TILE_HEIGHT:%.*]] = llvm.mlir.constant(2 : i32) : i32

0 commit comments

Comments
 (0)