File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 17
17
18
18
#include < cassert>
19
19
#include < cuda.h>
20
- #include < memory>
21
20
22
21
ur_event_handle_t_::ur_event_handle_t_ (ur_command_t Type,
23
22
ur_context_handle_t Context,
@@ -295,17 +294,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventCreateWithNativeHandle(
295
294
296
295
std::unique_ptr<ur_event_handle_t_> EventPtr{nullptr };
297
296
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));
309
299
310
300
return UR_RESULT_SUCCESS;
311
301
}
You can’t perform that action at this time.
0 commit comments