SWDEV-518831 - fix streams' sync issue in mthreads (#123)

* SWDEV-518831 - fix streams' sync issue in mthreads

1. Fix sync issue of null stream and non-null streams in
multithreads.
2. Remove assert(GetSubmissionBatch() == nullptr) as it
is invalid in multithreads.
3. Update getActiveQueues() to deal with the state of 
being terminated.

[ROCm/clr commit: 27aad09bd4]
This commit is contained in:
Sang, Tao
2025-04-23 15:08:07 -04:00
committed by GitHub
parent 45b75013ec
commit 60110b6c01
4 changed files with 18 additions and 4 deletions
+1
View File
@@ -201,6 +201,7 @@ void Device::WaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stre
// Get the last valid command
waitForStream(active_stream);
}
command->release();
}
}
+1
View File
@@ -73,6 +73,7 @@ bool Stream::Create() {
// ================================================================================================
void Stream::Destroy(hip::Stream* stream, bool forceDestroy) {
stream->device().removeFromActiveQueues(stream);
stream->device_->RemoveStream(stream);
stream->SetForceDestroy(forceDestroy);
stream->release();