-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
https://github.com/ggerganov/ggml/blob/64746415ee5ad073212871ee1ca4ef800aba1983/tests/test1.c#L23 To try to make it more clear, you can apply this patch and rerun the test: diff --git a/src/ggml.c b/src/ggml.c
index a9e1ea9..363954d 100644
--- a/src/ggml.c
+++ b/src/ggml.c
@@ -14825,7 +14825,7 @@ void ggml_build_backward_gradient_checkpointing(
// functions to change gradients considering the case that input a might be initial gradient with zero value
static struct ggml_tensor * ggml_add_or_set(struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_hash_set zero_table) {
- if (ggml_hash_contains(zero_table, a)) {
+ if (false) {
return b;
} else {
return ggml_add_impl(ctx, a, b, false); The |
Beta Was this translation helpful? Give feedback.
node_5
andnode_4
correspond to the 2ggml_mul
ops in the backward pass forb
:https://github.com/ggerganov/ggml/blob/64746415ee5ad073212871ee1ca4ef800aba1983/tests/test1.c#L23
https://github.com/ggerganov/ggml/blob/64746415ee5ad073212871ee1ca4ef800aba1983/src/ggml.c#L14929-L14945
To try to make it more clear, you can apply this patch and rerun the test: