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

Signed-off-by: Qiliang Cui <derrhein@gmail.com>
This commit is contained in:
QiliangCui
2025-11-12 14:31:14 -08:00
committed by GitHub
parent d8140b9833
commit 3eb0c2673e

View File

@@ -824,9 +824,11 @@ environment_variables: dict[str, Callable[[], Any]] = {
# Note that it must be an absolute path. # Note that it must be an absolute path.
"VLLM_TORCH_PROFILER_DIR": lambda: ( "VLLM_TORCH_PROFILER_DIR": lambda: (
None None
if os.getenv("VLLM_TORCH_PROFILER_DIR", None) is None if (val := os.getenv("VLLM_TORCH_PROFILER_DIR")) is None
else os.path.abspath( else (
os.path.expanduser(os.getenv("VLLM_TORCH_PROFILER_DIR", ".")) val
if val.startswith("gs://") and val[5:] and val[5] != "/"
else os.path.abspath(os.path.expanduser(val))
) )
), ),
# Enable torch profiler to record shapes if set # Enable torch profiler to record shapes if set