Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions vllm/executor/ray_distributed_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ class RayWorkerMetaData:


class RayDistributedExecutor(DistributedExecutorBase):
"""Ray-based distributed executor"""

# These env vars are used at installation time, therefore are NOT copied
# from the driver to the workers
INSTALL_TIME_ENV_VARS = set([
"VLLM_TARGET_DEVICES", "MAX_JOBS", "NVCC_THREADS",
"VLLM_USE_PRECOMPILED", "CMAKE_BUILD_TYPE", "VERBOSE",
"VLLM_CONFIG_ROOT"
])

# These env vars are worker-specific, therefore are NOT copied
# from the driver to the workers
WORKER_SPECIFIC_ENV_VARS = set([
"VLLM_HOST_IP", "VLLM_HOST_PORT", "LOCAL_RANK", "CUDA_VISIBLE_DEVICES"
])

uses_ray: bool = True

Expand Down Expand Up @@ -311,9 +326,9 @@ def sort_by_driver_then_worker_ip(item: RayWorkerMetaData):

# Environment variables to copy from driver to workers
env_vars_to_copy = [
"VLLM_ATTENTION_BACKEND", "TPU_CHIPS_PER_HOST_BOUNDS",
"TPU_HOST_BOUNDS", "VLLM_USE_V1", "VLLM_TRACE_FUNCTION",
"VLLM_TORCH_PROFILER_DIR", "VLLM_TEST_ENABLE_EP"
v for v in envs.environment_variables
if v not in self.INSTALL_TIME_ENV_VARS
and v not in self.WORKER_SPECIFIC_ENV_VARS
]

# Copy existing env vars to each worker's args
Expand Down