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 cometimento está contido em:
Ioannis Assiouras cometeu 2024-09-16 15:53:49 -04:00
1 ascendente d81c5d3d7f
cometimento bcc545e6b8
4 ficheiros modificados
+31 -4

Não existem ficheiros que correspondam à sua pesquisa

+3 -4
Ver ficheiro
@@ -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