aboutsummaryrefslogtreecommitdiff
path: root/ggml.h
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-05-27 16:19:56 +0300
committerGeorgi Gerganov <ggerganov@gmail.com>2023-05-27 16:19:56 +0300
commit93618031c7ccdd949d976370f24953d261048575 (patch)
tree25c9d7400bd3d853da8e8b4d6c19384433a98d88 /ggml.h
parent83c54e6da58f1970556741b143bd26e30b1f46af (diff)
ggml : add ggml_tensor_overhead()
Diffstat (limited to 'ggml.h')
-rw-r--r--ggml.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ggml.h b/ggml.h
index 0c90f50..5581382 100644
--- a/ggml.h
+++ b/ggml.h
@@ -380,9 +380,6 @@ extern "C" {
static const size_t GGML_TENSOR_SIZE = sizeof(struct ggml_tensor);
- // use this to compute the memory overhead of a tensor
- static const size_t GGML_TENSOR_OVERHEAD = (GGML_OBJECT_SIZE + GGML_TENSOR_SIZE + 16);
-
// computation graph
struct ggml_cgraph {
int n_nodes;
@@ -444,6 +441,9 @@ extern "C" {
// TODO: temporary until model loading of ggml examples is refactored
GGML_API enum ggml_type ggml_ftype_to_ggml_type(enum ggml_ftype ftype);
+ // use this to compute the memory overhead of a tensor
+ GGML_API size_t ggml_tensor_overhead(void);
+
// main
GGML_API struct ggml_context * ggml_init(struct ggml_init_params params);