MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / sam3_graph_compute

Function sam3_graph_compute

sam3.cpp:1019–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1017*****************************************************************************/
1018
1019static 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
1032static void sam3_name_tensorf(struct ggml_tensor* t, const char* fmt, int index) {
1033 if (!t) {

Calls

no outgoing calls

Tested by

no test coverage detected