Skip to content

Commit 157f3a1

Browse files
committed
fix: Remove unused kv cache methods after rebase
Branch: HybridCache Signed-off-by: Gabe Goodhart <[email protected]>
1 parent 5d22ad6 commit 157f3a1

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/llama-kv-cache.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2964,35 +2964,6 @@ bool llama_kv_cache_hybrid::find_slot(const llama_ubatch & batch) {
29642964
return found;
29652965
}
29662966

2967-
int32_t llama_kv_cache_hybrid::get_n_tokens() const {
2968-
// The number of tokens should be the same across all child caches
2969-
int32_t n_tokens = -1;
2970-
for (const auto & cache : m_children) {
2971-
const auto cache_n_tokens = cache->get_n_tokens();
2972-
GGML_ASSERT(n_tokens == -1 || cache_n_tokens == n_tokens);
2973-
n_tokens = cache_n_tokens;
2974-
}
2975-
return n_tokens;
2976-
}
2977-
2978-
int32_t llama_kv_cache_hybrid::get_used_cells() const {
2979-
// TODO: Is this correct?
2980-
// Return the largest number of used cells
2981-
int32_t used_cells = -1;
2982-
for (const auto & cache : m_children) {
2983-
used_cells = std::max(used_cells, cache->get_used_cells());
2984-
}
2985-
return used_cells;
2986-
}
2987-
2988-
llama_pos llama_kv_cache_hybrid::get_pos_max() const {
2989-
llama_pos pos_max = -1;
2990-
for (const auto & cache : m_children) {
2991-
pos_max = std::max(pos_max, cache->get_pos_max());
2992-
}
2993-
return pos_max;
2994-
}
2995-
29962967
bool llama_kv_cache_hybrid::get_can_shift() const {
29972968
// TODO: Is this correct?
29982969
// If any children can shift, return true

src/llama-kv-cache.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,12 +594,6 @@ class llama_kv_cache_hybrid : public llama_kv_cache {
594594
// to the first cell of the slot.
595595
bool find_slot(const llama_ubatch & batch) override;
596596

597-
int32_t get_n_tokens() const override;
598-
int32_t get_used_cells() const override;
599-
600-
// TODO: better data structures to reduce the cost of this operation
601-
llama_pos get_pos_max() const override;
602-
603597
bool get_can_shift() const override;
604598

605599
// state write/load

0 commit comments

Comments
 (0)