Skip to content

Commit 9df06fc

Browse files
committed
Address review comments
Signed-off-by: Xiaodong Ye <[email protected]>
1 parent 84009af commit 9df06fc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/compare-llama-bench.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
# Header names for the table (test-backend-ops):
8989
TEST_BACKEND_OPS_PRETTY_NAMES = {
90-
"backend_name": "Backend", "op_name": "Operation", "op_params": "Parameters", "test_mode": "Mode",
90+
"backend_name": "Backend", "op_name": "GGML op", "op_params": "Op parameters", "test_mode": "Mode",
9191
"supported": "Supported", "passed": "Passed", "error_message": "Error",
9292
"flops": "FLOPS", "bandwidth_gb_s": "Bandwidth (GB/s)", "memory_kb": "Memory (KB)", "n_runs": "Runs"
9393
}
@@ -141,7 +141,8 @@
141141
help_t = (
142142
"The tool whose data is being compared. "
143143
"Either 'llama-bench' or 'test-backend-ops'. "
144-
"This determines the database schema and comparison logic used."
144+
"This determines the database schema and comparison logic used. "
145+
"If left unspecified, try to determine from the input file."
145146
)
146147
parser.add_argument("-t", "--tool", help=help_t, default=None, choices=[None, "llama-bench", "test-backend-ops"])
147148
help_i = (
@@ -162,7 +163,8 @@
162163
help_s = (
163164
"Columns to add to the table. "
164165
"Accepts a comma-separated list of values. "
165-
f"Legal values: {', '.join(LLAMA_BENCH_KEY_PROPERTIES[:-3])}. "
166+
f"Legal values for test-backend-ops: {', '.join(TEST_BACKEND_OPS_KEY_PROPERTIES)}. "
167+
f"Legal values for llama-bench: {', '.join(LLAMA_BENCH_KEY_PROPERTIES[:-3])}. "
166168
"Defaults to model name (model_type) and CPU and/or GPU name (cpu_info, gpu_info) "
167169
"plus any column where not all data points are the same. "
168170
"If the columns are manually specified, then the results for each unique combination of the "
@@ -875,7 +877,8 @@ def get_flops_unit_name(flops_values: list) -> str:
875877
# Fallback if no valid data is available
876878
baseline_str = "N/A"
877879
compare_str = "N/A"
878-
speedup = float('nan')
880+
from math import nan
881+
speedup = nan
879882

880883
table.append(list(row[:-4]) + [baseline_str, compare_str, speedup])
881884
else:

0 commit comments

Comments
 (0)