Skip to content

Commit

Permalink
misc: chore: gpu: Lower default Syncpoint wait timeout from 1 second …
Browse files Browse the repository at this point in the history
…to 500ms
  • Loading branch information
GreemDev committed Feb 1, 2025
1 parent 2c9a26c commit 9f94aa1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ public bool WaitOnSyncpoint(uint id, uint threshold, TimeSpan timeout)
// TODO: Remove this when GPU channel scheduling will be implemented.
if (timeout == Timeout.InfiniteTimeSpan)
{
timeout = TimeSpan.FromSeconds(1);
timeout = TimeSpan.FromMilliseconds(500);
}

using ManualResetEvent waitEvent = new(false);
SyncpointWaiterHandle info = _syncpoints[id].RegisterCallback(threshold, (x) => waitEvent.Set());
SyncpointWaiterHandle info = _syncpoints[id].RegisterCallback(threshold, _ => waitEvent.Set());

if (info == null)
{
Expand All @@ -96,7 +96,7 @@ public bool WaitOnSyncpoint(uint id, uint threshold, TimeSpan timeout)

bool signaled = waitEvent.WaitOne(timeout);

if (!signaled && info != null)
if (!signaled)
{
Logger.Error?.Print(LogClass.Gpu, $"Wait on syncpoint {id} for threshold {threshold} took more than {timeout.TotalMilliseconds}ms, resuming execution...");

Expand Down

0 comments on commit 9f94aa1

Please sign in to comment.