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) {
108108 return UR_RESULT_SUCCESS;
109109}
110110
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) {
114113 // FIXME: this entry point has been deprecated in the SYCL RT and should be
115114 // changed to unsupported once the deprecation period has elapsed
116115 // 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,
121120 // for cuda compatibility only and are deprecated by HIP.
122121
123122 hipCtx_t *Ctx = nullptr ;
124- UR_CHECK_ERROR (hipCtxGetCurrent (Ctx));
123+ UR_CHECK_ERROR (
124+ hipDevicePrimaryCtxRetain (Ctx, hContext->getDevices ()[0 ]->get ()));
125125 *phNativeContext = reinterpret_cast <ur_native_handle_t >(Ctx);
126126 return UR_RESULT_SUCCESS;
127127}
You can’t perform that action at this time.
0 commit comments