SWDEV-300471 - updated hipFree to wait for all streams to finish

Change-Id: I4983ef48a9e720ed03128d83a8d23ad11024fd8f


[ROCm/clr commit: c9d9fd992a]
Этот коммит содержится в:
anusha GodavarthySurya authored and Anusha Godavarthy Surya committed 2021-09-02 00:45:24 -04:00
1 родитель 00bce2cfc2
Коммит 64799f183f
5 files changed
+21 -5

No files matched your search

+4 -2
Просмотреть файл
@@ -148,11 +148,13 @@ int Stream::DeviceId(const hipStream_t hStream) {
return deviceId;
}
void Stream::syncNonBlockingStreams() {
void Stream::syncNonBlockingStreams(int deviceId) {
amd::ScopedLock lock(streamSetLock);
for (auto& it : streamSet) {
if (it->Flags() & hipStreamNonBlocking) {
it->asHostQueue()->finish();
if (deviceId == -1 || it->DeviceId() == deviceId) {
it->asHostQueue()->finish();
}
}
}
}