Skip to content

Commit 327e156

Browse files
committed
Minor refactor
1 parent 6dc25a0 commit 327e156

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

ggml/src/ggml-openvino/ggml-decoder.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ GgmlOvDecoder::GgmlOvDecoder(struct ggml_cgraph* cgraph,
6565
print_tensor_address_map(cgraph);
6666
}
6767

68-
if (getenv("GGML_OPENVINO_DUMP_CGRAPH")) {
69-
std::string filename = "cgraph.txt";
70-
dump_cgraph(cgraph, filename);
71-
}
72-
7368
set_llm_params();
7469

7570
for (int node_n = 0; node_n < cgraph->n_nodes; node_n++) {
@@ -83,11 +78,6 @@ GgmlOvDecoder::GgmlOvDecoder(struct ggml_cgraph* cgraph,
8378

8479
GgmlOvDecoder::GgmlOvDecoder(struct ggml_cgraph* cgraph,
8580
std::map<std::string, std::shared_ptr<ov::Node>>& model_weights) {
86-
if (getenv("GGML_OPENVINO_DUMP_CGRAPH")) {
87-
std::string filename = "cgraph.txt";
88-
dump_cgraph(cgraph, filename);
89-
}
90-
9181
m_cgraph = cgraph;
9282
m_model_weights = model_weights;
9383
for (int node_n = 0; node_n < cgraph->n_nodes; node_n++) {

ggml/src/ggml-openvino/utils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ enum ggml_status openvino_frontend_compute(ggml_backend_t backend, struct ggml_c
8686
};
8787
}
8888

89+
if (getenv("GGML_OPENVINO_DUMP_CGRAPH")) {
90+
std::string filename = "cgraph.txt";
91+
GgmlOvDecoder::dump_cgraph(cgraph, filename);
92+
}
93+
8994
if (is_naive(cgraph)) {
9095
return naive_compute(cgraph, core, device, config);
9196
}

0 commit comments

Comments
 (0)