Skip to content

Commit decf553

Browse files
committed
[NATIVECPU] added event handling to urEnqueueUSMPrefetch
1 parent 0f186f6 commit decf553

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

unified-runtime/source/adapters/native_cpu/enqueue.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMMemcpy(
601601
}
602602

603603
UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
604-
ur_queue_handle_t /*hQueue*/, const void * /*pMem*/, size_t /*size*/,
605-
ur_usm_migration_flags_t /*flags*/, uint32_t /*numEventsInWaitList*/,
606-
const ur_event_handle_t * /*phEventWaitList*/,
607-
ur_event_handle_t * /*phEvent*/) {
604+
ur_queue_handle_t hQueue, const void * /*pMem*/, size_t /*size*/,
605+
ur_usm_migration_flags_t /*flags*/, uint32_t numEventsInWaitList,
606+
const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) {
608607

609608
// TODO: properly implement USM prefetch
610-
return UR_RESULT_SUCCESS;
609+
return withTimingEvent(UR_COMMAND_USM_PREFETCH, hQueue, numEventsInWaitList,
610+
phEventWaitList, phEvent,
611+
[]() { return UR_RESULT_SUCCESS; });
611612
}
612613

613614
UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMAdvise(

0 commit comments

Comments
 (0)