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

Function ggml_opt_free

smallthinker/ggml/src/ggml-opt.cpp:559–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557}
558
559void ggml_opt_free(ggml_opt_context_t opt_ctx) {
560 if (opt_ctx == nullptr) {
561 return;
562 }
563 ggml_backend_buffer_free(opt_ctx->buf_static);
564 ggml_backend_buffer_free(opt_ctx->buf_cpu);
565 ggml_free(opt_ctx->ctx_static);
566 ggml_free(opt_ctx->ctx_cpu);
567 delete opt_ctx;
568}
569
570void ggml_opt_reset(ggml_opt_context_t opt_ctx, bool optimizer) {
571 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.70
ggml_freeFunction · 0.70

Tested by 1

helper_free_ctx_dataFunction · 0.68