@@ -108,22 +108,14 @@ urContextRetain(ur_context_handle_t hContext) {
108
108
return UR_RESULT_SUCCESS;
109
109
}
110
110
111
+ // urContextGetNativeHandle should not be implemented in the HIP backend.
112
+ // hipCtx_t is not natively supported by amd devices, and more importantly does
113
+ // not map to ur_context_handle_t in any way.
111
114
UR_APIEXPORT ur_result_t UR_APICALL urContextGetNativeHandle (
112
115
ur_context_handle_t hContext, ur_native_handle_t *phNativeContext) {
113
- // FIXME: this entry point has been deprecated in the SYCL RT and should be
114
- // changed to unsupported once the deprecation period has elapsed
115
- // The below is extremely dodgy but is the equivalent for what went before
116
- // for continuity: apparently some users may be somehow using this API
117
- // currently, despite it not being well defined. This API should not have been
118
- // implemented in the HIP backend. hipCtx_t is not natively supported by amd
119
- // devices and is meaningless for our purposes; all hipCtx_t APIs were added
120
- // for cuda compatibility only and are deprecated by HIP.
121
-
122
- hipCtx_t *Ctx = nullptr ;
123
- UR_CHECK_ERROR (
124
- hipDevicePrimaryCtxRetain (Ctx, hContext->getDevices ()[0 ]->get ()));
125
- *phNativeContext = reinterpret_cast <ur_native_handle_t >(Ctx);
126
- return UR_RESULT_SUCCESS;
116
+ std::ignore = hContext;
117
+ std::ignore = phNativeContext;
118
+ return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
127
119
}
128
120
129
121
UR_APIEXPORT ur_result_t UR_APICALL urContextCreateWithNativeHandle (
0 commit comments