File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,9 +108,8 @@ urContextRetain(ur_context_handle_t hContext) {
108
108
return UR_RESULT_SUCCESS;
109
109
}
110
110
111
- UR_APIEXPORT ur_result_t UR_APICALL
112
- urContextGetNativeHandle ([[maybe_unused]] ur_context_handle_t hContext,
113
- ur_native_handle_t *phNativeContext) {
111
+ UR_APIEXPORT ur_result_t UR_APICALL urContextGetNativeHandle (
112
+ ur_context_handle_t hContext, ur_native_handle_t *phNativeContext) {
114
113
// FIXME: this entry point has been deprecated in the SYCL RT and should be
115
114
// changed to unsupported once the deprecation period has elapsed
116
115
// The below is extremely dodgy but is the equivalent for what went before
@@ -121,7 +120,8 @@ urContextGetNativeHandle([[maybe_unused]] ur_context_handle_t hContext,
121
120
// for cuda compatibility only and are deprecated by HIP.
122
121
123
122
hipCtx_t *Ctx = nullptr ;
124
- UR_CHECK_ERROR (hipCtxGetCurrent (Ctx));
123
+ UR_CHECK_ERROR (
124
+ hipDevicePrimaryCtxRetain (Ctx, hContext->getDevices ()[0 ]->get ()));
125
125
*phNativeContext = reinterpret_cast <ur_native_handle_t >(Ctx);
126
126
return UR_RESULT_SUCCESS;
127
127
}
You can’t perform that action at this time.
0 commit comments