From 12d179f5f4d3e3925d5ac07ea30dbc6df77f0559 Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:07:22 +0800 Subject: [PATCH] viz: brighter call.src[0] edge color (#15022) * work * 2 * better color --- tinygrad/viz/js/worker.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tinygrad/viz/js/worker.js b/tinygrad/viz/js/worker.js index 5e3134baba..1c1c00056d 100644 --- a/tinygrad/viz/js/worker.js +++ b/tinygrad/viz/js/worker.js @@ -59,7 +59,8 @@ const layoutUOp = (g, { graph, change }, opts) => { // add edges const edgeCounts = {}; for (const [_, s] of src) edgeCounts[s] = (edgeCounts[s] || 0)+1; - for (const [port, s] of src) g.setEdge(s, k, { label: edgeCounts[s] > 1 ? {type:"tag", text:edgeCounts[s]} : {type:"port", text:port}}); + for (const [port, s] of src) g.setEdge(s, k, { label: edgeCounts[s] > 1 ? {type:"tag", text:edgeCounts[s]} : {type:"port", text:port}, + ...(label.startsWith("CALL\n") && port === 0 && {color:"#a0a1b8"})}); if (change?.includes(parseInt(k))) g.setParent(k, "overlay"); } // optionally hide nodes from the layout