This repository was archived by the owner on Jan 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,6 @@ static amd::Monitor g_hipInitlock{"hipInit lock"};
166166 if (hip::tls.capture_streams_ .size () != 0 ) { \
167167 HIP_RETURN (hipErrorStreamCaptureUnsupported); \
168168 } \
169- amd::ScopedLock lock (g_captureStreamsLock); \
170169 if (g_captureStreams.size () != 0 ) { \
171170 HIP_RETURN (hipErrorStreamCaptureUnsupported); \
172171 } \
Original file line number Diff line number Diff line change @@ -470,10 +470,12 @@ hipError_t hipStreamDestroy(hipStream_t stream) {
470470 }
471471 s->GetDevice ()->RemoveStreamFromPools (s);
472472
473- amd::ScopedLock lock (g_captureStreamsLock);
474- const auto & g_it = std::find (g_captureStreams.begin (), g_captureStreams.end (), s);
475- if (g_it != g_captureStreams.end ()) {
476- g_captureStreams.erase (g_it);
473+ {
474+ amd::ScopedLock lock (g_captureStreamsLock);
475+ const auto & g_it = std::find (g_captureStreams.begin (), g_captureStreams.end (), s);
476+ if (g_it != g_captureStreams.end ()) {
477+ g_captureStreams.erase (g_it);
478+ }
477479 }
478480 const auto & l_it = std::find (hip::tls.capture_streams_ .begin (),
479481 hip::tls.capture_streams_ .end (), s);
You can’t perform that action at this time.
0 commit comments