mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 23:18:04 -05:00
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import multiprocessing, pickle, difflib, os, threading, json, time, sys, webbrowser, socket, argparse, socketserver, functools, codecs, io, struct
|
||||
import subprocess, ctypes, pathlib
|
||||
from dataclasses import asdict
|
||||
from contextlib import redirect_stdout
|
||||
from decimal import Decimal
|
||||
from http.server import BaseHTTPRequestHandler
|
||||
@@ -197,7 +196,8 @@ def mem_layout(dev_events:list[tuple[int, int, float, DevEvent]], start_ts:int,
|
||||
def load_sqtt(profile:list[ProfileEvent]) -> None:
|
||||
from extra.sqtt.roc import decode
|
||||
rctx = decode(profile)
|
||||
steps = [{"name":x[0], "depth":0, "data":{"src":json.dumps({k:asdict(v) for k,v in x[1].items()}, indent=2), "lang":"txt", "device":"AMD"},
|
||||
steps = [{"name":x[0], "depth":0, "data":{"rows":[(e.inst, e.hit, e.lat, e.stall, str(e.typ).split("_")[-1]) for e in x[1].values()],
|
||||
"cols":["Instruction", "Hit Count", "Latency", "Stall", "Type"], "summary":[]},
|
||||
"query":f"/render?ctx={len(ctxs)}&step={i}&fmt=counters"} for i,x in enumerate(rctx.wave_events.items())]
|
||||
if steps: ctxs.append({"name":"Counters", "steps":steps})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user