Detect GPU hang in remaining blocking calls of L0

This change introduces detection of GPU hangs in
zeEventHostSynchronize and zeFenceHostSynchronize.
Furthermore, if CommandQueueHw::executeCommandLists
uses ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS and hang occurs,
the information about it is propagated to the caller.

Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
Patryk Wrobel
2022-02-16 10:22:03 +00:00
committed by Compute-Runtime-Automation
parent 64b8de3c1d
commit 1275c4e200
11 changed files with 199 additions and 14 deletions

View File

@@ -462,7 +462,10 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
csr->makeSurfacePackNonResident(csr->getResidencyAllocations());
if (getSynchronousMode() == ZE_COMMAND_QUEUE_MODE_SYNCHRONOUS) {
this->synchronize(std::numeric_limits<uint64_t>::max());
const auto synchronizeResult = this->synchronize(std::numeric_limits<uint64_t>::max());
if (synchronizeResult == ZE_RESULT_ERROR_DEVICE_LOST) {
return ZE_RESULT_ERROR_DEVICE_LOST;
}
}
this->heapContainer.clear();