From 83a8217cbf36f663cdfd0aa08c91c5349f21c01a Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:10:15 -0500 Subject: [PATCH] hotfix: TRACK_MATCH_STATS=2 should not launch viz [pr] (#8543) --- tinygrad/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/ops.py b/tinygrad/ops.py index 21165dfc01..37c9bec1f6 100644 --- a/tinygrad/ops.py +++ b/tinygrad/ops.py @@ -854,7 +854,7 @@ if TRACK_MATCH_STATS: with open(fn:=temp("rewrites.pkl"), "wb") as f: print(f"rewrote {len(tracked_ctxs)} graphs and matched {sum(len(r.matches) for x in tracked_ctxs for r in x)} times, saved to {fn}") with Context(PICKLE_BUFFERS=0): pickle.dump((tracked_keys, tracked_ctxs), f) - launch_viz("VIZ", temp("rewrites.pkl")) + if getenv("VIZ"): launch_viz("VIZ", temp("rewrites.pkl")) if getenv("PRINT_MATCH_STATS", 1): ret = [0,0,0.0,0.0] for k,v in sorted(list(match_stats.items()), key=lambda x: x[1][2]+x[1][3]):