@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4716a32dd4
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 03:00 UTC

fix logging msg for block manager (#3701)

Simon Mo committed Mar 28, 2024 at 16:29 UTC 4716a32dd4b413674c104b96882ea9965051c4ff
3 files changed +5 -4
vllm/attention/selector.py
+3 -1
@@ -41,6 +41,8 @@ def _can_use_flash_attn(dtype: torch.dtype) -> bool:
41 try:
42 import flash_attn # noqa: F401
43 except ImportError:
44 - logger.info("flash_attn is not found.")
44 + logger.info(
45 + "Cannot use FlashAttention because the package is not found. "
46 + "Please install it for better performance.")
47 return False
48 return True
vllm/core/block_manager_v1.py
+1 -2
@@ -230,13 +230,12 @@ class BlockSpaceManagerV1(BlockSpaceManager):
230 self.watermark_blocks = int(watermark * num_gpu_blocks)
231
232 if self.enable_caching:
233 - logger.info("enable automatic prefix caching")
233 + logger.info("Automatic prefix caching is enabled.")
234 self.gpu_allocator = CachedBlockAllocator(Device.GPU, block_size,
235 num_gpu_blocks)
236 self.cpu_allocator = CachedBlockAllocator(Device.CPU, block_size,
237 num_cpu_blocks)
238 else:
239 - logger.info("disable automatic prefix caching")
239 self.gpu_allocator = UncachedBlockAllocator(
240 Device.GPU, block_size, num_gpu_blocks)
241 self.cpu_allocator = UncachedBlockAllocator(
vllm/model_executor/parallel_utils/pynccl_utils.py
+1 -1
@@ -10,7 +10,6 @@ logger = logging.getLogger(__name__)
10 try:
11 from vllm.model_executor.parallel_utils.pynccl import (NCCLCommunicator,
12 ncclGetVersion)
13 - logger.info(f"vLLM is using nccl=={ncclGetVersion()}")
13 except Exception as e:
14 # in non-NVIDIA environments, we can't import the nccl module
15 # e.g. when running on machines with AMD GPUs
@@ -40,6 +39,7 @@ def init_process_group(world_size: int, local_rank: int, rank: int,
39 init_method: str) -> None:
40 assert not is_initialized()
41 global comm
42 + logger.info(f"vLLM is using nccl=={ncclGetVersion()}")
43 comm = NCCLCommunicator(init_method=init_method,
44 world_size=world_size,
45 local_rank=local_rank,