Skip to content

Commit 843a961

Browse files
committed
record
1 parent c6afa75 commit 843a961

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sycl/source/detail/device_global_map_entry.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ DeviceGlobalMapEntry::getOrAllocateDeviceGlobalUSM(queue_impl &QueueImpl) {
7575
assert(NewAllocIt.second &&
7676
"USM allocation for device and context already happened.");
7777
DeviceGlobalUSMMem &NewAlloc = NewAllocIt.first->second;
78+
NewAlloc.MAllocatingContext = CtxImpl.shared_from_this();
7879

7980
// Initialize here and save the event.
8081
{
@@ -132,6 +133,7 @@ DeviceGlobalMapEntry::getOrAllocateDeviceGlobalUSM(const context &Context) {
132133
assert(NewAllocIt.second &&
133134
"USM allocation for device and context already happened.");
134135
DeviceGlobalUSMMem &NewAlloc = NewAllocIt.first->second;
136+
NewAlloc.MAllocatingContext = CtxImpl.shared_from_this();
135137

136138
if (MDeviceGlobalPtr) {
137139
// C++ guarantees members appear in memory in the order they are declared,

0 commit comments

Comments
 (0)