summaryrefslogtreecommitdiff
path: root/ggml.c
diff options
context:
space:
mode:
authorHerman Semenov <GermanAizek@yandex.ru>2023-12-22 09:26:49 +0000
committerGitHub <noreply@github.com>2023-12-22 11:26:49 +0200
commit48b24b170e3b4f9dc28200306840cb07d1c123df (patch)
tree3635af11466a7913ec5bf03dd79d39d97010a378 /ggml.c
parent28cb35a0ecb9852adc3494aa51dde60141939d64 (diff)
ggml : add comment about backward GGML_OP_DIAG_MASK_INF (#4203)
Diffstat (limited to 'ggml.c')
-rw-r--r--ggml.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ggml.c b/ggml.c
index f27920a2..15e1984d 100644
--- a/ggml.c
+++ b/ggml.c
@@ -15335,6 +15335,8 @@ static void ggml_compute_backward(struct ggml_context * ctx, struct ggml_tensor
const int n_past = ((int32_t *) tensor->op_params)[0];
src0->grad =
ggml_add_or_set(ctx, src0->grad,
+ /* ggml_diag_mask_inf_impl() shouldn't be here */
+ /* ref: https://github.com/ggerganov/llama.cpp/pull/4203#discussion_r1412377992 */
ggml_diag_mask_zero_impl(ctx, tensor->grad, n_past, false),
zero_table);
}