feature: Add hang detection support for zeDeviceGetStatus

Added hang detection for zeDeviceGetStatus API.
Added ULT for hang detection for zeDeviceGetStatus API.

Related-To: LOCI-1558

Signed-off-by: Zhang, Winston <winston.zhang@intel.com>
This commit is contained in:
Zhang, Winston
2023-07-17 17:52:20 +00:00
committed by Compute-Runtime-Automation
parent 0a4d0917d4
commit 2a41ace67e
2 changed files with 22 additions and 0 deletions

View File

@@ -78,6 +78,13 @@ ze_result_t DeviceImp::getStatus() {
if (this->resourcesReleased) {
return ZE_RESULT_ERROR_DEVICE_LOST;
}
auto engines = neoDevice->getAllEngines();
for (auto engine : engines) {
auto csr = engine.commandStreamReceiver;
if (csr->isGpuHangDetected()) {
return ZE_RESULT_ERROR_DEVICE_LOST;
}
}
return ZE_RESULT_SUCCESS;
}