Skip to content

Commit bca170b

Browse files
committed
bugfixed for size mismatch
Change-Id: I1427cd0fd8ce25b8875886fa12e0cb30d96d55f2
1 parent 5f90c72 commit bca170b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/llama-bench/llama-bench.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,8 @@ struct test {
12391239
std::map<std::string, std::string> map;
12401240
auto fields = get_fields();
12411241
auto values = get_values();
1242-
std::transform(fields.begin(), fields.end(), values.begin(), std::inserter(map, map.end()),
1242+
auto size_limit = std::min(fields.size(), values.size());
1243+
std::transform(fields.begin(), fields.begin() + size_limit, values.begin(), std::inserter(map, map.end()),
12431244
std::make_pair<const std::string &, const std::string &>);
12441245
return map;
12451246
}
@@ -1875,4 +1876,4 @@ int main(int argc, char ** argv) {
18751876
llama_backend_free();
18761877

18771878
return 0;
1878-
}
1879+
}

ggml/src/ggml-cpu/ggml-cpu.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,6 @@ struct ggml_cplan ggml_graph_plan(
28282828
cplan.n_threads = MIN(max_tasks, n_threads);
28292829
cplan.work_size = work_size;
28302830
cplan.work_data = NULL;
2831-
printf("cplan.work_size = %ld\n", cplan.work_size);
28322831
return cplan;
28332832
}
28342833

0 commit comments

Comments
 (0)