fix variable name and add missing type cast

This commit is contained in:
xaedes 2023-08-14 17:52:48 +02:00
parent cfddc36be2
commit 0dd496c5e2
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

@ -1425,8 +1425,8 @@ struct ggml_tensor * ggml_recompute_graph_node(
size_t i = hash_find(replacements->keys, node);
GGML_ASSERT(i < GGML_GRAPH_HASHTABLE_SIZE); // assert that not full
if (replacements->keys[i] == p) {
return replacements->vals[i];
if (replacements->keys[i] == node) {
return (struct ggml_tensor *) replacements->vals[i];
}
struct ggml_tensor * clone = ggml_new_tensor(ctx, node->type, node->n_dims, node->ne);