Skip to content

Commit e8c3364

Browse files
author
Faisal Zaghloul
committed
fixes for non-llvm builds
1 parent 88dc99a commit e8c3364

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

examples/llama-bench/llama-bench.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,16 @@ struct cmd_params {
191191
bool verbose;
192192
output_formats output_format;
193193
};
194+
//
195+
//static const cpu_params default_cpuparams(
196+
// int32_t(std::thread::hardware_concurrency()),
197+
// {false},
198+
// false,
199+
// 1,
200+
// false,
201+
// false
202+
//);
194203

195-
int32_t n_threads = -1;
196-
bool cpumask[GGML_N_CORES_MAX] = { false }; // CPU affinity mask.
197-
bool mask_valid = false; // Default: any CPU
198-
int32_t priority = 0; // Scheduling prio : (0 - normal, 1 - medium, 2 - high, 3 - realtime)
199-
bool strict_cpu = false; // Use strict CPU placement
200-
bool poll = false; // Use polling (busywait) to wait for work
201204
static const cmd_params cmd_params_defaults = {
202205
/* model */ {"models/7B/ggml-model-q4_0.gguf"},
203206
/* n_prompt */ {512},
@@ -217,7 +220,7 @@ static const cmd_params cmd_params_defaults = {
217220
/* use_mmap */ {true},
218221
/* embeddings */ {false},
219222
/* numa */ GGML_NUMA_STRATEGY_DISABLED,
220-
/* cpuparams */ {int32_t(std::thread::hardware_concurrency()), {false}, false, 1, false, false},
223+
/* cpuparams */ {},
221224
/* reps */ 5,
222225
/* verbose */ false,
223226
/* output_format */ MARKDOWN

ggml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20062,7 +20062,7 @@ struct ggml_cplan ggml_graph_plan(
2006220062
}
2006320063

2006420064
cplan.threadpool = threadpool;
20065-
cplan.n_threads = n_threads;
20065+
cplan.n_threads = MIN(max_tasks, n_threads);
2006620066
cplan.work_size = work_size;
2006720067
cplan.work_data = NULL;
2006820068

0 commit comments

Comments
 (0)