SWDEV-311271 - Make sure memory pool can accept default stream

Add lock protection for access to the pool list.
Remove destroyed stream from the list of the safe streams

Change-Id: I1863b89bd3f5e188c161227cc790c3adaf72cc58


[ROCm/clr commit: 5957ff9f7b]
Этот коммит содержится в:
German Andryeyev
2022-04-14 19:04:01 -04:00
родитель 5516c2d12e
Коммит 3de1a9e36c
6 изменённых файлов: 63 добавлений и 8 удалений
+2
Просмотреть файл
@@ -436,6 +436,8 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
}
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
s->GetDevice()->RemoveStreamFromPools(s);
amd::ScopedLock lock(g_captureStreamsLock);
const auto& g_it = std::find(g_captureStreams.begin(), g_captureStreams.end(), s);
if (g_it != g_captureStreams.end()) {