]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml-alloc : enlarge size of parse_seq (#2776)
authorShouzheng Liu <redacted>
Fri, 25 Aug 2023 05:58:00 +0000 (01:58 -0400)
committerGitHub <redacted>
Fri, 25 Aug 2023 05:58:00 +0000 (08:58 +0300)
Since we also store barriers in this array, we need to double its size.

ggml-alloc.c

index af4affa4e018ce83766e62f8a8ec117efa1e4c6c..1ef01165461eaa544d0e973b984693da547da44f 100644 (file)
@@ -8,6 +8,7 @@
 
 #define UNUSED(x) (void)(x)
 #define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define GGML_MAX_CONCUR (2*GGML_MAX_NODES)
 
 //#define GGML_ALLOCATOR_DEBUG
 
@@ -67,7 +68,7 @@ struct ggml_allocr {
     struct hash_node hash_table[GGML_GRAPH_HASHTABLE_SIZE];
     size_t max_size;
     bool measure;
-    int parse_seq[GGML_MAX_NODES];
+    int parse_seq[GGML_MAX_CONCUR];
     int parse_seq_len;
 
 #ifdef GGML_ALLOCATOR_DEBUG