File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,7 @@ extern "C" {
478478 LLAMA_API int32_t llama_model_n_layer (const struct llama_model * model);
479479 LLAMA_API int32_t llama_model_n_head (const struct llama_model * model);
480480 LLAMA_API int32_t llama_model_n_head_kv (const struct llama_model * model);
481+ LLAMA_API const ggml_backend_dev_t * llama_model_get_devices (const struct llama_model * model, size_t * out_len);
481482
482483 // Get the model's RoPE frequency scaling factor
483484 LLAMA_API float llama_model_rope_freq_scale_train (const struct llama_model * model);
Original file line number Diff line number Diff line change @@ -3842,6 +3842,11 @@ int32_t llama_model_n_head_kv(const struct llama_model * model) {
38423842 return model->hparams .n_head_kv ();
38433843}
38443844
3845+ const ggml_backend_dev_t * llama_model_get_devices (const struct llama_model * model, size_t * out_len) {
3846+ *out_len = model->devices .size ();
3847+ return model->devices .data ();
3848+ }
3849+
38453850// deprecated
38463851int32_t llama_n_ctx_train (const struct llama_model * model) {
38473852 return llama_model_n_ctx_train (model);
You can’t perform that action at this time.
0 commit comments