@@ -702,11 +702,11 @@ gpu.module @test_module_33 {
702
702
// CHECK-LABEL: func @kernel_with_block_size(
703
703
// CHECK: attributes {gpu.kernel, gpu.known_block_size = array<i32: 32, 4, 2>, nvvm.kernel, nvvm.maxntid = array<i32: 32, 4, 2>}
704
704
gpu.func @kernel_with_block_size (%arg0: !llvm.ptr ) kernel attributes {known_block_size = array<i32 : 32 , 4 , 2 >} {
705
- // CHECK: = nvvm.read.ptx.sreg.tid.x range <0 : i32, 32 : i32 > : i32
705
+ // CHECK: = nvvm.read.ptx.sreg.tid.x range <i32, 0, 32 > : i32
706
706
%0 = gpu.thread_id x
707
- // CHECK: = nvvm.read.ptx.sreg.tid.y range <0 : i32, 4 : i32 > : i32
707
+ // CHECK: = nvvm.read.ptx.sreg.tid.y range <i32, 0, 4 > : i32
708
708
%1 = gpu.thread_id y
709
- // CHECK: = nvvm.read.ptx.sreg.tid.z range <0 : i32, 2 : i32 > : i32
709
+ // CHECK: = nvvm.read.ptx.sreg.tid.z range <i32, 0, 2 > : i32
710
710
%2 = gpu.thread_id z
711
711
712
712
// Fake usage to prevent dead code elimination
@@ -929,6 +929,20 @@ gpu.module @test_module_48 {
929
929
}
930
930
}
931
931
932
+ gpu.module @test_module_49 {
933
+ // CHECK-LABEL: func @explicit_id_bounds()
934
+ func.func @explicit_id_bounds () -> (index , index , index ) {
935
+ // CHECK: = nvvm.read.ptx.sreg.tid.x range <i32, 0, 32> : i32
936
+ %0 = gpu.thread_id x upper_bound 32
937
+ // CHECK: = nvvm.read.ptx.sreg.ntid.x range <i32, 1, 33> : i32
938
+ %1 = gpu.block_dim x upper_bound 32
939
+ // CHECK: = nvvm.read.ptx.sreg.laneid range <i32, 0, 32> : i32
940
+ %2 = gpu.lane_id upper_bound 32
941
+
942
+ return %0 , %1 , %2 : index , index , index
943
+ }
944
+ }
945
+
932
946
module attributes {transform.with_named_sequence } {
933
947
transform.named_sequence @__transform_main (%toplevel_module: !transform.any_op {transform.readonly }) {
934
948
%gpu_module = transform.structured.match ops {[" gpu.module" ]} in %toplevel_module
0 commit comments