Skip to content

Commit d4a5b71

Browse files
authored
[SYCL][L0] Crash for program link API in level0 (#1871)
L0 RT does not support program link yet. So, we decided to crash in the L0 plugin. The user will see the appropriate error message upon crash.
1 parent 5c54a42 commit d4a5b71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sycl/plugins/level_zero/pi_level0.cpp

100755100644
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,6 +1755,7 @@ pi_result piProgramLink(pi_context Context, pi_uint32 NumDevices,
17551755
const pi_program *InputPrograms,
17561756
void (*PFnNotify)(pi_program Program, void *UserData),
17571757
void *UserData, pi_program *RetProgram) {
1758+
die("piProgramLink: Program Linking is not supported yet in Level0");
17581759

17591760
// TODO: L0 builds the program at the time of piProgramCreate.
17601761
// But build options are not available at that time, so we must
@@ -1836,6 +1837,7 @@ pi_result piProgramRetain(pi_program Program) {
18361837

18371838
pi_result piProgramRelease(pi_program Program) {
18381839
assert(Program);
1840+
assert((Program->RefCount > 0) && "Program is already released.");
18391841
if (--(Program->RefCount) == 0) {
18401842
// TODO: call zeModuleDestroy for non-interop L0 modules
18411843
delete Program;

0 commit comments

Comments
 (0)