diff --git a/sycl/plugins/unified_runtime/CMakeLists.txt b/sycl/plugins/unified_runtime/CMakeLists.txt index 30e2ed163b86e..9b806cfe1e9c4 100644 --- a/sycl/plugins/unified_runtime/CMakeLists.txt +++ b/sycl/plugins/unified_runtime/CMakeLists.txt @@ -57,13 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT) include(FetchContent) set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git") - # commit fe5bc760d0a9fa28247d3f0b57c20114f02eda49 - # Merge: 47af3ee2 3e1f1636 + # commit 67e7da33596c597ef79d940223d372583a78bb2b + # Merge: 9b1fb4e9 f0e0be24 # Author: Kenneth Benzie (Benie) - # Date: Fri Dec 1 11:21:41 2023 +0000 - # Merge pull request #1102 from hdelan/adapter-batch1 - # [HIP] Adapter PR batch - set(UNIFIED_RUNTIME_TAG fe5bc760d0a9fa28247d3f0b57c20114f02eda49) + # Date: Tue Dec 5 10:46:45 2023 +0000 + # Merge pull request #999 from hdelan/hip-adapter-multi-dev-ctx + # [HIP] Hip adapter multi dev ctx + set(UNIFIED_RUNTIME_TAG 67e7da33596c597ef79d940223d372583a78bb2b) if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO) set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}") diff --git a/sycl/plugins/unified_runtime/ur/ur.hpp b/sycl/plugins/unified_runtime/ur/ur.hpp index 50d41e96042cc..7dbf33a1dc6d3 100644 --- a/sycl/plugins/unified_runtime/ur/ur.hpp +++ b/sycl/plugins/unified_runtime/ur/ur.hpp @@ -100,6 +100,7 @@ class ur_shared_mutex { // nop. class ur_mutex { std::mutex Mutex; + friend class ur_lock; public: void lock() { @@ -113,6 +114,17 @@ class ur_mutex { } }; +class ur_lock { + std::unique_lock Lock; + +public: + explicit ur_lock(ur_mutex &Mutex) { + if (!SingleThreadMode) { + Lock = std::unique_lock(Mutex.Mutex); + } + } +}; + /// SpinLock is a synchronization primitive, that uses atomic variable and /// causes thread trying acquire lock wait in loop while repeatedly check if /// the lock is available. diff --git a/sycl/test-e2e/Plugin/interop-buffer-hip.cpp b/sycl/test-e2e/Plugin/interop-buffer-hip.cpp deleted file mode 100644 index dd1cc4fd03b9e..0000000000000 --- a/sycl/test-e2e/Plugin/interop-buffer-hip.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// REQUIRES: hip - -// RUN: %{build} -o %t.out -// RUN: %{run} %t.out - -//==--- interop-buffer-hip.cpp - SYCL test for HIP buffer interop API ----------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#include - -int main() { - int Data[1] = {0}; - sycl::buffer Buffer(&Data[0], sycl::range<1>(1)); - { - sycl::queue Queue{sycl::gpu_selector_v}; - Queue.submit([&](sycl::handler &cgh) { - auto Acc = Buffer.get_access(cgh); - cgh.single_task([=]() { (void)Acc; }); - }); - } - - auto NativeObj = sycl::get_native(Buffer); - assert(NativeObj != 0); -}