Skip to content

Commit fd53bd8

Browse files
committed
common: remove references to non-existent GGML_SCHED_PRIO_LOW
The GGML_SCHED_PRIO_LOW enumeration value doesn't exist in the current ggml API. The available priority levels are: - GGML_SCHED_PRIO_NORMAL - GGML_SCHED_PRIO_MEDIUM - GGML_SCHED_PRIO_HIGH - GGML_SCHED_PRIO_REALTIME Remove all references to GGML_SCHED_PRIO_LOW in the priority handling code and update the validation range checking accordingly. This fixes compilation errors when building against system-provided ggml libraries.
1 parent d50006e commit fd53bd8

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

common/arg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
13501350
{"--prio"}, "N",
13511351
string_format("set process/thread priority : low(-1), normal(0), medium(1), high(2), realtime(3) (default: %d)\n", params.cpuparams.priority),
13521352
[](common_params & params, int prio) {
1353-
if (prio < GGML_SCHED_PRIO_LOW || prio > GGML_SCHED_PRIO_REALTIME) {
1353+
if (prio < GGML_SCHED_PRIO_NORMAL || prio > GGML_SCHED_PRIO_REALTIME) {
13541354
throw std::invalid_argument("invalid value");
13551355
}
13561356
params.cpuparams.priority = (enum ggml_sched_priority) prio;

common/common.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ bool set_process_priority(enum ggml_sched_priority prio) {
203203

204204
DWORD p = NORMAL_PRIORITY_CLASS;
205205
switch (prio) {
206-
case GGML_SCHED_PRIO_LOW: p = BELOW_NORMAL_PRIORITY_CLASS; break;
207206
case GGML_SCHED_PRIO_NORMAL: p = NORMAL_PRIORITY_CLASS; break;
208207
case GGML_SCHED_PRIO_MEDIUM: p = ABOVE_NORMAL_PRIORITY_CLASS; break;
209208
case GGML_SCHED_PRIO_HIGH: p = HIGH_PRIORITY_CLASS; break;
@@ -229,7 +228,6 @@ bool set_process_priority(enum ggml_sched_priority prio) {
229228

230229
int p = 0;
231230
switch (prio) {
232-
case GGML_SCHED_PRIO_LOW: p = 5; break;
233231
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
234232
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
235233
case GGML_SCHED_PRIO_HIGH: p = -10; break;

0 commit comments

Comments
 (0)