Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <youkaichao@gmail.com>
youkaichao committed Dec 16, 2024
1 parent 3c17006 commit 081498b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions vllm/worker/worker.py
Original file line number Diff line number Diff line change
@@ -222,21 +222,21 @@ def determine_num_available_blocks(self) -> Tuple[int, int]:
num_gpu_blocks = max(num_gpu_blocks, 0)
num_cpu_blocks = max(num_cpu_blocks, 0)

msg = (f"Memory profiling takes {result.profile_time:.2f}seconds\n"
"total_gpu_memory="
f"{(total_gpu_memory / GiB_bytes):.2f}GiB;"
"gpu_memory_utilization="
f"{self.cache_config.gpu_memory_utilization:.2f};"
"the current vLLM instance can use="
f"{(memory_for_current_instance / GiB_bytes):.2f}GiB\n"
"model weights take="
msg = (f"Memory profiling takes {result.profile_time:.2f} seconds\n"
"the current vLLM instance can use "
"total_gpu_memory "
f"({(total_gpu_memory / GiB_bytes):.2f}GiB)"
" x gpu_memory_utilization "
f"({self.cache_config.gpu_memory_utilization:.2f})"
f" = {(memory_for_current_instance / GiB_bytes):.2f}GiB\n"
"model weights take "
f"{(result.weights_memory_in_bytes / GiB_bytes):.2f}GiB;"
"non_torch_memory="
" non_torch_memory takes"
f"{(result.non_torch_increase_in_bytes / GiB_bytes):.2f}GiB;"
"PyTorch activation peak memory="
" PyTorch activation peak memory takes"
f"{(result.torch_peak_increase_in_bytes / GiB_bytes):.2f}GiB;"
"available_kv_cache_memory="
f"{(available_kv_cache_memory / GiB_bytes):.2f}GiB;")
" the rest of the memory reserved for KV Cache is"
f"{(available_kv_cache_memory / GiB_bytes):.2f}GiB.")

logger.info(msg)

0 comments on commit 081498b

Please sign in to comment.