-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[TPU] Use Ray for default distributed backend #8389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
@WoosukKwon I'm curious of the reason not to use multiprocessing distributed backend for this? |
@njhill Good question. Actually, the MP backend would also work for TPUs. However, I think users such as GKE prefer Ray, because 1) they are interested in multi-host inference (which TPU is quite good at), and 2) they are already familiar with Ray. |
@@ -869,6 +869,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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I think this line should be enough to change the default backend to ray in tpu case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh the error is for those who use distributed_executor_backend="mp"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to error if users explicitly specify the mp backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MP backend is not supported for TPUs at the moment. Without this line, the user will get the error:
"/vllm/engine/llm_engine.py", line 505, in _get_executor_cls
assert distributed_executor_backend is None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by Actually, the MP backend would also work for TPUs
so MP backend for TPU is actually not implemented yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We don't have a executor for tpu + mp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @njhill if you have any misunderstanding. it is because we currently only have ray backend supported in tpu.
Signed-off-by: Alvant <[email protected]>
Signed-off-by: LeiWang1999 <[email protected]>
No description provided.