From a528765b7dfc95a522eca9308ddfd0c00b340156 Mon Sep 17 00:00:00 2001 From: Xuejun Zhai Date: Sun, 15 Mar 2026 23:31:27 -0700 Subject: [PATCH] Add fun description --- ggml/src/ggml-openvino/utils.cpp | 3 +++ ggml/src/ggml-openvino/utils.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ggml/src/ggml-openvino/utils.cpp b/ggml/src/ggml-openvino/utils.cpp index 40dbd90118..e8a5821c86 100644 --- a/ggml/src/ggml-openvino/utils.cpp +++ b/ggml/src/ggml-openvino/utils.cpp @@ -472,6 +472,9 @@ enum ggml_status ov_graph_compute_static(ggml_cgraph * cgraph, std::shared_ptrsrc. +// Step 2 verifies that node inputs come from model nodes/weights/leafs; external sources imply split. bool is_model_splitted(ggml_cgraph * cgraph) { // check the nodes of the model are used by the following nodes, through compare the node's use count and the count of nodes that use it as input. If does not match, return true, else return false. for (int i = 0; i < cgraph->n_nodes; i++) { diff --git a/ggml/src/ggml-openvino/utils.h b/ggml/src/ggml-openvino/utils.h index b5ab395002..977a2fa9b8 100644 --- a/ggml/src/ggml-openvino/utils.h +++ b/ggml/src/ggml-openvino/utils.h @@ -117,6 +117,11 @@ ov::Tensor create_ov_output_tensor(std::shared_ptr ggml_decoder, bool is_naive(struct ggml_cgraph * cgraph); +/** + * @brief Heuristically checks whether the given computation graph is a split-model fragment. + * @param cgraph Pointer to the GGML computation graph to analyze. + * @return true if the graph is identified as split; otherwise false. + */ bool is_model_splitted(struct ggml_cgraph * cgraph); enum ggml_status naive_compute(struct ggml_cgraph * cgraph,