Skip to content

Commit

Permalink
[TPU] Use Ray for default distributed backend (vllm-project#8389)
Browse files Browse the repository at this point in the history
  • Loading branch information
WoosukKwon authored and MengqingCao committed Sep 30, 2024
1 parent 53e2f15 commit 88da6d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,13 @@ def __init__(
f"distributed executor backend "
f"'{self.distributed_executor_backend}'.")

if current_platform.is_tpu() and self.world_size > 1:
if self.distributed_executor_backend is None:
self.distributed_executor_backend = "ray"
if self.distributed_executor_backend != "ray":
raise ValueError(
"TPU backend only supports Ray for distributed inference.")

if self.distributed_executor_backend is None and self.world_size > 1:
# We use multiprocessing by default if world_size fits on the
# current node and we aren't in a ray placement group.
Expand Down

0 comments on commit 88da6d9

Please sign in to comment.