Commit 0391f61
add multiple submission modes in queue gtests (#20969)
Modifications allow for running tests with different queue submission
modes, either specified by the user or provided by default. This is made
possible through the introduced macros:
- `UUR_INSTANTIATE_DEVICE_TEST_SUITE_MULTI_QUEUE(FIXTURE)`: instantiates
the provided `FIXTURE` with the submission modes:
`UR_QUEUE_FLAG_SUBMISSION_BATCHED` and
`UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE`
- `UUR_MULTI_QUEUE_TYPE_TEST_SUITE_WITH_PARAM(FIXTURE, VALUES,
PRINTER)`: similarly instantiates the `FIXTURE` with either batched or
immediate submission modes, but additionally accepts parameters
- `UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES(FIXTURE, MODES)`: instantiates
the provided `FIXTURE` with queue submission modes provided by the user
- `UUR_DEVICE_TEST_SUITE_WITH_DEFAULT_QUEUE(FIXTURE)`: provides only one
default submission mode (specified as 0); the exact mode is chosen by
the device
- `UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_PRINTER(FIXTURE, MODES,
PRINTER)`: similar to `UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES`, but the
user also provides the `PRINTER` function
- `UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM(FIXTURE, VALUES,
MODES, PRINTER)`: similar to
`UUR_MULTI_QUEUE_TYPE_TEST_SUITE_WITH_PARAM`, but the user also provides
queue submission modes
At this moment, `UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM` is
not used in any test. As a helper intended for parametrized tests, this
macro is complementary to `UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES`,
which enables the user to specify queue submission modes for
unparametrized tests. Example usage:
```
UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM(
urEnqueueMemBufferFillTest, testing::ValuesIn(test_cases), testing::ValuesIn(UR_QUEUE_FLAG_SUBMISSION_BATCHED,
UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE),
uur::printFillTestStringMultiQueueType<urEnqueueMemBufferFillTest>);
```
Tests that do not use any queue (like most of the urProgramTests, except
for urProgramSetSpecializationConstantsTest) are instantiated using
`UUR_DEVICE_TEST_SUITE_WITH_DEFAULT_QUEUE`. There might be more tests
that do not need a queue, since the heuristic for determining whether
the given test needs a queue consisted of checking whether the queue
defined in the test class is mentioned in the test file (not checked per
derived test class).
This patch introduces equivalents for `urQueueTest` for unparametrized
tests and `urQueueTestWithParam`, which are `urMultiQueueTypeTest` and
`urMultiQueueTypeTestWithParam`, respectively. Parametrized tests use a
new parameter type: `MultiQueueParam (std::tuple<T, ur_queue_flag_t>)`.
Similarly, the previously "unparametrized" tests, which were eventually
parametrized with the `DeviceTuple`, now use `std::tuple<DeviceTuple,
ur_queue_flag_t>` as their parameter type.
Additionally, urCommandBufferCommandExpTest is removed since it is not
referenced anywhere.1 parent f12e025 commit 0391f61
File tree
94 files changed
+779
-499
lines changed- test
- adapters/level_zero
- v2
- conformance
- enqueue
- event
- exp_command_buffer
- regression
- update
- exp_enqueue_kernel_launch_with_args
- integration
- kernel
- program
- queue
- testing
- include/uur
- source
- usm
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
94 files changed
+779
-499
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 176 | + | |
| 177 | + | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
200 | 198 | | |
201 | 199 | | |
202 | 200 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 201 | + | |
| 202 | + | |
207 | 203 | | |
208 | 204 | | |
209 | 205 | | |
| |||
238 | 234 | | |
239 | 235 | | |
240 | 236 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 237 | + | |
| 238 | + | |
245 | 239 | | |
246 | 240 | | |
247 | 241 | | |
| |||
269 | 263 | | |
270 | 264 | | |
271 | 265 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 266 | + | |
| 267 | + | |
276 | 268 | | |
277 | 269 | | |
278 | 270 | | |
| |||
294 | 286 | | |
295 | 287 | | |
296 | 288 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 289 | + | |
| 290 | + | |
301 | 291 | | |
302 | 292 | | |
303 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
36 | 63 | | |
37 | 64 | | |
38 | 65 | | |
| |||
74 | 101 | | |
75 | 102 | | |
76 | 103 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
84 | 116 | | |
85 | 117 | | |
86 | 118 | | |
| |||
122 | 154 | | |
123 | 155 | | |
124 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
125 | 161 | | |
126 | | - | |
| 162 | + | |
127 | 163 | | |
128 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
129 | 167 | | |
130 | 168 | | |
131 | 169 | | |
| |||
138 | 176 | | |
139 | 177 | | |
140 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
141 | 183 | | |
142 | | - | |
| 184 | + | |
143 | 185 | | |
144 | 186 | | |
145 | 187 | | |
146 | 188 | | |
147 | 189 | | |
148 | | - | |
149 | | - | |
| 190 | + | |
| 191 | + | |
150 | 192 | | |
151 | 193 | | |
152 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
153 | 200 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
157 | 204 | | |
158 | 205 | | |
159 | 206 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
0 commit comments