Skip to content

Commit

Permalink
Add statistics into code_size_comparison.py
Browse files Browse the repository at this point in the history
  • Loading branch information
voltjia committed Jan 13, 2025
1 parent 60c9a6e commit 69b626d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code_size_comparison.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

plt.rcParams["figure.dpi"] = 600
plt.rcParams["font.family"] = "JetBrains Mono"
Expand Down Expand Up @@ -37,3 +38,17 @@

plt.show()
plt.savefig("code-size-comparison.png")

print(
pd.DataFrame(
{
"Kernel": kernels,
"Relative Code Size Change (%)": [
f"{ninetoothed_lines / triton_lines * 100:.2f}%"
for ninetoothed_lines, triton_lines in zip(
lines_of_code["NineToothed"], lines_of_code["Triton"]
)
],
}
)
)

0 comments on commit 69b626d

Please sign in to comment.