[NPU] Adapt hicache for K3 hybrid models (#39415)

This commit is contained in:
iridiumine
2026-09-18 14:48:20 +08:00
committed by GitHub
parent 6952538980
commit f86f60081d
11 changed files with 198 additions and 24 deletions
@@ -236,6 +236,10 @@ class TestDecodeQueueCleanup(CustomTestCase):
queue._pre_alloc = 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