Detect GPU hang in remaining calls of command queue and list

This change introduces checking of waits status in
CommandQueue and CommandList classes.

Related-To: NEO-6681
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
Patryk Wrobel
2022-04-08 14:38:10 +00:00
committed by Compute-Runtime-Automation
parent 9e7703a578
commit 19dded25ef
10 changed files with 281 additions and 16 deletions

View File

@@ -189,10 +189,19 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
}
return returnWaitForCompletionWithTimeout;
}
WaitStatus waitForCompletionWithTimeout(bool enableTimeout, int64_t timeoutMicroseconds, uint32_t taskCountToWait) {
return waitForCompletionWithTimeout(WaitParams{false, enableTimeout, timeoutMicroseconds}, taskCountToWait);
}
WaitStatus waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, QueueThrottle throttle) override {
if (waitForTaskCountWithKmdNotifyFallbackReturnValue.has_value()) {
return *waitForTaskCountWithKmdNotifyFallbackReturnValue;
}
return BaseClass::waitForTaskCountWithKmdNotifyFallback(taskCountToWait, flushStampToWait, useQuickKmdSleep, throttle);
}
void overrideCsrSizeReqFlags(CsrSizeRequestFlags &flags) { this->csrSizeRequestFlags = flags; }
GraphicsAllocation *getPreemptionAllocation() const { return this->preemptionAllocation; }
@@ -357,5 +366,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
bool shouldFailFlushBatchedSubmissions = false;
bool shouldFlushBatchedSubmissionsReturnSuccess = false;
WaitStatus returnWaitForCompletionWithTimeout = WaitStatus::Ready;
std::optional<WaitStatus> waitForTaskCountWithKmdNotifyFallbackReturnValue{};
};
} // namespace NEO