From 191f11c0100d81b74e7d5fea9c7449c52fac917f Mon Sep 17 00:00:00 2001 From: Hua Jiang Date: Wed, 20 Sep 2023 12:51:50 -0700 Subject: [PATCH 1/3] ggml_tensor: update the structure comments. --- ggml.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml.h b/ggml.h index f45456876da62..d0e85f8e03fb3 100644 --- a/ggml.h +++ b/ggml.h @@ -467,8 +467,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 From 2534c587a91fcb36b48487b1a6977bcf720fec74 Mon Sep 17 00:00:00 2001 From: Cebtenzzre Date: Thu, 21 Sep 2023 14:48:06 -0400 Subject: [PATCH 2/3] remove semicolon Co-authored-by: slaren --- ggml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml.h b/ggml.h index d0e85f8e03fb3..eee75aa886711 100644 --- a/ggml.h +++ b/ggml.h @@ -467,7 +467,7 @@ 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] = ggml_type_size(type); + // 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] From ebf6d5f126bbab32b1f3f17cfa9a9bbc5db5b318 Mon Sep 17 00:00:00 2001 From: Hua Jiang Date: Thu, 21 Sep 2023 18:41:37 -0700 Subject: [PATCH 3/3] Update ggml.h --- ggml.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml.h b/ggml.h index eee75aa886711..a36b580b3318f 100644 --- a/ggml.h +++ b/ggml.h @@ -468,7 +468,7 @@ extern "C" { int64_t ne[GGML_MAX_DIMS]; // number of elements size_t nb[GGML_MAX_DIMS]; // stride in bytes: // nb[0] = ggml_type_size(type) - // nb[1] = nb[0] * (ne[0]/ggml_blck_size(type)) + padding + // nb[1] = nb[0] * (ne[0] / ggml_blck_size(type)) + padding // nb[i] = nb[i-1] * ne[i-1] // compute data