Skip to content

Commit

Permalink
Remove unrelated change in CUDA urEventCreateWithNativeHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeWeb committed Mar 8, 2024
1 parent fa10e63 commit 8f28dd2
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions source/adapters/cuda/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <cassert>
#include <cuda.h>
#include <memory>

ur_event_handle_t_::ur_event_handle_t_(ur_command_t Type,
ur_context_handle_t Context,
Expand Down Expand Up @@ -295,17 +294,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventCreateWithNativeHandle(

std::unique_ptr<ur_event_handle_t_> EventPtr{nullptr};

try {
EventPtr =
std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeWithNative(
hContext, reinterpret_cast<CUevent>(hNativeEvent)));
} catch (const std::bad_alloc &) {
return UR_RESULT_ERROR_OUT_OF_HOST_MEMORY;
} catch (...) {
return UR_RESULT_ERROR_UNKNOWN;
}

*phEvent = EventPtr.release();
*phEvent = ur_event_handle_t_::makeWithNative(
hContext, reinterpret_cast<CUevent>(hNativeEvent));

return UR_RESULT_SUCCESS;
}

0 comments on commit 8f28dd2

Please sign in to comment.