| 159 | } |
| 160 | |
| 161 | static 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 | |
| 174 | static void print_ok(bool subtest_ok) { |
| 175 | printf(subtest_ok ? "\033[1;32mOK\033[0m\n" : "\033[1;31mFAIL\033[0m\n"); |
no test coverage detected