@@ -5,46 +5,46 @@ func.func @launch_func(%arg0 : index) {
5
5
%0 = test.with_bounds {
6
6
umin = 3 : index , umax = 5 : index ,
7
7
smin = 3 : index , smax = 5 : index
8
- }
8
+ } : index
9
9
%1 = test.with_bounds {
10
10
umin = 7 : index , umax = 11 : index ,
11
11
smin = 7 : index , smax = 11 : index
12
- }
12
+ } : index
13
13
gpu.launch blocks (%block_id_x , %block_id_y , %block_id_z ) in (%grid_dim_x = %0 , %grid_dim_y = %1 , %grid_dim_z = %arg0 )
14
14
threads (%thread_id_x , %thread_id_y , %thread_id_z ) in (%block_dim_x = %arg0 , %block_dim_y = %0 , %block_dim_z = %1 ) {
15
15
16
16
// CHECK: test.reflect_bounds {smax = 5 : index, smin = 3 : index, umax = 5 : index, umin = 3 : index}
17
17
// CHECK: test.reflect_bounds {smax = 11 : index, smin = 7 : index, umax = 11 : index, umin = 7 : index}
18
18
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
19
- %grid_dim_x0 = test.reflect_bounds %grid_dim_x
20
- %grid_dim_y0 = test.reflect_bounds %grid_dim_y
21
- %grid_dim_z0 = test.reflect_bounds %grid_dim_z
19
+ %grid_dim_x0 = test.reflect_bounds %grid_dim_x : index
20
+ %grid_dim_y0 = test.reflect_bounds %grid_dim_y : index
21
+ %grid_dim_z0 = test.reflect_bounds %grid_dim_z : index
22
22
23
23
// CHECK: test.reflect_bounds {smax = 4 : index, smin = 0 : index, umax = 4 : index, umin = 0 : index}
24
24
// CHECK: test.reflect_bounds {smax = 10 : index, smin = 0 : index, umax = 10 : index, umin = 0 : index}
25
25
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
26
- %block_id_x0 = test.reflect_bounds %block_id_x
27
- %block_id_y0 = test.reflect_bounds %block_id_y
28
- %block_id_z0 = test.reflect_bounds %block_id_z
26
+ %block_id_x0 = test.reflect_bounds %block_id_x : index
27
+ %block_id_y0 = test.reflect_bounds %block_id_y : index
28
+ %block_id_z0 = test.reflect_bounds %block_id_z : index
29
29
30
30
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
31
31
// CHECK: test.reflect_bounds {smax = 5 : index, smin = 3 : index, umax = 5 : index, umin = 3 : index}
32
32
// CHECK: test.reflect_bounds {smax = 11 : index, smin = 7 : index, umax = 11 : index, umin = 7 : index}
33
- %block_dim_x0 = test.reflect_bounds %block_dim_x
34
- %block_dim_y0 = test.reflect_bounds %block_dim_y
35
- %block_dim_z0 = test.reflect_bounds %block_dim_z
33
+ %block_dim_x0 = test.reflect_bounds %block_dim_x : index
34
+ %block_dim_y0 = test.reflect_bounds %block_dim_y : index
35
+ %block_dim_z0 = test.reflect_bounds %block_dim_z : index
36
36
37
37
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
38
38
// CHECK: test.reflect_bounds {smax = 4 : index, smin = 0 : index, umax = 4 : index, umin = 0 : index}
39
39
// CHECK: test.reflect_bounds {smax = 10 : index, smin = 0 : index, umax = 10 : index, umin = 0 : index}
40
- %thread_id_x0 = test.reflect_bounds %thread_id_x
41
- %thread_id_y0 = test.reflect_bounds %thread_id_y
42
- %thread_id_z0 = test.reflect_bounds %thread_id_z
40
+ %thread_id_x0 = test.reflect_bounds %thread_id_x : index
41
+ %thread_id_y0 = test.reflect_bounds %thread_id_y : index
42
+ %thread_id_z0 = test.reflect_bounds %thread_id_z : index
43
43
44
44
// The launch bounds are not constant, and so this can't infer anything
45
45
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
46
46
%thread_id_op = gpu.thread_id y
47
- %thread_id_op0 = test.reflect_bounds %thread_id_op
47
+ %thread_id_op0 = test.reflect_bounds %thread_id_op : index
48
48
gpu.terminator
49
49
}
50
50
@@ -65,9 +65,9 @@ module attributes {gpu.container_module} {
65
65
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
66
66
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
67
67
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
68
- %grid_dim_x0 = test.reflect_bounds %grid_dim_x
69
- %grid_dim_y0 = test.reflect_bounds %grid_dim_y
70
- %grid_dim_z0 = test.reflect_bounds %grid_dim_z
68
+ %grid_dim_x0 = test.reflect_bounds %grid_dim_x : index
69
+ %grid_dim_y0 = test.reflect_bounds %grid_dim_y : index
70
+ %grid_dim_z0 = test.reflect_bounds %grid_dim_z : index
71
71
72
72
%block_id_x = gpu.block_id x
73
73
%block_id_y = gpu.block_id y
@@ -76,9 +76,9 @@ module attributes {gpu.container_module} {
76
76
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
77
77
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
78
78
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
79
- %block_id_x0 = test.reflect_bounds %block_id_x
80
- %block_id_y0 = test.reflect_bounds %block_id_y
81
- %block_id_z0 = test.reflect_bounds %block_id_z
79
+ %block_id_x0 = test.reflect_bounds %block_id_x : index
80
+ %block_id_y0 = test.reflect_bounds %block_id_y : index
81
+ %block_id_z0 = test.reflect_bounds %block_id_z : index
82
82
83
83
%block_dim_x = gpu.block_dim x
84
84
%block_dim_y = gpu.block_dim y
@@ -87,9 +87,9 @@ module attributes {gpu.container_module} {
87
87
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
88
88
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
89
89
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
90
- %block_dim_x0 = test.reflect_bounds %block_dim_x
91
- %block_dim_y0 = test.reflect_bounds %block_dim_y
92
- %block_dim_z0 = test.reflect_bounds %block_dim_z
90
+ %block_dim_x0 = test.reflect_bounds %block_dim_x : index
91
+ %block_dim_y0 = test.reflect_bounds %block_dim_y : index
92
+ %block_dim_z0 = test.reflect_bounds %block_dim_z : index
93
93
94
94
%thread_id_x = gpu.thread_id x
95
95
%thread_id_y = gpu.thread_id y
@@ -98,9 +98,9 @@ module attributes {gpu.container_module} {
98
98
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
99
99
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
100
100
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
101
- %thread_id_x0 = test.reflect_bounds %thread_id_x
102
- %thread_id_y0 = test.reflect_bounds %thread_id_y
103
- %thread_id_z0 = test.reflect_bounds %thread_id_z
101
+ %thread_id_x0 = test.reflect_bounds %thread_id_x : index
102
+ %thread_id_y0 = test.reflect_bounds %thread_id_y : index
103
+ %thread_id_z0 = test.reflect_bounds %thread_id_z : index
104
104
105
105
%global_id_x = gpu.global_id x
106
106
%global_id_y = gpu.global_id y
@@ -109,9 +109,9 @@ module attributes {gpu.container_module} {
109
109
// CHECK: test.reflect_bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -8589934592 : index, umin = 0 : index}
110
110
// CHECK: test.reflect_bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -8589934592 : index, umin = 0 : index}
111
111
// CHECK: test.reflect_bounds {smax = 9223372036854775807 : index, smin = -9223372036854775808 : index, umax = -8589934592 : index, umin = 0 : index}
112
- %global_id_x0 = test.reflect_bounds %global_id_x
113
- %global_id_y0 = test.reflect_bounds %global_id_y
114
- %global_id_z0 = test.reflect_bounds %global_id_z
112
+ %global_id_x0 = test.reflect_bounds %global_id_x : index
113
+ %global_id_y0 = test.reflect_bounds %global_id_y : index
114
+ %global_id_z0 = test.reflect_bounds %global_id_z : index
115
115
116
116
%subgroup_size = gpu.subgroup_size : index
117
117
%lane_id = gpu.lane_id
@@ -122,10 +122,10 @@ module attributes {gpu.container_module} {
122
122
// CHECK: test.reflect_bounds {smax = 127 : index, smin = 0 : index, umax = 127 : index, umin = 0 : index}
123
123
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
124
124
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
125
- %subgroup_size0 = test.reflect_bounds %subgroup_size
126
- %lane_id0 = test.reflect_bounds %lane_id
127
- %num_subgroups0 = test.reflect_bounds %num_subgroups
128
- %subgroup_id0 = test.reflect_bounds %subgroup_id
125
+ %subgroup_size0 = test.reflect_bounds %subgroup_size : index
126
+ %lane_id0 = test.reflect_bounds %lane_id : index
127
+ %num_subgroups0 = test.reflect_bounds %num_subgroups : index
128
+ %subgroup_id0 = test.reflect_bounds %subgroup_id : index
129
129
130
130
llvm.return
131
131
}
@@ -148,9 +148,9 @@ module attributes {gpu.container_module} {
148
148
// CHECK: test.reflect_bounds {smax = 20 : index, smin = 20 : index, umax = 20 : index, umin = 20 : index}
149
149
// CHECK: test.reflect_bounds {smax = 24 : index, smin = 24 : index, umax = 24 : index, umin = 24 : index}
150
150
// CHECK: test.reflect_bounds {smax = 28 : index, smin = 28 : index, umax = 28 : index, umin = 28 : index}
151
- %grid_dim_x0 = test.reflect_bounds %grid_dim_x
152
- %grid_dim_y0 = test.reflect_bounds %grid_dim_y
153
- %grid_dim_z0 = test.reflect_bounds %grid_dim_z
151
+ %grid_dim_x0 = test.reflect_bounds %grid_dim_x : index
152
+ %grid_dim_y0 = test.reflect_bounds %grid_dim_y : index
153
+ %grid_dim_z0 = test.reflect_bounds %grid_dim_z : index
154
154
155
155
%block_id_x = gpu.block_id x
156
156
%block_id_y = gpu.block_id y
@@ -159,9 +159,9 @@ module attributes {gpu.container_module} {
159
159
// CHECK: test.reflect_bounds {smax = 19 : index, smin = 0 : index, umax = 19 : index, umin = 0 : index}
160
160
// CHECK: test.reflect_bounds {smax = 23 : index, smin = 0 : index, umax = 23 : index, umin = 0 : index}
161
161
// CHECK: test.reflect_bounds {smax = 27 : index, smin = 0 : index, umax = 27 : index, umin = 0 : index}
162
- %block_id_x0 = test.reflect_bounds %block_id_x
163
- %block_id_y0 = test.reflect_bounds %block_id_y
164
- %block_id_z0 = test.reflect_bounds %block_id_z
162
+ %block_id_x0 = test.reflect_bounds %block_id_x : index
163
+ %block_id_y0 = test.reflect_bounds %block_id_y : index
164
+ %block_id_z0 = test.reflect_bounds %block_id_z : index
165
165
166
166
%block_dim_x = gpu.block_dim x
167
167
%block_dim_y = gpu.block_dim y
@@ -170,9 +170,9 @@ module attributes {gpu.container_module} {
170
170
// CHECK: test.reflect_bounds {smax = 8 : index, smin = 8 : index, umax = 8 : index, umin = 8 : index}
171
171
// CHECK: test.reflect_bounds {smax = 12 : index, smin = 12 : index, umax = 12 : index, umin = 12 : index}
172
172
// CHECK: test.reflect_bounds {smax = 16 : index, smin = 16 : index, umax = 16 : index, umin = 16 : index}
173
- %block_dim_x0 = test.reflect_bounds %block_dim_x
174
- %block_dim_y0 = test.reflect_bounds %block_dim_y
175
- %block_dim_z0 = test.reflect_bounds %block_dim_z
173
+ %block_dim_x0 = test.reflect_bounds %block_dim_x : index
174
+ %block_dim_y0 = test.reflect_bounds %block_dim_y : index
175
+ %block_dim_z0 = test.reflect_bounds %block_dim_z : index
176
176
177
177
%thread_id_x = gpu.thread_id x
178
178
%thread_id_y = gpu.thread_id y
@@ -181,9 +181,9 @@ module attributes {gpu.container_module} {
181
181
// CHECK: test.reflect_bounds {smax = 7 : index, smin = 0 : index, umax = 7 : index, umin = 0 : index}
182
182
// CHECK: test.reflect_bounds {smax = 11 : index, smin = 0 : index, umax = 11 : index, umin = 0 : index}
183
183
// CHECK: test.reflect_bounds {smax = 15 : index, smin = 0 : index, umax = 15 : index, umin = 0 : index}
184
- %thread_id_x0 = test.reflect_bounds %thread_id_x
185
- %thread_id_y0 = test.reflect_bounds %thread_id_y
186
- %thread_id_z0 = test.reflect_bounds %thread_id_z
184
+ %thread_id_x0 = test.reflect_bounds %thread_id_x : index
185
+ %thread_id_y0 = test.reflect_bounds %thread_id_y : index
186
+ %thread_id_z0 = test.reflect_bounds %thread_id_z : index
187
187
188
188
%global_id_x = gpu.global_id x
189
189
%global_id_y = gpu.global_id y
@@ -192,9 +192,9 @@ module attributes {gpu.container_module} {
192
192
// CHECK: test.reflect_bounds {smax = 159 : index, smin = 0 : index, umax = 159 : index, umin = 0 : index}
193
193
// CHECK: test.reflect_bounds {smax = 287 : index, smin = 0 : index, umax = 287 : index, umin = 0 : index}
194
194
// CHECK: test.reflect_bounds {smax = 447 : index, smin = 0 : index, umax = 447 : index, umin = 0 : index}
195
- %global_id_x0 = test.reflect_bounds %global_id_x
196
- %global_id_y0 = test.reflect_bounds %global_id_y
197
- %global_id_z0 = test.reflect_bounds %global_id_z
195
+ %global_id_x0 = test.reflect_bounds %global_id_x : index
196
+ %global_id_y0 = test.reflect_bounds %global_id_y : index
197
+ %global_id_z0 = test.reflect_bounds %global_id_z : index
198
198
199
199
%subgroup_size = gpu.subgroup_size : index
200
200
%lane_id = gpu.lane_id
@@ -205,10 +205,10 @@ module attributes {gpu.container_module} {
205
205
// CHECK: test.reflect_bounds {smax = 127 : index, smin = 0 : index, umax = 127 : index, umin = 0 : index}
206
206
// CHECK: test.reflect_bounds {smax = 4294967295 : index, smin = 1 : index, umax = 4294967295 : index, umin = 1 : index}
207
207
// CHECK: test.reflect_bounds {smax = 4294967294 : index, smin = 0 : index, umax = 4294967294 : index, umin = 0 : index}
208
- %subgroup_size0 = test.reflect_bounds %subgroup_size
209
- %lane_id0 = test.reflect_bounds %lane_id
210
- %num_subgroups0 = test.reflect_bounds %num_subgroups
211
- %subgroup_id0 = test.reflect_bounds %subgroup_id
208
+ %subgroup_size0 = test.reflect_bounds %subgroup_size : index
209
+ %lane_id0 = test.reflect_bounds %lane_id : index
210
+ %num_subgroups0 = test.reflect_bounds %num_subgroups : index
211
+ %subgroup_id0 = test.reflect_bounds %subgroup_id : index
212
212
213
213
gpu.return
214
214
}
0 commit comments