Skip to content

Commit 2e5e45c

Browse files
committed
refactor: Use llama_memory_state_ptr for child states in hybrid memory state
Branch: HybridRecurrentCache Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent bd37fc8 commit 2e5e45c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/llama-kv-cache-hybrid-recurrent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ const llama_ubatch & llama_kv_cache_hybrid_recurrent_state::get_ubatch() const {
244244
}
245245

246246
const llama_kv_cache_unified_state * llama_kv_cache_hybrid_recurrent_state::get_state_attn() const {
247-
return state_attn.get();
247+
return static_cast<const llama_kv_cache_unified_state *>(state_attn.get());
248248
}
249249

250250
const llama_kv_cache_recurrent_state * llama_kv_cache_hybrid_recurrent_state::get_state_recurrent() const {
251-
return state_recurrent.get();
251+
return static_cast<const llama_kv_cache_recurrent_state *>(state_recurrent.get());
252252
}

src/llama-kv-cache-hybrid-recurrent.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ class llama_kv_cache_hybrid_recurrent_state : public llama_memory_state_i {
145145
std::vector<uint32_t> heads_attn;
146146
std::vector<llama_ubatch> ubatches;
147147

148-
const llama_kv_cache_unified_state_ptr state_attn;
149-
const llama_kv_cache_recurrent_state_ptr state_recurrent;
148+
const llama_memory_state_ptr state_attn;
149+
const llama_memory_state_ptr state_recurrent;
150150
};

0 commit comments

Comments
 (0)