Skip to content
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

[Hardware][Gaudi] Add multiprocessing HPU executor #11030

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kzawora-intel
Copy link
Contributor

@kzawora-intel kzawora-intel commented Dec 9, 2024

This PR adds support for single-node tensor parallelism on HPU using multiprocessing instead of ray. Following other backends' convention, if distributed executor is needed, mp backend is selected by default, while ray still remains an option when --distributed-executor-backend ray is provided.

Requires fixes from #11028 to work, although it is functionally unrelated to that PR.

Copy link

github-actions bot commented Dec 9, 2024

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@jikunshang
Copy link
Contributor

is there any limitation of using spawn or fork to start new process on Gaudi? see description here
we add a check on XPU side which only support spawn method. see https://github.com/vllm-project/vllm/blob/main/vllm/executor/multiproc_xpu_executor.py#L11

@kzawora-intel kzawora-intel force-pushed the private/kzawora/upstream_mp_executor branch from aa46efe to c70ece6 Compare December 10, 2024 11:02
@kzawora-intel
Copy link
Contributor Author

kzawora-intel commented Dec 10, 2024

is there any limitation of using spawn or fork to start new process on Gaudi? see description here we add a check on XPU side which only support spawn method. see https://github.com/vllm-project/vllm/blob/main/vllm/executor/multiproc_xpu_executor.py#L11

There is no issue with starting the process with both spawn and fork on Gaudi. Either of them can be used to perform tensor parallel inference successfully. There is some issue with ending it though - I've observed deadlocks on application exit when processes were created with fork (vLLM process had to be forcefully killed), and no such behavior with spawn. This is under investigation. In the meantime, I've added some warnings in vllm/executor/multiproc_worker_utils.py about this, and for this reason, we'll default to spawn, although fork can still be explicitly requested and it works fine, if you're fine with possibly killing the process manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants