Skip to content

Commit 76fa942

Browse files
authored
Change svg to png format (#41)
1 parent 434fa20 commit 76fa942

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

triton_viz/draw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def draw_record(x):
139139
dr = dr.center_xy()
140140
env = dr.get_envelope()
141141
dr = rectangle(env.width + 1, env.height + 1).fill_color(BG).center_xy() + dr
142-
dr.render_svg(base, 2500)
142+
dr.render(base, 2500)
143143
return env.width, env.height
144144

145145

triton_viz/interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def launch(share=True):
1616
m[0] = max(k[0] + 1, m[0])
1717
m[1] = max(k[1] + 1, m[1])
1818
m[2] = max(k[2] + 1, m[2])
19-
w, h = triton_viz.draw_record(program_records[(0, 0, 0)], tt, "tmp.svg")
19+
w, h = triton_viz.draw_record(program_records[(0, 0, 0)], tt, "tmp.png")
2020
size[0] = w
2121
size[1] = h
2222
height = 600 * size[1] / size[0]
@@ -52,7 +52,7 @@ def launch(share=True):
5252
)
5353

5454
def cache_block(idx):
55-
name = tempfile.NamedTemporaryFile(suffix=".svg")
55+
name = tempfile.NamedTemporaryFile(suffix=".png")
5656
w, h = triton_viz.draw_record(program_records[idx], tt, name.name)
5757
size[0] = w
5858
size[1] = h

0 commit comments

Comments
 (0)