Skip to content

Commit 0a0d71d

Browse files
committed
Fix update validation for L0 and OpenCL
1 parent 165c448 commit 0a0d71d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/adapters/level_zero/command_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ ur_result_t validateCommandDesc(
13721372
logger::debug("Mutable features supported by device {}", SupportedFeatures);
13731373

13741374
// Kernel handle updates are not yet supported.
1375-
if (CommandDesc->hNewKernel != Command->Kernel) {
1375+
if (CommandDesc->hNewKernel && CommandDesc->hNewKernel != Command->Kernel) {
13761376
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
13771377
}
13781378

source/adapters/opencl/command_buffer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
547547
*pUpdateKernelLaunch) {
548548

549549
// Kernel handle updates are not yet supported.
550-
if (pUpdateKernelLaunch->hNewKernel != hCommand->Kernel) {
550+
if (pUpdateKernelLaunch->hNewKernel &&
551+
pUpdateKernelLaunch->hNewKernel != hCommand->Kernel) {
551552
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
552553
}
553554

0 commit comments

Comments
 (0)