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


[ROCm/clr commit: dd8265fc87]
This commit is contained in:
German Andryeyev
2021-06-10 20:30:32 -04:00
parent f1c64a7ace
commit 08611a1fe4
2 changed files with 21 additions and 6 deletions
+6 -1
View File
@@ -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);
}