diff --git a/tinygrad/viz/js/index.js b/tinygrad/viz/js/index.js index 62de6cff9c..4ca5f10105 100644 --- a/tinygrad/viz/js/index.js +++ b/tinygrad/viz/js/index.js @@ -264,7 +264,7 @@ function timeAtCycle(clk) { let cur = data.instSt, ns = 0, freq = null; // walk through all frequency changes and accumulate time in nanoseconds for (const [s, v] of data.tracks.get("Shader Clock").valueMap) { - if (freq != null && cur < s) { + if (freq != null && freq > 0 && cur < s) { const et = Math.min(clk, s); ns += (et - cur) * 1e9 / freq; cur = et; diff --git a/tinygrad/viz/serve.py b/tinygrad/viz/serve.py index d2c8d94338..ca7146afd7 100755 --- a/tinygrad/viz/serve.py +++ b/tinygrad/viz/serve.py @@ -388,7 +388,7 @@ def sqtt_timeline(data:bytes, lib:bytes, target:str) -> Generator[ProfileEvent, # barrier on this wave extends to fill the time it was waiting if wave is not None: if (barrier:=curr_barrier.pop(wave, None)) is not None: barrier.en = Decimal(p._time) - if name == "BARRIER": curr_barrier[wave] = e + if name in {"BARRIER", "BARRIER_SIGNAL"}: curr_barrier[wave] = e NS_PER_TICK = 10 # 100MHz prev_pair:tuple[int, int]|None = None # (shader, realtime) yield ProfilePointEvent("", "JSON", "waveColors", list(wave_colors.items()), ts=Decimal(0))