Remove extra barriers

Don't flush current batch if the dependent wait is a nop

Change-Id: I8a8722b9011fe042c1a4ce195938290fc75e7c86


[ROCm/clr commit: c18892a590]
Tá an tiomantas seo le fáil i:
German Andryeyev tiomanta 2020-06-22 12:41:02 -04:00
1 tuismitheoir b7801b2035
tiomantas ebe5c3d381
1 comhad athraithe
+6 -3
+6 -3
Féach ar an gComhad
@@ -140,9 +140,12 @@ void HostQueue::loop(device::VirtualDevice* virtualDevice) {
for (const auto& it : events) {
// Only wait if the command is enqueued into another queue.
if (it->command().queue() != this) {
virtualDevice->flush(head, true);
tail = head = NULL;
dependencyFailed |= !it->awaitCompletion();
// Runtime has to flush the current batch only if the dependent wait is blocking
if (it->command().status() != CL_COMPLETE) {
virtualDevice->flush(head, true);
tail = head = NULL;
dependencyFailed |= !it->awaitCompletion();
}
}
}