[Fix] Vacuous marker writes in the cache tests, and an undebited Mamba admission slot (#36415)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3b678549c3
commit
e4adf63275
@@ -4982,10 +4982,9 @@ class UnifiedRadixCacheSuite:
|
||||
def _fill_full_kv(self, allocator, indices, marker):
|
||||
kv_pool = self._get_full_kv_pool(allocator)
|
||||
layer_id = kv_pool.start_layer
|
||||
k_buf = kv_pool.get_key_buffer(layer_id)
|
||||
v_buf = kv_pool.get_value_buffer(layer_id)
|
||||
k_buf[indices].fill_(marker)
|
||||
v_buf[indices].fill_(marker + 1)
|
||||
# `buf[indices]` is an advanced-index copy — assign, never `fill_()`.
|
||||
kv_pool.get_key_buffer(layer_id)[indices] = marker
|
||||
kv_pool.get_value_buffer(layer_id)[indices] = marker + 1
|
||||
|
||||
def _snapshot_full_kv(self, allocator, indices):
|
||||
kv_pool = self._get_full_kv_pool(allocator)
|
||||
@@ -5000,9 +4999,9 @@ class UnifiedRadixCacheSuite:
|
||||
return
|
||||
mamba_indices = indices.reshape(-1)
|
||||
mamba_cache = req_to_token_pool.mamba_pool.mamba_cache
|
||||
mamba_cache.temporal[:, mamba_indices].fill_(marker)
|
||||
mamba_cache.temporal[:, mamba_indices] = marker
|
||||
for offset, conv_buf in enumerate(mamba_cache.conv, start=1):
|
||||
conv_buf[:, mamba_indices].fill_(marker + offset)
|
||||
conv_buf[:, mamba_indices] = marker + offset
|
||||
|
||||
def _snapshot_mamba_state(self, req_to_token_pool, indices):
|
||||
mamba_indices = indices.reshape(-1)
|
||||
|
||||
Reference in New Issue
Block a user