@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 6e78ed6ba7
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 11, 12:30 UTC

[Logs] Optimize startup logs 4 (#29903)

Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

Wentao Ye committed Dec 13, 2025 at 16:12 UTC 6e78ed6ba7f3671f866766f93c6d3571e5bf504d
5 files changed +20 -15
vllm/model_executor/layers/fused_moe/fused_moe.py
+5 -6
@@ -885,12 +885,11 @@ def get_moe_configs(
885
886 # If no optimized configuration is available, we will use the default
887 # configuration
888 - logger.warning(
889 - (
890 - "Using default MoE config. Performance might be sub-optimal! "
891 - "Config file not found at %s"
892 - ),
893 - config_file_paths,
888 + logger.warning_once(
889 + "Using default MoE config. Performance might be sub-optimal! "
890 + "Config file not found at %s",
891 + ", ".join(config_file_paths),
892 + scope="local",
893 )
894 return None
895
vllm/model_executor/layers/fused_moe/layer.py
+3 -1
@@ -369,7 +369,9 @@ class FusedMoE(CustomOp):
369 # aux_stream() returns None on non-cuda-alike platforms.
370 self.shared_experts_stream = aux_stream()
371 if self.shared_experts_stream is not None:
372 - logger.info_once("Enabled separate cuda stream for MoE shared_experts")
372 + logger.info_once(
373 + "Enabled separate cuda stream for MoE shared_experts", scope="local"
374 + )
375
376 if params_dtype is None:
377 params_dtype = torch.get_default_dtype()
vllm/platforms/cuda.py
+3 -2
@@ -409,10 +409,11 @@ class CudaPlatformBase(Platform):
409 )
410 selected_index = sorted_indices[0]
411 selected_backend = valid_backends_priorities[selected_index][0]
412 - logger.info(
412 + logger.info_once(
413 "Using %s attention backend out of potential backends: %s",
414 selected_backend.name,
415 - [b[0].name for b in valid_backends_priorities],
415 + tuple(b[0].name for b in valid_backends_priorities),
416 + scope="local",
417 )
418
419 return selected_backend.get_path()
vllm/profiler/wrapper.py
+8 -5
@@ -61,7 +61,7 @@ class WorkerProfiler(ABC):
61 """Call _stop with error handling but no safeguards."""
62 try:
63 self._stop()
64 - logger.info("Profiler stopped successfully.")
64 + logger.info_once("Profiler stopped successfully.", scope="local")
65 except Exception as e:
66 logger.warning("Failed to stop profiler: %s", e)
67 self._running = False # Always mark as not running, assume stop worked
@@ -91,7 +91,7 @@ class WorkerProfiler(ABC):
91 and self._delay_iters > 0
92 and self._active_iteration_count == self._delay_iters
93 ):
94 - logger.info("Starting profiler after delay...")
94 + logger.info_once("Starting profiler after delay...", scope="local")
95 self._call_start()
96
97 if self._running:
@@ -105,7 +105,9 @@ class WorkerProfiler(ABC):
105 # Automatically stop the profiler after max iters
106 # will be marked as not running, but leave as active so that stop
107 # can clean up properly
108 - logger.info("Max profiling iterations reached. Stopping profiler...")
108 + logger.info_once(
109 + "Max profiling iterations reached. Stopping profiler...", scope="local"
110 + )
111 self._call_stop()
112 return
113
@@ -125,7 +127,7 @@ class WorkerProfiler(ABC):
127
128 def shutdown(self) -> None:
129 """Ensure profiler is stopped when shutting down."""
128 - logger.info_once("Shutting down profiler")
130 + logger.info_once("Shutting down profiler", scope="local")
131 if self._running:
132 self.stop()
133
@@ -156,9 +158,10 @@ class TorchProfilerWrapper(WorkerProfiler):
158 self.profiler_config = profiler_config
159 torch_profiler_trace_dir = profiler_config.torch_profiler_dir
160 if local_rank in (None, 0):
159 - logger.info(
161 + logger.info_once(
162 "Torch profiling enabled. Traces will be saved to: %s",
163 torch_profiler_trace_dir,
164 + scope="local",
165 )
166 logger.debug(
167 "Profiler config: record_shapes=%s,"
vllm/v1/executor/multiproc_executor.py
+1 -1
@@ -706,7 +706,7 @@ class WorkerProc:
706 death_pipe.recv()
707 except EOFError:
708 # Parent process has exited, terminate this worker
709 - logger.info("Parent process exited, terminating worker")
709 + logger.info_once("Parent process exited, terminating worker")
710 # Send signal to self to trigger clean shutdown
711 shutdown_event.set()
712 except Exception as e: