Skip to content

Commit b04251d

Browse files
[SYCL][PI][L0] Fix dynamic batching unit test (#3270)
Fixes problem with level zero plugin dynamic batching unit test that was reported in #3257.
1 parent 51f22c4 commit b04251d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

sycl/test/on-device/plugins/level_zero_dynamic_batch_test.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@
22

33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
44

5-
// Check that dynamic batching increases batch size
6-
// RUN: env SYCL_PI_TRACE=2 ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 | FileCheck --check-prefixes=CKALL,CKDYNUP %s
5+
// Check that dynamic batching raises/lowers batch size
6+
// RUN: env SYCL_PI_TRACE=2 ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 | FileCheck --check-prefixes=CKALL,CKDYN %s
77

88
// level_zero_dynamic_batch_test.cpp
99
//
10-
// This tests the level zero plugin's kernel dyanmic batch size adjustment
10+
// This tests the level zero plugin's kernel dynamic batch size adjustment
1111
// code.
1212
// It starts out by enqueing 40 kernels before it does a wait, and it does
1313
// this 5 times. That should cause the dynamic batch size adjustment to
14-
// raise the batch size up several times.
14+
// raise the batch size up 3 times.
1515
//
1616
// Then the test starts enqueueing only 4 kernels before doing a wait, and
17-
// it does that 5 times as well. That should cause the batch size to
18-
// be lowered, just once to be less than 4.
17+
// it does that 20 times. That should cause the batch size to
18+
// be lowered to be less than 4.
1919
//
2020
// CKDYN: Raising QueueBatchSize to 5
2121
// CKDYN: Raising QueueBatchSize to 6
22+
// CKDYN: Raising QueueBatchSize to 7
2223
// CKDYN-NOT: Raising QueueBatchSize
2324
// CKALL: Test Pass
2425
// CKALL: Test Pass
@@ -165,7 +166,7 @@ int main(int argc, char *argv[]) {
165166
validate(Y1, Z7, M * N);
166167
validate(Y1, Z8, M * N);
167168

168-
for (size_t i = 0; i < 5; i++) {
169+
for (size_t i = 0; i < 20; i++) {
169170
q.submit([&](sycl::handler &h) {
170171
h.parallel_for<class u32_copy9>(sycl::range<2>{M, N},
171172
[=](sycl::id<2> it) {

0 commit comments

Comments
 (0)