Skip to content

Commit

Permalink
Remove old test, add ur_lock and update UR SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
hdelan committed Nov 17, 2023
1 parent 3cb5c51 commit f977a75
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 37 deletions.
10 changes: 2 additions & 8 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,8 @@ endif()
if(SYCL_PI_UR_USE_FETCH_CONTENT)
include(FetchContent)

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit 659d3f469faa99a886fa680a3d6d20449b109578
# Merge: 192e9404 f94550b4
# Author: Kenneth Benzie (Benie) <[email protected]>
# Date: Tue Nov 14 16:45:24 2023 +0000
# Merge pull request #1059 from martygrant/martin/moveNativeCPUAdapterToUR
# [NATIVECPU] Move Native CPU adapter to UR.
set(UNIFIED_RUNTIME_TAG 659d3f469faa99a886fa680a3d6d20449b109578)
set(UNIFIED_RUNTIME_REPO "https://github.com/hdelan/unified-runtime.git")
set(UNIFIED_RUNTIME_TAG ornl-m2)

if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")
Expand Down
12 changes: 12 additions & 0 deletions sycl/plugins/unified_runtime/ur/ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class ur_shared_mutex {
// nop.
class ur_mutex {
std::mutex Mutex;
friend class ur_lock;

public:
void lock() {
Expand All @@ -113,6 +114,17 @@ class ur_mutex {
}
};

class ur_lock {
std::unique_lock<std::mutex> Lock;

public:
explicit ur_lock(ur_mutex &Mutex) {
if (!SingleThreadMode) {
Lock = std::unique_lock<std::mutex>(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.
Expand Down
29 changes: 0 additions & 29 deletions sycl/test-e2e/Plugin/interop-buffer-hip.cpp

This file was deleted.

0 comments on commit f977a75

Please sign in to comment.