Skip to content

Commit

Permalink
fixes for non-llvm builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Faisal Zaghloul committed May 30, 2024
1 parent 88dc99a commit e8c3364
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions examples/llama-bench/llama-bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,16 @@ struct cmd_params {
bool verbose;
output_formats output_format;
};
//
//static const cpu_params default_cpuparams(
// int32_t(std::thread::hardware_concurrency()),
// {false},
// false,
// 1,
// false,
// false
//);

int32_t n_threads = -1;
bool cpumask[GGML_N_CORES_MAX] = { false }; // CPU affinity mask.
bool mask_valid = false; // Default: any CPU
int32_t priority = 0; // Scheduling prio : (0 - normal, 1 - medium, 2 - high, 3 - realtime)
bool strict_cpu = false; // Use strict CPU placement
bool poll = false; // Use polling (busywait) to wait for work
static const cmd_params cmd_params_defaults = {
/* model */ {"models/7B/ggml-model-q4_0.gguf"},
/* n_prompt */ {512},
Expand All @@ -217,7 +220,7 @@ static const cmd_params cmd_params_defaults = {
/* use_mmap */ {true},
/* embeddings */ {false},
/* numa */ GGML_NUMA_STRATEGY_DISABLED,
/* cpuparams */ {int32_t(std::thread::hardware_concurrency()), {false}, false, 1, false, false},
/* cpuparams */ {},
/* reps */ 5,
/* verbose */ false,
/* output_format */ MARKDOWN
Expand Down
2 changes: 1 addition & 1 deletion ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -20062,7 +20062,7 @@ struct ggml_cplan ggml_graph_plan(
}

cplan.threadpool = threadpool;
cplan.n_threads = n_threads;
cplan.n_threads = MIN(max_tasks, n_threads);
cplan.work_size = work_size;
cplan.work_data = NULL;

Expand Down

0 comments on commit e8c3364

Please sign in to comment.