From 8a6fb37560fd6f8df8ef89ca2b7b5093f910ff12 Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Sun, 18 May 2025 23:25:59 +0300 Subject: [PATCH] move viz /prof to extra [pr] (#10401) --- .../profiler.js => extra/profiler/index.html | 79 ++++++++++++++++++- tinygrad/viz/profiler.html | 77 ------------------ tinygrad/viz/serve.py | 2 +- 3 files changed, 79 insertions(+), 79 deletions(-) rename tinygrad/viz/js/profiler.js => extra/profiler/index.html (73%) delete mode 100644 tinygrad/viz/profiler.html diff --git a/tinygrad/viz/js/profiler.js b/extra/profiler/index.html similarity index 73% rename from tinygrad/viz/js/profiler.js rename to extra/profiler/index.html index da38b2edb5..637d02d19c 100644 --- a/tinygrad/viz/js/profiler.js +++ b/extra/profiler/index.html @@ -1,3 +1,78 @@ + + + + tinygrad profiler + + + + + + + + + + diff --git a/tinygrad/viz/profiler.html b/tinygrad/viz/profiler.html deleted file mode 100644 index f10a73c617..0000000000 --- a/tinygrad/viz/profiler.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - tinygrad profiler - - - - - - - - - - diff --git a/tinygrad/viz/serve.py b/tinygrad/viz/serve.py index d33952b26f..f241be0e6d 100755 --- a/tinygrad/viz/serve.py +++ b/tinygrad/viz/serve.py @@ -135,7 +135,7 @@ class Handler(BaseHTTPRequestHandler): def do_GET(self): ret, status_code, content_type = b"", 200, "text/html" - if (fn:={"/":"index", "/profiler":"perfetto", "/prof":"profiler"}.get((url:=urlparse(self.path)).path)): + if (fn:={"/":"index", "/profiler":"perfetto"}.get((url:=urlparse(self.path)).path)): with open(os.path.join(os.path.dirname(__file__), f"{fn}.html"), "rb") as f: ret = f.read() elif self.path.startswith(("/assets/", "/js/")) and '/..' not in self.path: try: