Skip to content

Commit 294f424

Browse files
authored
llama : extend API to get max devices at runtime (#2253)
1 parent 45a1b07 commit 294f424

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

llama.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,10 @@ struct llama_model_quantize_params llama_model_quantize_default_params() {
875875
return result;
876876
}
877877

878+
int llama_max_devices() {
879+
return LLAMA_MAX_DEVICES;
880+
}
881+
878882
bool llama_mmap_supported() {
879883
return llama_mmap::SUPPORTED;
880884
}

llama.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ extern "C" {
153153
int32_t n_eval;
154154
};
155155

156+
LLAMA_API int llama_max_devices();
157+
156158
LLAMA_API struct llama_context_params llama_context_default_params();
157159
LLAMA_API struct llama_model_quantize_params llama_model_quantize_default_params();
158160

0 commit comments

Comments
 (0)