diff --git a/sycl/plugins/cuda/pi_cuda.hpp b/sycl/plugins/cuda/pi_cuda.hpp index 8d7036cc59733..7b5163bf15344 100644 --- a/sycl/plugins/cuda/pi_cuda.hpp +++ b/sycl/plugins/cuda/pi_cuda.hpp @@ -201,15 +201,9 @@ struct _pi_context { bool is_primary() const noexcept { return kind_ == kind::primary; } - pi_uint32 increment_reference_count() noexcept { - std::lock_guard guard(mutex_); - return ++refCount_; - } + pi_uint32 increment_reference_count() noexcept { return ++refCount_; } - pi_uint32 decrement_reference_count() noexcept { - std::lock_guard guard(mutex_); - return --refCount_; - } + pi_uint32 decrement_reference_count() noexcept { return --refCount_; } pi_uint32 get_reference_count() const noexcept { return refCount_; }