From 2df8a3474eb58b48148e76b2abeaf88be48b9bec Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Thu, 27 Nov 2025 17:27:44 +0800 Subject: [PATCH] viz: bring back flops and mem in sidebar (#13467) --- 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 aca8700462..b511d99bca 100644 --- a/tinygrad/viz/js/index.js +++ b/tinygrad/viz/js/index.js @@ -202,8 +202,10 @@ function getMetadata(shape) { const e = track.shapes[idx]; const html = d3.create("div").classed("info", true); if (track.eventType === EventTypes.EXEC) { - html.append(() => tabulate([["Name", d3.create("p").html(e.arg.tooltipText.split("\n")[0]).node()], - ["Duration", formatTime(e.width)], ["Start Time", formatTime(e.x)]]).node()); + const [n, _, ...rest] = e.arg.tooltipText.split("\n"); + html.append(() => tabulate([["Name", d3.create("p").html(n).node()], ["Duration", formatTime(e.width)], ["Start Time", formatTime(e.x)]]).node()); + const group = html.append("div").classed("args", true); + for (const r of rest) group.append("p").text(r); if (e.arg.ctx != null) { const i = e.arg.ctx; s = e.arg.step; html.append("a").text(ctxs[i+1].steps[s].name).on("click", () => switchCtx(i, s));