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

Function helper_free_ctx_data

subprojects/llama.cpp/tests/test-opt.cpp:161–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161static void helper_free_ctx_data(struct helper_ctx_data ctx_data) {
162 ggml_opt_result_free(ctx_data.result);
163 ggml_opt_result_free(ctx_data.result2);
164 ggml_opt_free(ctx_data.opt_ctx);
165 ggml_backend_buffer_free(ctx_data.buf);
166 ggml_free(ctx_data.ctx_static);
167 ggml_free(ctx_data.ctx_compute);
168 for (ggml_opt_dataset_t dataset : ctx_data.datasets_supervised) {
169 ggml_opt_dataset_free(dataset);
170 }
171 ggml_opt_dataset_free(ctx_data.dataset_unsupervised);
172}
173
174static void print_ok(bool subtest_ok) {
175 printf(subtest_ok ? "\033[1;32mOK\033[0m\n" : "\033[1;31mFAIL\033[0m\n");

Callers 6

test_datasetFunction · 0.85
test_gradFunction · 0.85
test_forward_backwardFunction · 0.85
test_epoch_vs_fitFunction · 0.85
test_idata_splitFunction · 0.85

Calls 5

ggml_opt_result_freeFunction · 0.85
ggml_opt_freeFunction · 0.85
ggml_backend_buffer_freeFunction · 0.85
ggml_freeFunction · 0.85
ggml_opt_dataset_freeFunction · 0.85

Tested by

no test coverage detected