SWDEV-436126 - hipStreamDestroy to remove stream from capture list

Change-Id: Ie735f27b9c5df4faf39bd4be10fbe4401fd88cdb


[ROCm/clr commit: 476dc4c87c]
This commit is contained in:
Anusha GodavarthySurya
2024-03-11 13:19:11 +00:00
committato da Anusha Godavarthy Surya
parent 7de3d5a95a
commit ec391d7249
@@ -496,6 +496,13 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
g_captureStreams.erase(g_it);
}
}
{
amd::ScopedLock lock(g_streamSetLock);
const auto& g_it = std::find(g_allCapturingStreams.begin(), g_allCapturingStreams.end(), s);
if (g_it != g_allCapturingStreams.end()) {
g_allCapturingStreams.erase(g_it);
}
}
const auto& l_it = std::find(hip::tls.capture_streams_.begin(),
hip::tls.capture_streams_.end(), s);
if (l_it != hip::tls.capture_streams_.end()) {