[Bugfix][Nixl] Fix kernel physical<>logical block_size issue (#28677)

Signed-off-by: NickLucche <nlucches@redhat.com>
(cherry picked from commit 96b23b8e3b)
This commit is contained in:
Nicolò Lucchesi
2025-11-14 15:40:05 +01:00
committed by Kevin H. Luu
parent c505dd6b61
commit 66a62d73da
3 changed files with 74 additions and 17 deletions

View File

@@ -980,8 +980,10 @@ def test_hybrid_block_table_initialization():
req_index = 0
block_table.append_row(kvcache_manager_blocks, req_index)
# Get expected kernel blocks from the implementation for verification.
expected_kernel_blocks = block_table._map_to_kernel_blocks(
np.array(kvcache_manager_blocks)
expected_kernel_blocks = block_table.map_to_kernel_blocks(
np.array(kvcache_manager_blocks),
block_table.blocks_per_kv_block,
block_table._kernel_block_arange,
)
# Verify block table state
assert block_table.num_blocks_per_row[req_index] == len(expected_kernel_blocks)