mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 15:38:29 -05:00
viz: exclude comma in register highlight (#14078)
* viz: exclude comma in register highlight * simplify
This commit is contained in:
@@ -93,7 +93,7 @@ const drawGraph = (data) => {
|
||||
}
|
||||
return [ret];
|
||||
}).join("text").style("font-family", g.graph().font).selectAll("tspan").data(d => d).join("tspan").attr("x", "0").attr("dy", g.graph().lh)
|
||||
.selectAll("tspan").data(d => d).join("tspan").attr("dx", (d, i) => i > 0 ? textSpace: 0).text(d => d.st).attr("xml:space", "preserve")
|
||||
.selectAll("tspan").data(d => d).join("tspan").attr("dx", (d, i) => i > 0 && d.st !== "," ? textSpace: 0).text(d => d.st).attr("xml:space", "preserve")
|
||||
.classed("token", true).attr("fill", d => typeof d.color === "string" ? d.color : colorScale(d.color));
|
||||
const tokensBg = rectGroup.selectAll("rect.bg").data((d, i, nodes) => {
|
||||
const ret = [];
|
||||
|
||||
@@ -434,7 +434,7 @@ def amdgpu_cfg(lib:bytes, target:int) -> dict:
|
||||
elif nx in leaders: paths[curr][nx] = UNCOND
|
||||
pc_tokens:dict[int, list[dict]] = {}
|
||||
for pc, (text, _) in pc_table.items():
|
||||
pc_tokens[pc] = [{"st":s, "keys":amdgpu_tokenize(s.replace(",", "")) if i>0 else [s], "kind":int(i>0)} for i,s in enumerate(text.split(" "))]
|
||||
pc_tokens[pc] = [{"st":s, "keys":amdgpu_tokenize(s) if i>0 else [s], "kind":int(i>0)} for i,s in enumerate(text.replace(",", " , ").split(" "))]
|
||||
return {"data":{"blocks":blocks, "paths":paths, "colors":cfg_colors, "pc_tokens":pc_tokens}, "src":"\n".join(lines)}
|
||||
|
||||
# ** Main render function to get the complete details about a trace event
|
||||
|
||||
Reference in New Issue
Block a user