Skip to content

Commit 48b24b1

Browse files
authored
ggml : add comment about backward GGML_OP_DIAG_MASK_INF (#4203)
1 parent 28cb35a commit 48b24b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ggml.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15335,6 +15335,8 @@ static void ggml_compute_backward(struct ggml_context * ctx, struct ggml_tensor
1533515335
const int n_past = ((int32_t *) tensor->op_params)[0];
1533615336
src0->grad =
1533715337
ggml_add_or_set(ctx, src0->grad,
15338+
/* ggml_diag_mask_inf_impl() shouldn't be here */
15339+
/* ref: https://github.com/ggerganov/llama.cpp/pull/4203#discussion_r1412377992 */
1533815340
ggml_diag_mask_zero_impl(ctx, tensor->grad, n_past, false),
1533915341
zero_table);
1534015342
}

0 commit comments

Comments
 (0)