Detect GPU hang in evictUnusedAllocations()

This change introduces checking of the return value
of wait function in case of blocking version of
evictUnusedAllocations(). Furthermore, it propagates
the error to the callers. It contains also ULTs.

Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
Patryk Wrobel
2022-04-13 10:42:27 +00:00
committed by Compute-Runtime-Automation
parent 641851cc48
commit 352583b9d9
11 changed files with 86 additions and 16 deletions

View File

@@ -46,10 +46,23 @@ class TestedBufferObject : public BufferObject {
return BufferObject::exec(used, startOffset, flags, requiresCoherency, osContext, vmHandleId, drmContextId, residency, residencyCount, execObjectsStorage, completionGpuAddress, completionValue);
}
MemoryOperationsStatus evictUnusedAllocations(bool waitForCompletion, bool isLockNeeded) override {
if (callBaseEvictUnusedAllocations) {
return BufferObject::evictUnusedAllocations(waitForCompletion, isLockNeeded);
}
if (!waitForCompletion) {
return MemoryOperationsStatus::SUCCESS;
}
return MemoryOperationsStatus::GPU_HANG_DETECTED_DURING_OPERATION;
}
uint64_t receivedCompletionGpuAddress = 0;
drm_i915_gem_exec_object2 *execObjectPointerFilled = nullptr;
uint32_t receivedCompletionValue = 0;
uint32_t execCalled = 0;
bool callBaseEvictUnusedAllocations{true};
};
template <typename DrmClass>