SWDEV-476929 - Introduce an activeQueues set
The new set tracks only the queues that have a command
submitted to them. This allows for fast iteration
in waitActiveStreams.
Change-Id: I2c832eefa01280d9a87a5f57874d36d2e9441de7
[ROCm/clr commit: bcc545e6b8]
This commit is contained in:
@@ -185,10 +185,9 @@ void Device::WaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stre
|
||||
waitForStream(null_stream_);
|
||||
}
|
||||
} else {
|
||||
amd::ScopedLock lock(streamSetLock);
|
||||
|
||||
for (const auto& active_stream : streamSet) {
|
||||
// If it's the current device
|
||||
auto activeQueues = blocking_stream->device().getActiveQueues();
|
||||
for (const auto& command : activeQueues) {
|
||||
hip::Stream* active_stream = static_cast<hip::Stream*>(command);
|
||||
if (// Make sure it's a default stream
|
||||
((active_stream->Flags() & hipStreamNonBlocking) == 0) &&
|
||||
// and it's not the current stream
|
||||
|
||||
Reference in New Issue
Block a user