From c61fe57cfda53c5318ff502a892471e22b16657b Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Fri, 27 Feb 2026 01:25:39 +0800 Subject: [PATCH] =?UTF-8?q?viz:=20fix=20n=C2=B2=20tiny=20device=20linking?= =?UTF-8?q?=20in=20profiler=20(#15028)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tinygrad/viz/js/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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