SWDEV-290367 - Make sure HIP checks for GPU signal

Check GPU signal status for event before falling into CPU command
status validation

Change-Id: I66f15752d7dca550c0fa1a2252ec5a63817391c3
This commit is contained in:
German Andryeyev
2021-06-10 20:30:32 -04:00
rodzic 37be0e449a
commit dd8265fc87
2 zmienionych plików z 21 dodań i 6 usunięć
+6 -1
Wyświetl plik
@@ -421,7 +421,12 @@ hipError_t hipStreamQuery(hipStream_t stream) {
if (command->type() != 0) {
event.notifyCmdQueue();
}
hipError_t status = (command->status() == CL_COMPLETE) ? hipSuccess : hipErrorNotReady;
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status
bool ready = command->queue()->device().IsHwEventReady(event);
if (!ready) {
ready = (command->status() == CL_COMPLETE);
}
hipError_t status = ready ? hipSuccess : hipErrorNotReady;
command->release();
HIP_RETURN(status);
}