[BugFix] kv_offloading: Fix bug in loading of partial cpu blocks (#28951)

Signed-off-by: Or Ozeri <oro@il.ibm.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
Or Ozeri
2025-11-20 12:55:10 +02:00
committed by GitHub
parent 06c20c9904
commit c0c2dd1e0b
2 changed files with 11 additions and 13 deletions

View File

@@ -103,8 +103,8 @@ def test_transfer(
for i in range(gpu_blocks_per_cpu_block):
cpu_blocks_in_gpu_block_size.append(i + base_block_id)
# maybe skip a GPU block to test writing to the middle of a CPU block
if gpu_to_cpu:
# maybe skip a GPU block to test reading from the middle of a CPU block
if not gpu_to_cpu:
gpu_blocks = gpu_blocks[gpu_blocks_per_cpu_block - 1 :]
cpu_blocks_in_gpu_block_size = cpu_blocks_in_gpu_block_size[
gpu_blocks_per_cpu_block - 1 :