mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 01:48:50 +08:00
fix: Fixed timeout resolution for zeCommandQueueSynchronize
According to Level Zero specification: timeout [in] if non-zero, then indicates the maximum time (in nanoseconds) to yield before returning ZE_RESULT_SUCCESS or ZE_RESULT_NOT_READY Related-To: NEO-8927 Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ce079c62d5
commit
1a00d96735
@@ -165,13 +165,13 @@ ze_result_t CommandQueueImp::synchronize(uint64_t timeout) {
|
||||
}
|
||||
}
|
||||
|
||||
ze_result_t CommandQueueImp::synchronizeByPollingForTaskCount(uint64_t timeout) {
|
||||
ze_result_t CommandQueueImp::synchronizeByPollingForTaskCount(uint64_t timeoutNanoseconds) {
|
||||
UNRECOVERABLE_IF(csr == nullptr);
|
||||
|
||||
auto taskCountToWait = getTaskCount();
|
||||
bool enableTimeout = true;
|
||||
int64_t timeoutMicroseconds = static_cast<int64_t>(timeout);
|
||||
if (timeout == std::numeric_limits<uint64_t>::max()) {
|
||||
int64_t timeoutMicroseconds = static_cast<int64_t>(timeoutNanoseconds / 1000);
|
||||
if (timeoutNanoseconds == std::numeric_limits<uint64_t>::max()) {
|
||||
enableTimeout = false;
|
||||
timeoutMicroseconds = NEO::TimeoutControls::maxTimeout;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user