From c86ee5bfafee7d946989447fd4046b532e5133b2 Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Sat, 30 Aug 2025 18:12:30 +0300 Subject: [PATCH] viz: canonicalize device name colors (#11921) --- tinygrad/viz/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/viz/js/index.js b/tinygrad/viz/js/index.js index a20df1276a..059784f876 100644 --- a/tinygrad/viz/js/index.js +++ b/tinygrad/viz/js/index.js @@ -219,7 +219,7 @@ async function renderProfiler() { levels.push(et); } else levels[depth] = et; if (depth === 0) colorKey = e.name.split(" ")[0]; - if (!colorMap.has(colorKey)) colorMap.set(colorKey, cycleColors(colorScheme[k] ?? colorScheme.DEFAULT, colorMap.size)); + if (!colorMap.has(colorKey)) colorMap.set(colorKey, cycleColors(colorScheme[k.split(":")[0]] ?? colorScheme.DEFAULT, colorMap.size)); const fillColor = d3.color(colorMap.get(colorKey)).brighter(depth).toString(); const label = parseColors(e.name).map(({ color, st }) => ({ color, st, width:ctx.measureText(st).width })); if (e.ref != null) ref = {ctx:e.ref, step:0};