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

Function llama_kv_cache_clear

llama.cpp:1745–1751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1743}
1744
1745static void llama_kv_cache_clear(struct llama_kv_cache & cache) {
1746 for (int32_t i = 0; i < (int32_t) cache.size; ++i) {
1747 cache.cells[i].pos = -1;
1748 cache.cells[i].seq_id.clear();
1749 }
1750 cache.head = 0;
1751}
1752
1753static void llama_kv_cache_seq_rm(
1754 struct llama_kv_cache & cache,

Callers 7

mainFunction · 0.85
mainFunction · 0.85
perplexity_v2Function · 0.85
perplexityFunction · 0.85
hellaswag_scoreFunction · 0.85
kv_cache_clearMethod · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected