Skip to content

Commit

Permalink
fix bug introduced in using calloc (llama/7701)
Browse files Browse the repository at this point in the history
compilade pointed this out on the previous MR
  • Loading branch information
airlied authored and ggerganov committed Jun 16, 2024
1 parent 9b3d784 commit d1123d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ggml-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs
galloc->bufts = calloc(n_bufs, sizeof(ggml_backend_buffer_type_t));
GGML_ASSERT(galloc->bufts != NULL);

galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t) * n_bufs);
galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t));
GGML_ASSERT(galloc->buffers != NULL);

galloc->buf_tallocs = calloc(n_bufs, sizeof(struct ggml_dyn_tallocr *));
Expand Down

0 comments on commit d1123d7

Please sign in to comment.