Skip to content

Commit

Permalink
merian-nodes: Graph: low latency: ignore GPU boundness
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Aug 12, 2024
1 parent 9bcded8 commit f76c59f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/merian-nodes/graph/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,9 @@ class Graph : public std::enable_shared_from_this<Graph<RING_SIZE>> {
InFlightData& in_flight_data = ring_fences.next_cycle_wait_get();
gpu_wait_time = gpu_wait_time * 0.9 + sw_gpu_wait.duration() * 0.1;

// last pred: gpu_time > cpu_time
const auto total_wait =
std::max((gpu_wait_time + external_wait_time + cpu_sleep_time - 0.1ms), 0.1ms);
if (low_latency_mode && !needs_reconnect && (total_wait > time_delta - total_wait)) {
if (low_latency_mode && !needs_reconnect) {
const auto total_wait =
std::max((gpu_wait_time + external_wait_time + cpu_sleep_time - 0.1ms), 0.01ms);
cpu_sleep_time = 0.92 * total_wait;
std::this_thread::sleep_for(cpu_sleep_time);
} else {
Expand Down

0 comments on commit f76c59f

Please sign in to comment.