Skip to content

Commit 9d6542b

Browse files
authored
Merge pull request oneapi-src#2655 from hvdijk/nativecpu-null-phevent
[NativeCPU] Handle null phEvent.
2 parents 0e6adfb + 04882ba commit 9d6542b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/adapters/native_cpu/enqueue.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,17 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunch(
244244
#endif // NATIVECPU_USE_OCK
245245
event->set_futures(futures);
246246

247-
*phEvent = event;
247+
if (phEvent) {
248+
*phEvent = event;
249+
}
248250
event->set_callback([hKernel, event]() {
249251
event->tick_end();
250252
// TODO: avoid calling clear() here.
251253
hKernel->_localArgInfo.clear();
252254
});
253255

254256
if (hQueue->isInOrder()) {
255-
urEventWait(1, phEvent);
257+
urEventWait(1, &event);
256258
}
257259

258260
return UR_RESULT_SUCCESS;

0 commit comments

Comments
 (0)