mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
viz: cycle time relative to kernel start in sidebar (#15352)
This commit is contained in:
@@ -300,7 +300,12 @@ function setFocus(key) {
|
||||
if (eventType === EventTypes.EXEC) {
|
||||
const [n, _, ...rest] = e.arg.tooltipText.split("\n");
|
||||
const tableData = [["Name", colored(e.arg.label)], ["Duration", formatTime(e.width)]];
|
||||
data.instSt != null ? tableData.push(["Start Cycle", formatTime(e.x)], ["Timestamp", timeAtCycle(e.x)]) : tableData.push(["Start Time", formatTime(e.x)]);
|
||||
if (data.instSt != null) {
|
||||
const p = d3.create("p");
|
||||
p.append("span").text(timeAtCycle(e.x));
|
||||
p.append("span").style("margin-left", "8px").style("color", "#f0f0f566").text(formatTime(e.x));
|
||||
tableData.push(["Cycle", formatTime(e.x-data.instSt)], ["Time", p.node()]);
|
||||
} else tableData.push(["Start Time", formatTime(e.x)]);
|
||||
html.append(() => tabulate(tableData));
|
||||
let group = html.append("div").classed("args", true);
|
||||
for (const r of rest) group.append("p").text(r);
|
||||
|
||||
Reference in New Issue
Block a user