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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user