We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00ba5f1 commit 63d75dcCopy full SHA for 63d75dc
interfaces/sycl/Memory.cpp
@@ -51,10 +51,10 @@ void ConcreteAPI::freeMem(void* devPtr) {
51
}
52
53
// Use the first device context to free memory
54
- DeviceContext* context = this->availableDevices[0];
55
- if (!context)
+ DeviceContext* context = this->availableDevices[getDeviceId()];
+ if (!context){
56
return;
57
-
+ }
58
auto& map = context->memoryToSizeMap;
59
60
if (map.find(devPtr) == map.end()) {
0 commit comments