[TPU] Support GCS path in VLLM_TORCH_PROFILER_DIR (#28487)
Signed-off-by: Qiliang Cui <derrhein@gmail.com>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user