Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit eb58c19

Browse files
authored
[SYCL] [L0] Test for checking use of immediate commandlists. (#1095)
Signed-off-by: Rajiv Deodhar <[email protected]>
1 parent cd495f0 commit eb58c19

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// REQUIRES: level_zero, level_zero_dev_kit
2+
//
3+
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out
4+
// RUN: env SYCL_DEVICE_FILTER=level_zero ZE_DEBUG=1 SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=1 SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
5+
//
6+
// CHECK-NOT: zeCommandListCreate(
7+
// CHECK: zeCommandListCreateImmediate(
8+
9+
// The test checks that immediate commandlists are used and not regular ones.
10+
11+
#include <CL/sycl.hpp>
12+
using namespace cl;
13+
int main(int argc, char **argv) {
14+
sycl::queue Q;
15+
const unsigned n_chunk = 1000;
16+
for (int i = 0; i < n_chunk; i++)
17+
Q.single_task([=]() {});
18+
Q.wait();
19+
return 0;
20+
}

0 commit comments

Comments
 (0)