Skip to content

Commit 63cbae3

Browse files
authored
[SYCL] [L0 PI] Added an assert to piEnqueueKernelLaunch() when the GlobalWorkOffset!=0. (#2410)
GlobalWorkOffset is not currently supported in Level Zero. Now the function will assert if someone tries to use it. Signed-off-by: Gail Lyons <[email protected]>
1 parent 4960fc9 commit 63cbae3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,6 +2844,11 @@ piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim,
28442844
assert(Kernel);
28452845
assert(Queue);
28462846
assert((WorkDim > 0) && (WorkDim < 4));
2847+
if (GlobalWorkOffset != NULL) {
2848+
for (pi_uint32 i = 0; i < WorkDim; i++) {
2849+
assert(GlobalWorkOffset[i] == 0);
2850+
}
2851+
}
28472852

28482853
ze_group_count_t ZeThreadGroupDimensions{1, 1, 1};
28492854
uint32_t WG[3];

sycl/test/basic_tests/free_function_queries/free_function_queries.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out
55
// RUN: %GPU_RUN_PLACEHOLDER %t.out
66

7+
// TODO: Support global work offset on Level Zero.
8+
// XFAIL: level_zero
9+
710
//==- free_function_queries.cpp - SYCL free function queries test -=//
811
//
912
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

0 commit comments

Comments
 (0)