|
1 | | -@testset "arguments" begin |
2 | | - @on_device dispatch_quadgroups_per_threadgroup() |
3 | | - @on_device dispatch_simdgroups_per_threadgroup() |
4 | | - @on_device quadgroup_index_in_threadgroup() |
5 | | - @on_device quadgroups_per_threadgroup() |
6 | | - @on_device simdgroup_index_in_threadgroup() |
7 | | - @on_device simdgroups_per_threadgroup() |
8 | | - @on_device thread_index_in_quadgroup() |
9 | | - @on_device thread_index_in_simdgroup() |
10 | | - @on_device thread_index_in_threadgroup() |
11 | | - @on_device thread_execution_width() |
12 | | - @on_device threads_per_simdgroup() |
13 | | - |
14 | | - @on_device dispatch_threads_per_threadgroup() |
15 | | - @on_device dispatch_threads_per_threadgroup_1d() |
16 | | - @on_device dispatch_threads_per_threadgroup_2d() |
17 | | - @on_device dispatch_threads_per_threadgroup_3d() |
18 | | - |
19 | | - @on_device grid_origin() |
20 | | - @on_device grid_origin_1d() |
21 | | - @on_device grid_origin_2d() |
22 | | - @on_device grid_origin_3d() |
23 | | - |
24 | | - @on_device grid_size() |
25 | | - @on_device grid_size_1d() |
26 | | - @on_device grid_size_2d() |
27 | | - @on_device grid_size_3d() |
28 | | - |
29 | | - @on_device thread_position_in_grid() |
30 | | - @on_device thread_position_in_grid_1d() |
31 | | - @on_device thread_position_in_grid_2d() |
32 | | - @on_device thread_position_in_grid_3d() |
33 | | - |
34 | | - @on_device thread_position_in_threadgroup() |
35 | | - @on_device thread_position_in_threadgroup_1d() |
36 | | - @on_device thread_position_in_threadgroup_2d() |
37 | | - @on_device thread_position_in_threadgroup_3d() |
38 | | - |
39 | | - @on_device threadgroup_position_in_grid() |
40 | | - @on_device threadgroup_position_in_grid_1d() |
41 | | - @on_device threadgroup_position_in_grid_2d() |
42 | | - @on_device threadgroup_position_in_grid_3d() |
43 | | - |
44 | | - @on_device threadgroups_per_grid() |
45 | | - @on_device threadgroups_per_grid_1d() |
46 | | - @on_device threadgroups_per_grid_2d() |
47 | | - @on_device threadgroups_per_grid_3d() |
48 | | - |
49 | | - @on_device threads_per_grid() |
50 | | - @on_device threads_per_grid_1d() |
51 | | - @on_device threads_per_grid_2d() |
52 | | - @on_device threads_per_grid_3d() |
53 | | - |
54 | | - @on_device threads_per_threadgroup() |
55 | | - @on_device threads_per_threadgroup_1d() |
56 | | - @on_device threads_per_threadgroup_2d() |
57 | | - @on_device threads_per_threadgroup_3d() |
58 | | - |
59 | | - # UInt16 |
60 | | - @on_device dispatch_quadgroups_per_threadgroup_i16() |
61 | | - @on_device dispatch_simdgroups_per_threadgroup_i16() |
62 | | - @on_device quadgroup_index_in_threadgroup_i16() |
63 | | - @on_device quadgroups_per_threadgroup_i16() |
64 | | - @on_device simdgroup_index_in_threadgroup_i16() |
65 | | - @on_device simdgroups_per_threadgroup_i16() |
66 | | - @on_device thread_index_in_quadgroup_i16() |
67 | | - @on_device thread_index_in_simdgroup_i16() |
68 | | - @on_device thread_index_in_threadgroup_i16() |
69 | | - @on_device thread_execution_width_i16() |
70 | | - @on_device threads_per_simdgroup_i16() |
71 | | - |
72 | | - @on_device dispatch_threads_per_threadgroup_i16() |
73 | | - @on_device grid_origin_i16() |
74 | | - @on_device grid_size_i16() |
75 | | - @on_device thread_position_in_grid_i16() |
76 | | - @on_device thread_position_in_threadgroup_i16() |
77 | | - @on_device threadgroup_position_in_grid_i16() |
78 | | - @on_device threadgroups_per_grid_i16() |
79 | | - @on_device threads_per_grid_i16() |
80 | | - @on_device threads_per_threadgroup_i16() |
81 | | - |
82 | | - global const CPU_ONLY_ERR = "This function is not intended for use on the CPU" |
83 | | - |
84 | | - @test_throws CPU_ONLY_ERR dispatch_quadgroups_per_threadgroup() |
85 | | - @test_throws CPU_ONLY_ERR dispatch_simdgroups_per_threadgroup() |
86 | | - @test_throws CPU_ONLY_ERR quadgroup_index_in_threadgroup() |
87 | | - @test_throws CPU_ONLY_ERR quadgroups_per_threadgroup() |
88 | | - @test_throws CPU_ONLY_ERR simdgroup_index_in_threadgroup() |
89 | | - @test_throws CPU_ONLY_ERR simdgroups_per_threadgroup() |
90 | | - @test_throws CPU_ONLY_ERR thread_index_in_quadgroup() |
91 | | - @test_throws CPU_ONLY_ERR thread_index_in_simdgroup() |
92 | | - @test_throws CPU_ONLY_ERR thread_index_in_threadgroup() |
93 | | - @test_throws CPU_ONLY_ERR thread_execution_width() |
94 | | - @test_throws CPU_ONLY_ERR threads_per_simdgroup() |
95 | | - |
96 | | - @test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup() |
97 | | - @test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_1d() |
98 | | - @test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_2d() |
99 | | - @test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_3d() |
100 | | - |
101 | | - @test_throws CPU_ONLY_ERR grid_origin() |
102 | | - @test_throws CPU_ONLY_ERR grid_origin_1d() |
103 | | - @test_throws CPU_ONLY_ERR grid_origin_2d() |
104 | | - @test_throws CPU_ONLY_ERR grid_origin_3d() |
105 | | - |
106 | | - @test_throws CPU_ONLY_ERR grid_size() |
107 | | - @test_throws CPU_ONLY_ERR grid_size_1d() |
108 | | - @test_throws CPU_ONLY_ERR grid_size_2d() |
109 | | - @test_throws CPU_ONLY_ERR grid_size_3d() |
110 | | - |
111 | | - @test_throws CPU_ONLY_ERR thread_position_in_grid() |
112 | | - @test_throws CPU_ONLY_ERR thread_position_in_grid_1d() |
113 | | - @test_throws CPU_ONLY_ERR thread_position_in_grid_2d() |
114 | | - @test_throws CPU_ONLY_ERR thread_position_in_grid_3d() |
115 | | - |
116 | | - @test_throws CPU_ONLY_ERR thread_position_in_threadgroup() |
117 | | - @test_throws CPU_ONLY_ERR thread_position_in_threadgroup_1d() |
118 | | - @test_throws CPU_ONLY_ERR thread_position_in_threadgroup_2d() |
119 | | - @test_throws CPU_ONLY_ERR thread_position_in_threadgroup_3d() |
120 | | - |
121 | | - @test_throws CPU_ONLY_ERR threadgroup_position_in_grid() |
122 | | - @test_throws CPU_ONLY_ERR threadgroup_position_in_grid_1d() |
123 | | - @test_throws CPU_ONLY_ERR threadgroup_position_in_grid_2d() |
124 | | - @test_throws CPU_ONLY_ERR threadgroup_position_in_grid_3d() |
125 | | - |
126 | | - @test_throws CPU_ONLY_ERR threadgroups_per_grid() |
127 | | - @test_throws CPU_ONLY_ERR threadgroups_per_grid_1d() |
128 | | - @test_throws CPU_ONLY_ERR threadgroups_per_grid_2d() |
129 | | - @test_throws CPU_ONLY_ERR threadgroups_per_grid_3d() |
130 | | - |
131 | | - @test_throws CPU_ONLY_ERR threads_per_grid() |
132 | | - @test_throws CPU_ONLY_ERR threads_per_grid_1d() |
133 | | - @test_throws CPU_ONLY_ERR threads_per_grid_2d() |
134 | | - @test_throws CPU_ONLY_ERR threads_per_grid_3d() |
135 | | - |
136 | | - @test_throws CPU_ONLY_ERR threads_per_threadgroup() |
137 | | - @test_throws CPU_ONLY_ERR threads_per_threadgroup_1d() |
138 | | - @test_throws CPU_ONLY_ERR threads_per_threadgroup_2d() |
139 | | - @test_throws CPU_ONLY_ERR threads_per_threadgroup_3d() |
140 | | - |
141 | | - # UInt16 |
142 | | - @test_throws CPU_ONLY_ERR dispatch_quadgroups_per_threadgroup_i16() |
143 | | - @test_throws CPU_ONLY_ERR dispatch_simdgroups_per_threadgroup_i16() |
144 | | - @test_throws CPU_ONLY_ERR quadgroup_index_in_threadgroup_i16() |
145 | | - @test_throws CPU_ONLY_ERR quadgroups_per_threadgroup_i16() |
146 | | - @test_throws CPU_ONLY_ERR simdgroup_index_in_threadgroup_i16() |
147 | | - @test_throws CPU_ONLY_ERR simdgroups_per_threadgroup_i16() |
148 | | - @test_throws CPU_ONLY_ERR thread_index_in_quadgroup() |
149 | | - @test_throws CPU_ONLY_ERR thread_index_in_simdgroup_i16() |
150 | | - @test_throws CPU_ONLY_ERR thread_index_in_threadgroup_i16() |
151 | | - @test_throws CPU_ONLY_ERR thread_execution_width_i16() |
152 | | - @test_throws CPU_ONLY_ERR threads_per_simdgroup_i16() |
153 | | - |
154 | | - @test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_i16() |
155 | | - @test_throws CPU_ONLY_ERR grid_origin_i16() |
156 | | - @test_throws CPU_ONLY_ERR grid_size_i16() |
157 | | - @test_throws CPU_ONLY_ERR thread_position_in_grid_i16() |
158 | | - @test_throws CPU_ONLY_ERR thread_position_in_threadgroup_i16() |
159 | | - @test_throws CPU_ONLY_ERR threadgroup_position_in_grid_i16() |
160 | | - @test_throws CPU_ONLY_ERR threadgroups_per_grid_i16() |
161 | | - @test_throws CPU_ONLY_ERR threads_per_grid_i16() |
162 | | - @test_throws CPU_ONLY_ERR threads_per_threadgroup_i16() |
163 | | -end |
| 1 | +@on_device dispatch_quadgroups_per_threadgroup() |
| 2 | +@on_device dispatch_simdgroups_per_threadgroup() |
| 3 | +@on_device quadgroup_index_in_threadgroup() |
| 4 | +@on_device quadgroups_per_threadgroup() |
| 5 | +@on_device simdgroup_index_in_threadgroup() |
| 6 | +@on_device simdgroups_per_threadgroup() |
| 7 | +@on_device thread_index_in_quadgroup() |
| 8 | +@on_device thread_index_in_simdgroup() |
| 9 | +@on_device thread_index_in_threadgroup() |
| 10 | +@on_device thread_execution_width() |
| 11 | +@on_device threads_per_simdgroup() |
| 12 | + |
| 13 | +@on_device dispatch_threads_per_threadgroup() |
| 14 | +@on_device dispatch_threads_per_threadgroup_1d() |
| 15 | +@on_device dispatch_threads_per_threadgroup_2d() |
| 16 | +@on_device dispatch_threads_per_threadgroup_3d() |
| 17 | + |
| 18 | +@on_device grid_origin() |
| 19 | +@on_device grid_origin_1d() |
| 20 | +@on_device grid_origin_2d() |
| 21 | +@on_device grid_origin_3d() |
| 22 | + |
| 23 | +@on_device grid_size() |
| 24 | +@on_device grid_size_1d() |
| 25 | +@on_device grid_size_2d() |
| 26 | +@on_device grid_size_3d() |
| 27 | + |
| 28 | +@on_device thread_position_in_grid() |
| 29 | +@on_device thread_position_in_grid_1d() |
| 30 | +@on_device thread_position_in_grid_2d() |
| 31 | +@on_device thread_position_in_grid_3d() |
| 32 | + |
| 33 | +@on_device thread_position_in_threadgroup() |
| 34 | +@on_device thread_position_in_threadgroup_1d() |
| 35 | +@on_device thread_position_in_threadgroup_2d() |
| 36 | +@on_device thread_position_in_threadgroup_3d() |
| 37 | + |
| 38 | +@on_device threadgroup_position_in_grid() |
| 39 | +@on_device threadgroup_position_in_grid_1d() |
| 40 | +@on_device threadgroup_position_in_grid_2d() |
| 41 | +@on_device threadgroup_position_in_grid_3d() |
| 42 | + |
| 43 | +@on_device threadgroups_per_grid() |
| 44 | +@on_device threadgroups_per_grid_1d() |
| 45 | +@on_device threadgroups_per_grid_2d() |
| 46 | +@on_device threadgroups_per_grid_3d() |
| 47 | + |
| 48 | +@on_device threads_per_grid() |
| 49 | +@on_device threads_per_grid_1d() |
| 50 | +@on_device threads_per_grid_2d() |
| 51 | +@on_device threads_per_grid_3d() |
| 52 | + |
| 53 | +@on_device threads_per_threadgroup() |
| 54 | +@on_device threads_per_threadgroup_1d() |
| 55 | +@on_device threads_per_threadgroup_2d() |
| 56 | +@on_device threads_per_threadgroup_3d() |
| 57 | + |
| 58 | +# UInt16 |
| 59 | +@on_device dispatch_quadgroups_per_threadgroup_i16() |
| 60 | +@on_device dispatch_simdgroups_per_threadgroup_i16() |
| 61 | +@on_device quadgroup_index_in_threadgroup_i16() |
| 62 | +@on_device quadgroups_per_threadgroup_i16() |
| 63 | +@on_device simdgroup_index_in_threadgroup_i16() |
| 64 | +@on_device simdgroups_per_threadgroup_i16() |
| 65 | +@on_device thread_index_in_quadgroup_i16() |
| 66 | +@on_device thread_index_in_simdgroup_i16() |
| 67 | +@on_device thread_index_in_threadgroup_i16() |
| 68 | +@on_device thread_execution_width_i16() |
| 69 | +@on_device threads_per_simdgroup_i16() |
| 70 | + |
| 71 | +@on_device dispatch_threads_per_threadgroup_i16() |
| 72 | +@on_device grid_origin_i16() |
| 73 | +@on_device grid_size_i16() |
| 74 | +@on_device thread_position_in_grid_i16() |
| 75 | +@on_device thread_position_in_threadgroup_i16() |
| 76 | +@on_device threadgroup_position_in_grid_i16() |
| 77 | +@on_device threadgroups_per_grid_i16() |
| 78 | +@on_device threads_per_grid_i16() |
| 79 | +@on_device threads_per_threadgroup_i16() |
| 80 | + |
| 81 | +global const CPU_ONLY_ERR = "This function is not intended for use on the CPU" |
| 82 | + |
| 83 | +@test_throws CPU_ONLY_ERR dispatch_quadgroups_per_threadgroup() |
| 84 | +@test_throws CPU_ONLY_ERR dispatch_simdgroups_per_threadgroup() |
| 85 | +@test_throws CPU_ONLY_ERR quadgroup_index_in_threadgroup() |
| 86 | +@test_throws CPU_ONLY_ERR quadgroups_per_threadgroup() |
| 87 | +@test_throws CPU_ONLY_ERR simdgroup_index_in_threadgroup() |
| 88 | +@test_throws CPU_ONLY_ERR simdgroups_per_threadgroup() |
| 89 | +@test_throws CPU_ONLY_ERR thread_index_in_quadgroup() |
| 90 | +@test_throws CPU_ONLY_ERR thread_index_in_simdgroup() |
| 91 | +@test_throws CPU_ONLY_ERR thread_index_in_threadgroup() |
| 92 | +@test_throws CPU_ONLY_ERR thread_execution_width() |
| 93 | +@test_throws CPU_ONLY_ERR threads_per_simdgroup() |
| 94 | + |
| 95 | +@test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup() |
| 96 | +@test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_1d() |
| 97 | +@test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_2d() |
| 98 | +@test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_3d() |
| 99 | + |
| 100 | +@test_throws CPU_ONLY_ERR grid_origin() |
| 101 | +@test_throws CPU_ONLY_ERR grid_origin_1d() |
| 102 | +@test_throws CPU_ONLY_ERR grid_origin_2d() |
| 103 | +@test_throws CPU_ONLY_ERR grid_origin_3d() |
| 104 | + |
| 105 | +@test_throws CPU_ONLY_ERR grid_size() |
| 106 | +@test_throws CPU_ONLY_ERR grid_size_1d() |
| 107 | +@test_throws CPU_ONLY_ERR grid_size_2d() |
| 108 | +@test_throws CPU_ONLY_ERR grid_size_3d() |
| 109 | + |
| 110 | +@test_throws CPU_ONLY_ERR thread_position_in_grid() |
| 111 | +@test_throws CPU_ONLY_ERR thread_position_in_grid_1d() |
| 112 | +@test_throws CPU_ONLY_ERR thread_position_in_grid_2d() |
| 113 | +@test_throws CPU_ONLY_ERR thread_position_in_grid_3d() |
| 114 | + |
| 115 | +@test_throws CPU_ONLY_ERR thread_position_in_threadgroup() |
| 116 | +@test_throws CPU_ONLY_ERR thread_position_in_threadgroup_1d() |
| 117 | +@test_throws CPU_ONLY_ERR thread_position_in_threadgroup_2d() |
| 118 | +@test_throws CPU_ONLY_ERR thread_position_in_threadgroup_3d() |
| 119 | + |
| 120 | +@test_throws CPU_ONLY_ERR threadgroup_position_in_grid() |
| 121 | +@test_throws CPU_ONLY_ERR threadgroup_position_in_grid_1d() |
| 122 | +@test_throws CPU_ONLY_ERR threadgroup_position_in_grid_2d() |
| 123 | +@test_throws CPU_ONLY_ERR threadgroup_position_in_grid_3d() |
| 124 | + |
| 125 | +@test_throws CPU_ONLY_ERR threadgroups_per_grid() |
| 126 | +@test_throws CPU_ONLY_ERR threadgroups_per_grid_1d() |
| 127 | +@test_throws CPU_ONLY_ERR threadgroups_per_grid_2d() |
| 128 | +@test_throws CPU_ONLY_ERR threadgroups_per_grid_3d() |
| 129 | + |
| 130 | +@test_throws CPU_ONLY_ERR threads_per_grid() |
| 131 | +@test_throws CPU_ONLY_ERR threads_per_grid_1d() |
| 132 | +@test_throws CPU_ONLY_ERR threads_per_grid_2d() |
| 133 | +@test_throws CPU_ONLY_ERR threads_per_grid_3d() |
| 134 | + |
| 135 | +@test_throws CPU_ONLY_ERR threads_per_threadgroup() |
| 136 | +@test_throws CPU_ONLY_ERR threads_per_threadgroup_1d() |
| 137 | +@test_throws CPU_ONLY_ERR threads_per_threadgroup_2d() |
| 138 | +@test_throws CPU_ONLY_ERR threads_per_threadgroup_3d() |
| 139 | + |
| 140 | +# UInt16 |
| 141 | +@test_throws CPU_ONLY_ERR dispatch_quadgroups_per_threadgroup_i16() |
| 142 | +@test_throws CPU_ONLY_ERR dispatch_simdgroups_per_threadgroup_i16() |
| 143 | +@test_throws CPU_ONLY_ERR quadgroup_index_in_threadgroup_i16() |
| 144 | +@test_throws CPU_ONLY_ERR quadgroups_per_threadgroup_i16() |
| 145 | +@test_throws CPU_ONLY_ERR simdgroup_index_in_threadgroup_i16() |
| 146 | +@test_throws CPU_ONLY_ERR simdgroups_per_threadgroup_i16() |
| 147 | +@test_throws CPU_ONLY_ERR thread_index_in_quadgroup() |
| 148 | +@test_throws CPU_ONLY_ERR thread_index_in_simdgroup_i16() |
| 149 | +@test_throws CPU_ONLY_ERR thread_index_in_threadgroup_i16() |
| 150 | +@test_throws CPU_ONLY_ERR thread_execution_width_i16() |
| 151 | +@test_throws CPU_ONLY_ERR threads_per_simdgroup_i16() |
| 152 | + |
| 153 | +@test_throws CPU_ONLY_ERR dispatch_threads_per_threadgroup_i16() |
| 154 | +@test_throws CPU_ONLY_ERR grid_origin_i16() |
| 155 | +@test_throws CPU_ONLY_ERR grid_size_i16() |
| 156 | +@test_throws CPU_ONLY_ERR thread_position_in_grid_i16() |
| 157 | +@test_throws CPU_ONLY_ERR thread_position_in_threadgroup_i16() |
| 158 | +@test_throws CPU_ONLY_ERR threadgroup_position_in_grid_i16() |
| 159 | +@test_throws CPU_ONLY_ERR threadgroups_per_grid_i16() |
| 160 | +@test_throws CPU_ONLY_ERR threads_per_grid_i16() |
| 161 | +@test_throws CPU_ONLY_ERR threads_per_threadgroup_i16() |
0 commit comments