@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3eb0c2673e
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 13, 08:15 UTC

[TPU] Support GCS path in VLLM_TORCH_PROFILER_DIR (#28487)

Signed-off-by: Qiliang Cui <derrhein@gmail.com>

QiliangCui committed Nov 12, 2025 at 14:31 UTC 3eb0c2673e128714073f7e3fd105cf962a4c8c16
1 file changed +5 -3
vllm/envs.py
+5 -3
@@ -824,9 +824,11 @@ environment_variables: dict[str, Callable[[], Any]] = {
824 # Note that it must be an absolute path.
825 "VLLM_TORCH_PROFILER_DIR": lambda: (
826 None
827 - if os.getenv("VLLM_TORCH_PROFILER_DIR", None) is None
828 - else os.path.abspath(
829 - os.path.expanduser(os.getenv("VLLM_TORCH_PROFILER_DIR", "."))
827 + if (val := os.getenv("VLLM_TORCH_PROFILER_DIR")) is None
828 + else (
829 + val
830 + if val.startswith("gs://") and val[5:] and val[5] != "/"
831 + else os.path.abspath(os.path.expanduser(val))
832 )
833 ),
834 # Enable torch profiler to record shapes if set