[NPU] Adapt hicache for K3 hybrid models (#39415)
This commit is contained in:
@@ -442,6 +442,10 @@ class TestDecodeLockRefScenarios(CustomTestCase):
|
||||
queue.tree_cache.dec_lock_ref = MagicMock()
|
||||
queue.req_to_token_pool = MagicMock()
|
||||
queue.req_to_token_pool.available_size.return_value = 1
|
||||
# Non-hybrid pools have no mamba allocator; MagicMock would otherwise
|
||||
# auto-create one and break the `available_size() <= 0` comparison in
|
||||
# pop_preallocated.
|
||||
queue.req_to_token_pool.mamba_allocator = None
|
||||
queue.req_to_metadata_buffer_idx_allocator = MagicMock()
|
||||
queue.req_to_metadata_buffer_idx_allocator.available_size.return_value = 1
|
||||
queue.token_to_kv_pool = MagicMock()
|
||||
|
||||
@@ -156,6 +156,7 @@ class TestNPUMambaAsyncConfig(unittest.TestCase):
|
||||
MambaPoolHost.__dict__["_copy_tensor_all_layers_lf_pf"], staticmethod
|
||||
)
|
||||
|
||||
@patch.object(mamba_pool_host, "transfer_mamba_state", None)
|
||||
def test_conv_only_load_skips_empty_temporal_component(self):
|
||||
pool = MambaPoolHost.__new__(MambaPoolHost)
|
||||
pool.layout = "page_first_direct"
|
||||
|
||||
Reference in New Issue
Block a user