Skip to content

Commit e2af0d1

Browse files
Georgi Mirazchiyskiomarahmed1111
authored andcommitted
Remove unrelated change in CUDA urEventCreateWithNativeHandle
1 parent e525bc5 commit e2af0d1

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,
@@ -292,17 +291,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventCreateWithNativeHandle(
292291

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

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

307297
return UR_RESULT_SUCCESS;
308298
}

0 commit comments

Comments
 (0)