@@ -2979,25 +2979,25 @@ static bool ggml_cuda_graph_update_required(ggml_backend_cuda_context * cuda_ctx
29792979 ggml_cuda_graph * graph = cuda_ctx->cuda_graph (graph_key);
29802980
29812981 // Check if the graph size has changed
2982- if ((int )graph->nodes_props .size () != cgraph->n_nodes ) {
2982+ if ((int )graph->node_props .size () != cgraph->n_nodes ) {
29832983 res = true ;
2984- graph->nodes_props .resize (cgraph->n_nodes );
2984+ graph->node_props .resize (cgraph->n_nodes );
29852985 }
29862986
29872987 for (int i = 0 ; i < cgraph->n_nodes ; i++) {
2988- ggml_cuda_graph::node_property prop = {};
2988+ ggml_cuda_graph::node_properties prop = {};
29892989 memcpy (&prop.node , cgraph->nodes [i], sizeof (ggml_tensor));
29902990
2991- // src->data being same is enough to guarantee that node->srcs are consistent. ref :
2991+ // if the backend scheduler is making copies of CPU tensors, the src pointers can be the same but with different data, see :
29922992 // https://github.com/ggml-org/llama.cpp/pull/21472#discussion_r3052235188
29932993 for (int j = 0 ; j < GGML_MAX_SRC; ++j) {
29942994 prop.node_src_data_ptrs [j] = cgraph->nodes [i]->src [j] ? cgraph->nodes [i]->src [j]->data : nullptr ;
29952995 }
29962996
2997- if (!res && memcmp (&graph->nodes_props [i], &prop, sizeof (prop)) != 0 ) {
2997+ if (!res && memcmp (&graph->node_props [i], &prop, sizeof (prop)) != 0 ) {
29982998 res = true ;
29992999 }
3000- graph->nodes_props [i] = prop;
3000+ graph->node_props [i] = prop;
30013001 }
30023002
30033003 return res;
0 commit comments