mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Check for GPU hang in path with wait for timestamps
Related-To: NEO-6868 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1ca5d57ab0
commit
0192e8038f
@@ -45,7 +45,6 @@ ze_result_t Fence::reset(bool signaled) {
|
||||
}
|
||||
|
||||
ze_result_t Fence::hostSynchronize(uint64_t timeout) {
|
||||
std::chrono::microseconds elapsedTimeSinceGpuHangCheck{0};
|
||||
std::chrono::high_resolution_clock::time_point waitStartTime, lastHangCheckTime, currentTime;
|
||||
uint64_t timeDiff = 0;
|
||||
ze_result_t ret = ZE_RESULT_NOT_READY;
|
||||
@@ -72,13 +71,8 @@ ze_result_t Fence::hostSynchronize(uint64_t timeout) {
|
||||
}
|
||||
|
||||
currentTime = std::chrono::high_resolution_clock::now();
|
||||
elapsedTimeSinceGpuHangCheck = std::chrono::duration_cast<std::chrono::microseconds>(currentTime - lastHangCheckTime);
|
||||
|
||||
if (elapsedTimeSinceGpuHangCheck.count() >= gpuHangCheckPeriod.count()) {
|
||||
lastHangCheckTime = currentTime;
|
||||
if (csr->isGpuHangDetected()) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
}
|
||||
if (csr->checkGpuHangDetected(currentTime, lastHangCheckTime)) {
|
||||
return ZE_RESULT_ERROR_DEVICE_LOST;
|
||||
}
|
||||
|
||||
if (timeout == std::numeric_limits<uint64_t>::max()) {
|
||||
|
||||
Reference in New Issue
Block a user