summaryrefslogtreecommitdiff
path: root/ggml-backend-impl.h
diff options
context:
space:
mode:
authorMichael Podvitskiy <podvitskiymichael@gmail.com>2024-03-04 10:05:42 +0100
committerGeorgi Gerganov <ggerganov@gmail.com>2024-03-04 20:54:23 +0200
commit9fa262734733573fa629ffc97dfcb971fe3f4832 (patch)
treeab83409687aac7a30fcaf835fc0d321cf2d62a36 /ggml-backend-impl.h
parentfe52be11e35358d2fd249f19d7ef5b6f9c08b16b (diff)
ggml : introduce ggml_status (ggml/750)
* using enum as an exit code instead of macros * update return type from enum to unsigned int * indentation fix * compound update ggml_compute_exit_code -> ggml_status changed ggml_status from a bit-field type to simple codes ggml_status to string cast * ggml_status to string cast * GGML_CALL was removed Co-authored-by: slaren <slarengh@gmail.com> --------- Co-authored-by: slaren <slarengh@gmail.com> Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'ggml-backend-impl.h')
-rw-r--r--ggml-backend-impl.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ggml-backend-impl.h b/ggml-backend-impl.h
index 0e5bf0ae..2e9ba58a 100644
--- a/ggml-backend-impl.h
+++ b/ggml-backend-impl.h
@@ -91,13 +91,14 @@ extern "C" {
// (optional) complete all pending operations
void (*GGML_CALL synchronize)(ggml_backend_t backend);
- // compute graph with a plan
+ // create a plan for ggml_cgraph and free it
ggml_backend_graph_plan_t (*GGML_CALL graph_plan_create) (ggml_backend_t backend, const struct ggml_cgraph * cgraph);
void (*GGML_CALL graph_plan_free) (ggml_backend_t backend, ggml_backend_graph_plan_t plan);
- void (*GGML_CALL graph_plan_compute)(ggml_backend_t backend, ggml_backend_graph_plan_t plan);
+ // compute graph with a plan
+ enum ggml_status (*GGML_CALL graph_plan_compute)(ggml_backend_t backend, ggml_backend_graph_plan_t plan);
// compute graph without a plan (async)
- bool (*GGML_CALL graph_compute)(ggml_backend_t backend, struct ggml_cgraph * cgraph);
+ enum ggml_status (*GGML_CALL graph_compute) (ggml_backend_t backend, struct ggml_cgraph * cgraph);
// check if the backend supports an operation
bool (*GGML_CALL supports_op)(ggml_backend_t backend, const struct ggml_tensor * op);