From 13dc6be3c1de249c94cb6bed9a544515d4e9855c Mon Sep 17 00:00:00 2001 From: Jiacheng Huang Date: Tue, 14 Jan 2025 00:08:27 +0800 Subject: [PATCH] Add overall comparison into `code_size_comparison.py` --- code_size_comparison.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code_size_comparison.py b/code_size_comparison.py index fa31a1a..1e733e5 100644 --- a/code_size_comparison.py +++ b/code_size_comparison.py @@ -42,12 +42,15 @@ print( pd.DataFrame( { - "Kernel": kernels, + "Kernel": kernels + ("Overall",), "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"] ) + ] + + [ + f"{sum(lines_of_code['NineToothed']) / sum(lines_of_code['Triton']) * 100:.2f}%" ], } )