MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / helper_free_ctx_data

Function helper_free_ctx_data

smallthinker/tests/test-opt.cpp:148–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148static void helper_free_ctx_data(struct helper_ctx_data ctx_data) {
149 ggml_opt_result_free(ctx_data.result);
150 ggml_opt_result_free(ctx_data.result2);
151 ggml_opt_free(ctx_data.opt_ctx);
152 ggml_backend_buffer_free(ctx_data.buf);
153 ggml_free(ctx_data.ctx_static);
154 ggml_free(ctx_data.ctx_compute);
155 for (ggml_opt_dataset_t dataset : ctx_data.datasets_supervised) {
156 ggml_opt_dataset_free(dataset);
157 }
158 ggml_opt_dataset_free(ctx_data.dataset_unsupervised);
159}
160
161static void helper_after_test(
162 const char * func, const bool high_level, const std::string options,

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_opt_dataset_freeFunction · 0.85
ggml_backend_buffer_freeFunction · 0.50
ggml_freeFunction · 0.50

Tested by

no test coverage detected