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
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user