Skip to content

[SYCL] [L0 PI] Added an assert to piEnqueueKernelLaunch() when the GlobalWorkOffset!=0. #2410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 22, 2020
5 changes: 5 additions & 0 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2844,6 +2844,11 @@ piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim,
assert(Kernel);
assert(Queue);
assert((WorkDim > 0) && (WorkDim < 4));
if (GlobalWorkOffset != NULL) {
for (pi_uint32 i = 0; i < WorkDim; i++) {
assert(GlobalWorkOffset[i] == 0);
}
}

ze_group_count_t ZeThreadGroupDimensions{1, 1, 1};
uint32_t WG[3];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out

// TODO: Support global work offset on Level Zero.
// XFAIL: level_zero

//==- free_function_queries.cpp - SYCL free function queries test -=//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Expand Down