returns the priority of the backend, lower is better
| 465 | |
| 466 | // returns the priority of the backend, lower is better |
| 467 | static int sched_backend_prio(ggml_backend_sched_t sched, ggml_backend_t backend) { |
| 468 | for (int i = 0; i < sched->n_backends; i++) { |
| 469 | if (sched->backends[i] == backend) { |
| 470 | return i; |
| 471 | } |
| 472 | } |
| 473 | return INT_MAX; |
| 474 | } |
| 475 | |
| 476 | static int sched_allocr_prio(ggml_backend_sched_t sched, ggml_tallocr_t allocr) { |
| 477 | for (int i = 0; i < sched->n_backends; i++) { |
no outgoing calls
no test coverage detected