diff --git a/sycl/cmake/modules/FetchUnifiedRuntime.cmake b/sycl/cmake/modules/FetchUnifiedRuntime.cmake index 25bcc0a97d18c..ec6c1c5d7838b 100644 --- a/sycl/cmake/modules/FetchUnifiedRuntime.cmake +++ b/sycl/cmake/modules/FetchUnifiedRuntime.cmake @@ -117,13 +117,13 @@ if(SYCL_UR_USE_FETCH_CONTENT) endfunction() set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit 9ca3ec7a9c1d2f4a362d7e5add103b30271a8a55 - # Merge: 7384e2d7 59e5e405 - # Author: Piotr Balcer - # Date: Mon Sep 23 10:58:51 2024 +0200 - # Merge pull request #2113 from oneapi-src/revert-1698-counter-based-2 - # Revert "[L0] Phase 2 of Counter-Based Event Implementation" - set(UNIFIED_RUNTIME_TAG 9ca3ec7a9c1d2f4a362d7e5add103b30271a8a55) + # commit f5c907a0f74fd6729be5c2e137144f1a43f87111 + # Merge: 9ca3ec7 be38e567 + # Author: aarongreig + # Date: Mon Sep 23 08:27:12 2024 -0700 + # Merge pull request #1830 from JackAKirk/hip-set-device + # [hip] Remove deprecated hip APIs, simplify urContext + set(UNIFIED_RUNTIME_TAG f5c907a0f74fd6729be5c2e137144f1a43f87111) set(UMF_BUILD_EXAMPLES OFF CACHE INTERNAL "EXAMPLES") # Due to the use of dependentloadflag and no installer for UMF and hwloc we need diff --git a/sycl/include/sycl/backend.hpp b/sycl/include/sycl/backend.hpp index ff89a07a06cea..24750732b08ff 100644 --- a/sycl/include/sycl/backend.hpp +++ b/sycl/include/sycl/backend.hpp @@ -237,17 +237,16 @@ inline backend_return_t get_native< #if SYCL_EXT_ONEAPI_BACKEND_HIP template <> -__SYCL_DEPRECATED( - "Context interop is deprecated for HIP. If a native context is required," - " use hipDevicePrimaryCtxRetain with a native device") -inline backend_return_t get_native< - backend::ext_oneapi_hip, context>(const context &Obj) { +inline backend_return_t +get_native(const context &Obj) { if (Obj.get_backend() != backend::ext_oneapi_hip) { throw sycl::exception(make_error_code(errc::backend_mismatch), "Backends mismatch"); } - return reinterpret_cast>( - Obj.getNative()); + throw sycl::exception( + make_error_code(sycl::errc::feature_not_supported), + "Context interop is not supported for HIP. If a native context is " + "required, use hipDevicePrimaryCtxRetain with a native device"); } #endif // SYCL_EXT_ONEAPI_BACKEND_HIP diff --git a/sycl/test-e2e/Basic/interop/interop_all_backends.cpp b/sycl/test-e2e/Basic/interop/interop_all_backends.cpp index 7d018ba43f52d..c2bb68918d270 100644 --- a/sycl/test-e2e/Basic/interop/interop_all_backends.cpp +++ b/sycl/test-e2e/Basic/interop/interop_all_backends.cpp @@ -82,6 +82,15 @@ int main() { auto Event3 = InteropQueue.memcpy(&vec[0], A, N * sizeof(int), Event2); Event3.wait(); + if constexpr (BACKEND == backend::ext_oneapi_hip) { + try { + backend_traits::return_type NativeContext = + get_native(Context); + } catch (sycl::exception &e) { + assert(e.code() == sycl::errc::feature_not_supported); + } + } + free(A, InteropQueue); for (const auto &val : vec) { diff --git a/sycl/test/basic_tests/interop-hip.cpp b/sycl/test/basic_tests/interop-hip.cpp index 57fd7d436acb5..7deaf2956a3c1 100644 --- a/sycl/test/basic_tests/interop-hip.cpp +++ b/sycl/test/basic_tests/interop-hip.cpp @@ -1,6 +1,6 @@ // REQUIRES: hip -// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note -D__SYCL_INTERNAL_API %s +// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify %s +// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -D__SYCL_INTERNAL_API %s // Test for HIP interop API @@ -51,7 +51,7 @@ int main() { // backend-defined and specified in the backend specification. hip_device = get_native(Device); - // expected-warning@+1{{'get_native' is deprecated: Context interop is deprecated for HIP. If a native context is required, use hipDevicePrimaryCtxRetain with a native device}} + // expected-no-diagnostics hip_context = get_native(Context); hip_event = get_native(Event); hip_queue = get_native(Queue);