[Bugfix] Fix cuda profiler missing bug (#55237)

This commit is contained in:
Wei Zhao
2026-09-07 03:15:57 +00:00
committed by GitHub
parent 1f778486fc
commit c3ec0d29f5
2 changed files with 48 additions and 3 deletions
+3 -2
View File
@@ -7,7 +7,7 @@ import time
import warnings
from collections.abc import AsyncGenerator, Iterable, Mapping
from copy import copy
from typing import Any, Optional
from typing import Any
import vllm.envs as envs
from vllm import TokensPrompt
@@ -91,7 +91,7 @@ class AsyncLLM(EngineClient):
client_addresses: dict[str, Any] | None = None,
client_count: int = 1,
client_index: int = 0,
profiler: Optional[TorchProfilerWrapper] = None, # type: ignore # noqa
profiler: TorchProfilerWrapper | None = None,
) -> None:
"""
Create an AsyncLLM.
@@ -190,6 +190,7 @@ class AsyncLLM(EngineClient):
except RuntimeError:
pass
self.profiler = profiler
if (
vllm_config.profiler_config.profiler == "torch"
and not vllm_config.profiler_config.ignore_frontend