diff --git a/ggml.c b/ggml.c index 73d0f337b..77abf7c8f 100644 --- a/ggml.c +++ b/ggml.c @@ -16191,9 +16191,9 @@ static size_t hash_find(void * hash_table[], void * p) { static bool hash_insert(void * hash_table[], void * p) { size_t i = hash_find(hash_table, p); - + GGML_ASSERT(i < GGML_GRAPH_HASHTABLE_SIZE); // assert that not full - + if (hash_table[i] == p) { return true; } diff --git a/ggml.h b/ggml.h index b90809bbe..0ab8cedea 100644 --- a/ggml.h +++ b/ggml.h @@ -1665,7 +1665,7 @@ extern "C" { GGML_API void ggml_graph_dump_dot(const struct ggml_cgraph * gb, const struct ggml_cgraph * gf, const char * filename); // build gradient checkpointing backward graph gb for gf using provided checkpoints - // gb_tmp will contain original backward graph with rewritten backward process nodes, + // gb_tmp will contain original backward graph with rewritten backward process nodes, // but without the second forward pass nodes. GGML_API void ggml_build_backward_gradient_checkpointing( struct ggml_context * ctx,