| 2190 | } |
| 2191 | |
| 2192 | bool 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 | |
| 2208 | llama_memory_status llama_kv_cache_context::get_status() const { |
| 2209 | return status; |
nothing calls this directly
no test coverage detected