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

Method apply

subprojects/llama.cpp/src/llama-kv-cache.cpp:2192–2206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2190}
2191
2192bool llama_kv_cache_context::apply() {
2193 assert(!llama_memory_status_is_fail(status));
2194
2195 // no ubatches -> this is a KV cache update
2196 if (ubatches.empty()) {
2197 kv->update(lctx, do_shift, sc_info);
2198
2199 return true;
2200 }
2201
2202 kv->apply_ubatch(sinfos[i_cur], ubatches[i_cur]);
2203 n_kv = kv->get_n_kv(sinfos[i_cur]);
2204
2205 return true;
2206}
2207
2208llama_memory_status llama_kv_cache_context::get_status() const {
2209 return status;

Callers

nothing calls this directly

Calls 5

apply_ubatchMethod · 0.80
get_n_kvMethod · 0.80
emptyMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected