We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cabf128 + e316c04 commit d155388Copy full SHA for d155388
source/adapters/native_cpu/context.hpp
@@ -109,8 +109,9 @@ struct ur_context_handle_t_ : RefCounted {
109
return UR_RESULT_SUCCESS;
110
}
111
112
- const native_cpu::usm_alloc_info &
113
- get_alloc_info_entry(const void *ptr) const {
+ // Note this is made non-const to access the mutex
+ const native_cpu::usm_alloc_info &get_alloc_info_entry(const void *ptr) {
114
+ std::lock_guard<std::mutex> lock(alloc_mutex);
115
auto it = allocations.find(ptr);
116
if (it == allocations.end()) {
117
return native_cpu::usm_alloc_info_null_entry;
0 commit comments