Skip to content

Commit 56ac261

Browse files
author
Georgi Mirazchiyski
committed
Remove unrelated change in CUDA urEventCreateWithNativeHandle
1 parent fa10e63 commit 56ac261

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

source/adapters/cuda/event.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include <cassert>
1919
#include <cuda.h>
20-
#include <memory>
2120

2221
ur_event_handle_t_::ur_event_handle_t_(ur_command_t Type,
2322
ur_context_handle_t Context,
@@ -295,17 +294,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventCreateWithNativeHandle(
295294

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

298-
try {
299-
EventPtr =
300-
std::unique_ptr<ur_event_handle_t_>(ur_event_handle_t_::makeWithNative(
301-
hContext, reinterpret_cast<CUevent>(hNativeEvent)));
302-
} catch (const std::bad_alloc &) {
303-
return UR_RESULT_ERROR_OUT_OF_HOST_MEMORY;
304-
} catch (...) {
305-
return UR_RESULT_ERROR_UNKNOWN;
306-
}
307-
308-
*phEvent = EventPtr.release();
297+
*phEvent = ur_event_handle_t_::makeWithNative(
298+
hContext, reinterpret_cast<CUevent>(hNativeEvent));
309299

310300
return UR_RESULT_SUCCESS;
311301
}

0 commit comments

Comments
 (0)