| 1017 | *****************************************************************************/ |
| 1018 | |
| 1019 | static bool sam3_graph_compute(ggml_backend_t backend, struct ggml_cgraph* graph, int n_threads) { |
| 1020 | if (ggml_backend_is_cpu(backend)) { |
| 1021 | ggml_backend_cpu_set_n_threads(backend, n_threads); |
| 1022 | } |
| 1023 | const enum ggml_status status = ggml_backend_graph_compute(backend, graph); |
| 1024 | if (status != GGML_STATUS_SUCCESS) { |
| 1025 | fprintf(stderr, "%s: graph compute failed: %s\n", |
| 1026 | __func__, ggml_status_to_string(status)); |
| 1027 | return false; |
| 1028 | } |
| 1029 | return true; |
| 1030 | } |
| 1031 | |
| 1032 | static void sam3_name_tensorf(struct ggml_tensor* t, const char* fmt, int index) { |
| 1033 | if (!t) { |
no outgoing calls
no test coverage detected