MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / check_no_overlap

Function check_no_overlap

subprojects/llama.cpp/tests/test-alloc.cpp:245–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245static void check_no_overlap(ggml_cgraph * graph) {
246 for (int i = 0; i < ggml_graph_n_nodes(graph); ++i) {
247 for (int j = 0; j < i; ++j) {
248 ggml_tensor * t = ggml_graph_node(graph, i);
249 ggml_tensor * o = ggml_graph_node(graph, j);
250 GGML_ASSERT(t != o);
251
252 if (get_view_source(t) == get_view_source(o)) {
253 continue;
254 }
255 if (memory_overlap(t, o)) {
256 GGML_ASSERT(can_reuse_memory(graph, i, t, o));
257 }
258 }
259 }
260}
261
262//
263// test cases

Calls 5

ggml_graph_n_nodesFunction · 0.85
ggml_graph_nodeFunction · 0.85
get_view_sourceFunction · 0.85
memory_overlapFunction · 0.85
can_reuse_memoryFunction · 0.85

Tested by

no test coverage detected