hip-issue-3876 : Take into account thread-local capture mode in checks for valid capture (#2177)
This commit is contained in:
committed by
GitHub
vanhempi
15c82d6da8
commit
59aa56a340
@@ -153,12 +153,14 @@ bool Stream::StreamCaptureOngoing(hipStream_t hStream) {
|
||||
return false;
|
||||
}
|
||||
// If any stream in current/concurrent thread is capturing in global mode
|
||||
amd::ScopedLock lock(g_captureStreamsLock);
|
||||
if (!g_captureStreams.empty()) {
|
||||
for (auto stream : hip::g_captureStreams) {
|
||||
stream->SetCaptureStatus(hipStreamCaptureStatusInvalidated);
|
||||
if (hip::tls.stream_capture_mode_ == hipStreamCaptureModeGlobal) {
|
||||
amd::ScopedLock lock(g_captureStreamsLock);
|
||||
if (!g_captureStreams.empty()) {
|
||||
for (auto stream : hip::g_captureStreams) {
|
||||
stream->SetCaptureStatus(hipStreamCaptureStatusInvalidated);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// If any stream in current thread is capturing in ThreadLocal mode
|
||||
if (!hip::tls.capture_streams_.empty()) {
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user