Skip to content

Commit

Permalink
ggml : add ggml_tensor_overhead()
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed May 27, 2023
1 parent b0450c2 commit ddea488
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/common-ggml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ ggml_cgraph ggml_graph_import(const char * fname, struct ggml_context ** ctx_dat

// create the data context
{
const size_t overhead = 1*GGML_TENSOR_OVERHEAD;
const size_t overhead = 1*ggml_tensor_overhead();

struct ggml_init_params params = {
.mem_size = fsize + overhead,
Expand Down Expand Up @@ -559,7 +559,7 @@ ggml_cgraph ggml_graph_import(const char * fname, struct ggml_context ** ctx_dat

// create the data context
{
const size_t overhead = (leafs + nodes)*GGML_TENSOR_OVERHEAD;
const size_t overhead = (leafs + nodes)*ggml_tensor_overhead();

struct ggml_init_params params = {
.mem_size = size_eval + overhead,
Expand Down

0 comments on commit ddea488

Please sign in to comment.