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 7, 14:00 UTC
[Core] Fix `gpu_worker.py` pre-commit errors (#35312)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Nick Hill committed
Feb 27, 2026 at 07:54 UTC
876312f0b59b24f95704a37c93675e36a018a140
1 file changed
+6
-2
vllm/v1/worker/gpu_worker.py
+6
-2
@@ -744,7 +744,8 @@ class Worker(WorkerBase):
744
745
# Create the profiler wrapper only on the first start call
746
if self.profiler is None:
747
- if self.profiler_config.profiler == "torch":
747
+ profiler_type = self.profiler_config.profiler
748
+ if profiler_type == "torch":
749
self.profiler = TorchProfilerWrapper(
750
self.profiler_config,
751
worker_name=trace_name,
@@ -754,9 +755,12 @@ class Worker(WorkerBase):
755
logger.debug(
756
"Starting torch profiler with trace name: %s", trace_name
757
)
757
- elif self.profiler_config.profiler == "cuda":
758
+ elif profiler_type == "cuda":
759
self.profiler = CudaProfilerWrapper(self.profiler_config)
760
logger.debug("Starting CUDA profiler")
761
+ else:
762
+ logger.warning("Unrecognized profiler: %s", profiler_type)
763
+ return
764
self.profiler.start()
765
else:
766
# Profiler already initialized. Restart profiling but keep