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

Function ggml_opt_prepare_alloc

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

Source from the content-addressed store, hash-verified

684// ====== Computation ======
685
686void ggml_opt_prepare_alloc(
687 ggml_opt_context_t opt_ctx,
688 struct ggml_context * ctx_compute,
689 struct ggml_cgraph * gf,
690 struct ggml_tensor * inputs,
691 struct ggml_tensor * outputs) {
692 GGML_ASSERT(!opt_ctx->static_graphs);
693 opt_ctx->ctx_compute = ctx_compute;
694 opt_ctx->gf = gf;
695 opt_ctx->inputs = inputs;
696 opt_ctx->outputs = outputs;
697}
698
699void ggml_opt_alloc(ggml_opt_context_t opt_ctx, bool backward) {
700 GGML_ASSERT(!opt_ctx->eval_ready);

Callers 1

opt_epoch_iterMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected