Skip to content

Commit efe8e89

Browse files
kevincheng2claude
andcommitted
[BugFix][KVCache] 修复 gpu_free_block_list 返回 int 导致 TypeError
## Motivation gpu_free_block_list 属性中调用 BlockPool.available_blocks(), 该方法返回 int(空闲块数量),用 list() 包装 int 会触发 TypeError: 'int' object is not iterable。 ## Modifications 将 list(self._device_pool.available_blocks()) 改为 list(self._device_pool._free_blocks),直接返回空闲块索引列表。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 303f8d5 commit efe8e89

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fastdeploy/cache_manager/v1/cache_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def gpu_free_block_list(self) -> List[int]:
426426
with PrefixCacheManager.gpu_free_block_list.
427427
"""
428428
# Return list representation of available blocks
429-
return list(self._device_pool.available_blocks())
429+
return list(self._device_pool._free_blocks)
430430

431431
@property
432432
def available_gpu_resource(self) -> float:

0 commit comments

Comments
 (0)