diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-08-07 14:24:42 +0300 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2023-08-07 14:24:42 +0300 |
commit | 60baff7c8584ec369e53469cad5f92e102b1efe4 (patch) | |
tree | 3c36dd2162876c370534f5bb7d56e039df0e1b7e | |
parent | 9082b5dfbfae01243a0b822dcd2812877e63bf1b (diff) |
ggml : pad result of ggml_nbytes()
-rw-r--r-- | ggml.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4110,7 +4110,7 @@ size_t ggml_nbytes(const struct ggml_tensor * tensor) { // // is enough, but just in case, adding the second part - return MAX(tensor->ne[3]*tensor->nb[3], (ggml_nelements(tensor)*GGML_TYPE_SIZE[tensor->type])/GGML_BLCK_SIZE[tensor->type]); + return GGML_PAD(MAX(tensor->ne[3]*tensor->nb[3], (ggml_nelements(tensor)*GGML_TYPE_SIZE[tensor->type])/GGML_BLCK_SIZE[tensor->type]), GGML_MEM_ALIGN); } size_t ggml_nbytes_split(const struct ggml_tensor * tensor, int nrows_split) { |