Skip to content

Commit 2eabf06

Browse files
authored
[AsyncAlloc][CUDA] Use correct command enum for async alloc/free (#17926)
This commit fixes the incorrect enum use for event creation during async allocation and freeing.
1 parent 54501bf commit 2eabf06

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

unified-runtime/source/adapters/cuda/async_alloc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMDeviceAllocExp(
3333
phEventWaitList));
3434

3535
if (phEvent) {
36-
RetImplEvent =
37-
std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeNative(
38-
UR_COMMAND_KERNEL_LAUNCH, hQueue, CuStream, StreamToken));
36+
RetImplEvent = std::unique_ptr<ur_event_handle_t_>(
37+
ur_event_handle_t_::makeNative(UR_COMMAND_ENQUEUE_USM_DEVICE_ALLOC_EXP,
38+
hQueue, CuStream, StreamToken));
3939
UR_CHECK_ERROR(RetImplEvent->start());
4040
}
4141

@@ -93,7 +93,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMFreeExp(
9393
if (phEvent) {
9494
RetImplEvent =
9595
std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeNative(
96-
UR_COMMAND_KERNEL_LAUNCH, hQueue, CuStream, StreamToken));
96+
UR_COMMAND_ENQUEUE_USM_FREE_EXP, hQueue, CuStream, StreamToken));
9797
UR_CHECK_ERROR(RetImplEvent->start());
9898
}
9999

0 commit comments

Comments
 (0)