Skip to content

Commit 6cc42de

Browse files
committed
ggml : fix nullptr derefs in GGML_OP_CONT and GGML_OP_RESHAPE back
1 parent 78af3e9 commit 6cc42de

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

ggml.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13891,9 +13891,6 @@ static void ggml_compute_backward(struct ggml_context * ctx, struct ggml_tensor
1389113891
GGML_ASSERT(ggml_is_contiguous(tensor->grad));
1389213892
src0->grad = ggml_add_impl(ctx, src0->grad, tensor->grad, inplace);
1389313893
}
13894-
if (src1->grad) {
13895-
// noop
13896-
}
1389713894
} break;
1389813895
case GGML_OP_RESHAPE:
1389913896
{
@@ -13904,9 +13901,6 @@ static void ggml_compute_backward(struct ggml_context * ctx, struct ggml_tensor
1390413901
ggml_reshape(ctx, tensor->grad, src0->grad),
1390513902
inplace);
1390613903
}
13907-
if (src1->grad) {
13908-
// noop
13909-
}
1391013904
} break;
1391113905
case GGML_OP_VIEW:
1391213906
{

0 commit comments

Comments
 (0)