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

Function ggml_opt_free

subprojects/llama.cpp/ggml/src/ggml-opt.cpp:584–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584void ggml_opt_free(ggml_opt_context_t opt_ctx) {
585 if (opt_ctx == nullptr) {
586 return;
587 }
588 ggml_backend_buffer_free(opt_ctx->buf_static);
589 ggml_backend_buffer_free(opt_ctx->buf_cpu);
590 ggml_free(opt_ctx->ctx_static);
591 ggml_free(opt_ctx->ctx_cpu);
592 delete opt_ctx;
593}
594
595void ggml_opt_reset(ggml_opt_context_t opt_ctx, bool optimizer) {
596 if (optimizer) {

Callers 3

~llama_contextMethod · 0.85
helper_free_ctx_dataFunction · 0.85
ggml_opt_fitFunction · 0.85

Calls 2

ggml_backend_buffer_freeFunction · 0.85
ggml_freeFunction · 0.85

Tested by 1

helper_free_ctx_dataFunction · 0.68