SWDEV-295275 - Check HW event

Change-Id: I23dfe5626f38b13fbdb6478ab12a0122b03e4a98
This commit is contained in:
Saleel Kudchadker
2021-08-27 09:07:38 -07:00
parent 3f1cb97306
commit 6f71170772
+8 -1
View File
@@ -212,8 +212,15 @@ void iHipWaitActiveStreams(amd::HostQueue* blocking_queue, bool wait_null_stream
// Get the last valid command
amd::Command* command = active_queue->getLastQueuedCommand(true);
if (command != nullptr) {
amd::Event& event = command->event();
// Check HW status of the ROCcrl event.
// Note: not all ROCclr modes support HW status
bool ready = active_queue->device().IsHwEventReady(event);
if (!ready) {
ready = (command->status() == CL_COMPLETE);
}
// Check the current active status
if (command->status() != CL_COMPLETE) {
if (!ready) {
command->notifyCmdQueue();
eventWaitList.push_back(command);
} else {