From e7b6c356654e00d834a9f9b22d6174ef1e476fae Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 2 Jan 2026 22:46:38 +0200 Subject: [PATCH] cont : stop visit on none --- ggml/src/ggml.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c index f57c38f799..226b1869a8 100644 --- a/ggml/src/ggml.c +++ b/ggml/src/ggml.c @@ -6719,6 +6719,10 @@ static void ggml_compute_backward( } static void ggml_visit_parents_compute(struct ggml_tensor * node) { + if (node->op == GGML_OP_NONE) { + return; + } + if (node->flags & GGML_TENSOR_FLAG_COMPUTE) { return; } @@ -6734,7 +6738,7 @@ static void ggml_visit_parents_compute(struct ggml_tensor * node) { } static size_t ggml_visit_parents_graph(struct ggml_cgraph * cgraph, struct ggml_tensor * node, bool compute) { - if (compute) { + if (node->op != GGML_OP_NONE && compute) { node->flags |= GGML_TENSOR_FLAG_COMPUTE; }