diff --git a/source/adapters/cuda/event.cpp b/source/adapters/cuda/event.cpp index 538e863520..586a6854f5 100644 --- a/source/adapters/cuda/event.cpp +++ b/source/adapters/cuda/event.cpp @@ -17,7 +17,6 @@ #include #include -#include ur_event_handle_t_::ur_event_handle_t_(ur_command_t Type, ur_context_handle_t Context, @@ -295,17 +294,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventCreateWithNativeHandle( std::unique_ptr EventPtr{nullptr}; - try { - EventPtr = - std::unique_ptr(ur_event_handle_t_::makeWithNative( - hContext, reinterpret_cast(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(hNativeEvent)); return UR_RESULT_SUCCESS; }