From 45f0cc932df233be509f8e3fcb9ea824b4de330e Mon Sep 17 00:00:00 2001 From: yuwenzho Date: Thu, 29 Aug 2024 04:12:21 +0300 Subject: [PATCH] fix line too long Signed-off-by: yuwenzho --- vllm/hpu/cache_ops.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vllm/hpu/cache_ops.py b/vllm/hpu/cache_ops.py index 8296441eac530..2f8f387eb6529 100644 --- a/vllm/hpu/cache_ops.py +++ b/vllm/hpu/cache_ops.py @@ -30,7 +30,8 @@ def reshape_and_cache(key, # lots of padding, or are doing warmup. # This loop is a workaround for this issue. Please remove it # once key_cache.index_put_(indices, offsets), key) works. - num_kv_cache_passes = int(math.ceil(num_slots_requested / num_slots_available)) + num_kv_cache_passes = int( + math.ceil(num_slots_requested / num_slots_available)) for i in range(num_kv_cache_passes): start_idx = i * num_slots_available end_idx = (i + 1) * num_slots_available @@ -57,7 +58,8 @@ def prepare_to_cache(cache, slot_mapping): # lots of padding, or are doing warmup. # This loop is a workaround for this issue. Please remove it # once key_cache.index_put_(indices, offsets), key) works. - num_kv_cache_passes = int(math.ceil(num_slots_requested / num_slots_available)) + num_kv_cache_passes = int( + math.ceil(num_slots_requested / num_slots_available)) return num_kv_cache_passes, num_slots_available, indices, offsets