mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
fix: add microsecond resolution for timeout
Related-To: NEO-13445 Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c19df80bd8
commit
8151224501
@@ -171,7 +171,8 @@ ze_result_t CommandQueueImp::synchronizeByPollingForTaskCount(uint64_t timeoutNa
|
||||
|
||||
auto taskCountToWait = getTaskCount();
|
||||
bool enableTimeout = true;
|
||||
int64_t timeoutMicroseconds = static_cast<int64_t>(timeoutNanoseconds / 1000);
|
||||
auto microsecondResolution = device->getNEODevice()->getMicrosecondResolution();
|
||||
int64_t timeoutMicroseconds = static_cast<int64_t>(timeoutNanoseconds / microsecondResolution);
|
||||
if (timeoutNanoseconds == std::numeric_limits<uint64_t>::max()) {
|
||||
enableTimeout = false;
|
||||
timeoutMicroseconds = NEO::TimeoutControls::maxTimeout;
|
||||
|
||||
Reference in New Issue
Block a user