From 191ba18bc6a2fe8aa57c20f03b21e85442a93077 Mon Sep 17 00:00:00 2001 From: Keren Zhou Date: Fri, 8 Nov 2024 02:47:19 +0000 Subject: [PATCH] Update --- triton_viz/draw.py | 2 +- triton_viz/interface.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/triton_viz/draw.py b/triton_viz/draw.py index fda62c0..2d2aedf 100644 --- a/triton_viz/draw.py +++ b/triton_viz/draw.py @@ -139,7 +139,7 @@ def draw_record(x): dr = dr.center_xy() env = dr.get_envelope() dr = rectangle(env.width + 1, env.height + 1).fill_color(BG).center_xy() + dr - dr.render_svg(base, 2500) + dr.render(base, 2500) return env.width, env.height diff --git a/triton_viz/interface.py b/triton_viz/interface.py index 472f01d..034c70b 100644 --- a/triton_viz/interface.py +++ b/triton_viz/interface.py @@ -16,7 +16,7 @@ def launch(share=True): m[0] = max(k[0] + 1, m[0]) m[1] = max(k[1] + 1, m[1]) m[2] = max(k[2] + 1, m[2]) - w, h = triton_viz.draw_record(program_records[(0, 0, 0)], tt, "tmp.svg") + w, h = triton_viz.draw_record(program_records[(0, 0, 0)], tt, "tmp.png") size[0] = w size[1] = h height = 600 * size[1] / size[0] @@ -52,7 +52,7 @@ def launch(share=True): ) def cache_block(idx): - name = tempfile.NamedTemporaryFile(suffix=".svg") + name = tempfile.NamedTemporaryFile(suffix=".png") w, h = triton_viz.draw_record(program_records[idx], tt, name.name) size[0] = w size[1] = h