File tree Expand file tree Collapse file tree 2 files changed +0
-35
lines changed Expand file tree Collapse file tree 2 files changed +0
-35
lines changed Original file line number Diff line number Diff line change @@ -3052,35 +3052,6 @@ bool llama_kv_cache_hybrid::find_slot(const llama_ubatch & batch) {
30523052 return found;
30533053}
30543054
3055- int32_t llama_kv_cache_hybrid::get_n_tokens () const {
3056- // The number of tokens should be the same across all child caches
3057- int32_t n_tokens = -1 ;
3058- for (const auto & cache : m_children) {
3059- const auto cache_n_tokens = cache->get_n_tokens ();
3060- GGML_ASSERT (n_tokens == -1 || cache_n_tokens == n_tokens);
3061- n_tokens = cache_n_tokens;
3062- }
3063- return n_tokens;
3064- }
3065-
3066- int32_t llama_kv_cache_hybrid::get_used_cells () const {
3067- // TODO: Is this correct?
3068- // Return the largest number of used cells
3069- int32_t used_cells = -1 ;
3070- for (const auto & cache : m_children) {
3071- used_cells = std::max (used_cells, cache->get_used_cells ());
3072- }
3073- return used_cells;
3074- }
3075-
3076- llama_pos llama_kv_cache_hybrid::get_pos_max () const {
3077- llama_pos pos_max = -1 ;
3078- for (const auto & cache : m_children) {
3079- pos_max = std::max (pos_max, cache->get_pos_max ());
3080- }
3081- return pos_max;
3082- }
3083-
30843055bool llama_kv_cache_hybrid::get_can_shift () const {
30853056 // TODO: Is this correct?
30863057 // If any children can shift, return true
Original file line number Diff line number Diff line change @@ -607,12 +607,6 @@ class llama_kv_cache_hybrid : public llama_kv_cache {
607607 // to the first cell of the slot.
608608 bool find_slot (const llama_ubatch & batch) override ;
609609
610- int32_t get_n_tokens () const override ;
611- int32_t get_used_cells () const override ;
612-
613- // TODO: better data structures to reduce the cost of this operation
614- llama_pos get_pos_max () const override ;
615-
616610 bool get_can_shift () const override ;
617611
618612 // state write/load
You can’t perform that action at this time.
0 commit comments