diff --git a/tinygrad/viz/js/index.js b/tinygrad/viz/js/index.js index 81a0ea0da1..56f9b1a494 100644 --- a/tinygrad/viz/js/index.js +++ b/tinygrad/viz/js/index.js @@ -375,8 +375,10 @@ async function renderProfiler(path, unit, opts) { if (shapeRef != null) { ref = {ctx:e.ref, step:0}; shapeRef = ref; } else if (ref != null) { const start = ref.step>0 ? ref.step+1 : 0; - const stepIdx = ctxs[ref.ctx+1].steps.findIndex((s, i) => i >= start && s.name == e.name); - if (stepIdx !== -1) { ref.step = stepIdx; shapeRef = ref; } + const steps = ctxs[ref.ctx+1].steps; + for (let si=start; si