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