Merge "Use the context variant of getNullStream" into amd-master-next

Tá an tiomantas seo le fáil i:
Saleel Kudchadker údaraithe agus Gerrit Code Review tiomanta 2020-02-25 13:03:22 -05:00
2 tuismitheoirí a8206e2e8f 631fd65be4
tiomantas 92b9a4466e
2 comhad athraithe
+6 -2

Níor tháinig aon chomhaid le do chuardach

+1
Féach ar an gComhad
@@ -103,6 +103,7 @@ amd::HostQueue* getNullStream(Device& dev) {
}
return stream->second;
}
amd::HostQueue* getNullStream(amd::Context& ctx) {
for (auto& it : g_nullStreams) {
if (it.first->asContext() == &ctx) {
+5 -2
Féach ar an gComhad
@@ -224,8 +224,11 @@ hipError_t hipFree(void* ptr) {
}
if (amd::SvmBuffer::malloced(ptr)) {
hip::syncStreams();
for (size_t i=0; i<g_devices.size(); ++i) {
hip::getNullStream(*g_devices[i])->finish();
for (auto& dev : g_devices) {
amd::HostQueue* queue = hip::getNullStream(*dev->asContext());
if (queue != nullptr) {
queue->finish();
}
}
amd::SvmBuffer::free(*hip::getCurrentDevice()->asContext(), ptr);
HIP_RETURN(hipSuccess);