Skip to content

Commit 3025b62

Browse files
authored
llama-bench: rename DB table name from test to llama_bench (#15003)
Signed-off-by: Xiaodong Ye <[email protected]>
1 parent ec0b188 commit 3025b62

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scripts/compare-llama-bench.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def __init__(self, tool: str = "llama-bench"):
326326

327327
# Set table name and schema based on tool
328328
if self.tool == "llama-bench":
329-
self.table_name = "test"
329+
self.table_name = "llama_bench"
330330
db_fields = LLAMA_BENCH_DB_FIELDS
331331
db_types = LLAMA_BENCH_DB_TYPES
332332
elif self.tool == "test-backend-ops":
@@ -409,17 +409,17 @@ def __init__(self, data_file: str, tool: Any):
409409

410410
# Tool selection logic
411411
if tool is None:
412-
if "test" in table_names:
413-
self.table_name = "test"
412+
if "llama_bench" in table_names:
413+
self.table_name = "llama_bench"
414414
self.tool = "llama-bench"
415415
elif "test_backend_ops" in table_names:
416416
self.table_name = "test_backend_ops"
417417
self.tool = "test-backend-ops"
418418
else:
419419
raise RuntimeError(f"No suitable table found in database. Available tables: {table_names}")
420420
elif tool == "llama-bench":
421-
if "test" in table_names:
422-
self.table_name = "test"
421+
if "llama_bench" in table_names:
422+
self.table_name = "llama_bench"
423423
self.tool = "llama-bench"
424424
else:
425425
raise RuntimeError(f"Table 'test' not found for tool 'llama-bench'. Available tables: {table_names}")

tools/llama-bench/llama-bench.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ struct sql_printer : public printer {
17381738

17391739
void print_header(const cmd_params & params) override {
17401740
std::vector<std::string> fields = test::get_fields();
1741-
fprintf(fout, "CREATE TABLE IF NOT EXISTS test (\n");
1741+
fprintf(fout, "CREATE TABLE IF NOT EXISTS llama_bench (\n");
17421742
for (size_t i = 0; i < fields.size(); i++) {
17431743
fprintf(fout, " %s %s%s\n", fields.at(i).c_str(), get_sql_field_type(fields.at(i)).c_str(),
17441744
i < fields.size() - 1 ? "," : "");
@@ -1749,7 +1749,7 @@ struct sql_printer : public printer {
17491749
}
17501750

17511751
void print_test(const test & t) override {
1752-
fprintf(fout, "INSERT INTO test (%s) ", join(test::get_fields(), ", ").c_str());
1752+
fprintf(fout, "INSERT INTO llama_bench (%s) ", join(test::get_fields(), ", ").c_str());
17531753
fprintf(fout, "VALUES (");
17541754
std::vector<std::string> values = t.get_values();
17551755
for (size_t i = 0; i < values.size(); i++) {

0 commit comments

Comments
 (0)