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 @@ -479,6 +479,7 @@ extern "C" {
479479    LLAMA_API int32_t  llama_model_n_layer     (const  struct  llama_model  * model);
480480    LLAMA_API int32_t  llama_model_n_head      (const  struct  llama_model  * model);
481481    LLAMA_API int32_t  llama_model_n_head_kv   (const  struct  llama_model  * model);
482+     LLAMA_API const  ggml_backend_dev_t  *  llama_model_get_devices  (const  struct  llama_model  * model, size_t  * out_len);
482483
483484    //  Get the model's RoPE frequency scaling factor
484485    LLAMA_API float  llama_model_rope_freq_scale_train (const  struct  llama_model  * model);
Original file line number Diff line number Diff line change @@ -3845,6 +3845,11 @@ int32_t llama_model_n_head_kv(const struct llama_model * model) {
38453845    return  model->hparams .n_head_kv ();
38463846}
38473847
3848+ const  ggml_backend_dev_t  *  llama_model_get_devices  (const  struct  llama_model  * model, size_t  * out_len) {
3849+     *out_len = model->devices .size ();
3850+     return  model->devices .data ();
3851+ }
3852+ 
38483853//  deprecated
38493854int32_t  llama_n_ctx_train (const  struct  llama_model  * model) {
38503855    return  llama_model_n_ctx_train (model);
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments