]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml_tensor: update the structure comments. (#3283)
authorHua Jiang <redacted>
Thu, 28 Sep 2023 20:06:18 +0000 (13:06 -0700)
committerGitHub <redacted>
Thu, 28 Sep 2023 20:06:18 +0000 (23:06 +0300)
* ggml_tensor: update the structure comments.

* remove semicolon

Co-authored-by: slaren <redacted>
* Update ggml.h

---------

Co-authored-by: Cebtenzzre <redacted>
Co-authored-by: slaren <redacted>
ggml.h

diff --git a/ggml.h b/ggml.h
index 0d99ae23e3b85de47b18d4a6d13586d4e19bde0c..d61c28b2cd96a185195a86d95a95c6face3bb2db 100644 (file)
--- a/ggml.h
+++ b/ggml.h
@@ -473,8 +473,8 @@ extern "C" {
         int     n_dims;
         int64_t ne[GGML_MAX_DIMS]; // number of elements
         size_t  nb[GGML_MAX_DIMS]; // stride in bytes:
-                                   // nb[0] = sizeof(type)
-                                   // nb[1] = nb[0]   * ne[0] + padding
+                                   // nb[0] = ggml_type_size(type)
+                                   // nb[1] = nb[0]   * (ne[0] / ggml_blck_size(type)) + padding
                                    // nb[i] = nb[i-1] * ne[i-1]
 
         // compute data