| 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++) { |
| 478 | if (sched->tallocs[i] == allocr) { |
| 479 | return i; |
| 480 | } |
| 481 | } |
| 482 | return INT_MAX; |
| 483 | } |
| 484 | |
| 485 | // returns the backend that should be used for the node based on the current locations |
| 486 | char causes[GGML_DEFAULT_GRAPH_SIZE*4 + GGML_MAX_SPLITS*GGML_MAX_SPLIT_INPUTS][128]; // debug, remove |