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
Este commit está contenido en:
Ioannis Assiouras
2024-09-09 15:30:50 +01:00
padre d81c5d3d7f
commit bcc545e6b8
Se han modificado 4 ficheros con 31 adiciones y 4 borrados
+3 -4
Ver fichero
@@ -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