Skip to content

Commit 476dc4c

Browse files
Anusha GodavarthySuryaAnusha Godavarthy Surya
authored andcommitted
SWDEV-436126 - hipStreamDestroy to remove stream from capture list
Change-Id: Ie735f27b9c5df4faf39bd4be10fbe4401fd88cdb
1 parent 383ed4c commit 476dc4c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hipamd/src/hip_stream.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,13 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
496496
g_captureStreams.erase(g_it);
497497
}
498498
}
499+
{
500+
amd::ScopedLock lock(g_streamSetLock);
501+
const auto& g_it = std::find(g_allCapturingStreams.begin(), g_allCapturingStreams.end(), s);
502+
if (g_it != g_allCapturingStreams.end()) {
503+
g_allCapturingStreams.erase(g_it);
504+
}
505+
}
499506
const auto& l_it = std::find(hip::tls.capture_streams_.begin(),
500507
hip::tls.capture_streams_.end(), s);
501508
if (l_it != hip::tls.capture_streams_.end()) {

0 commit comments

Comments
 (0)