Skip to content

Commit 6f9e9a7

Browse files
authored
[SYCL][PI][L0] Add an assert to piEnqueueKernelLaunch() when the GlobalWorkOffset!=0 (#2593)
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 317974a commit 6f9e9a7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -2945,6 +2945,11 @@ piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim,
29452945
assert(Kernel);
29462946
assert(Queue);
29472947
assert((WorkDim > 0) && (WorkDim < 4));
2948+
if (GlobalWorkOffset != NULL) {
2949+
for (pi_uint32 i = 0; i < WorkDim; i++) {
2950+
assert(GlobalWorkOffset[i] == 0);
2951+
}
2952+
}
29482953

29492954
ze_group_count_t ZeThreadGroupDimensions{1, 1, 1};
29502955
uint32_t WG[3];

sycl/test/basic_tests/free_function_queries/free_function_queries.cpp

+3
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)