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

[bugfix][distributed] fix multi-node bug for shared memory #6597

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

youkaichao
Copy link
Member

fixes #6564

Copy link

👋 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 consists a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of default ones by unblocking the steps in your fast-check build on Buildkite UI.

Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge).

To run full CI, you can do one of these:

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

🚀

assert self.shared_memory.size == self.total_bytes_of_buffer
try:
self.shared_memory = shared_memory.SharedMemory(name=name)
assert self.shared_memory.size == self.total_bytes_of_buffer # noqa
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qq: what is this noqa for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

longer than 79 chars

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super minor, but then you can parentheses

Suggested change
assert self.shared_memory.size == self.total_bytes_of_buffer # noqa
assert (self.shared_memory.size == self.total_bytes_of_buffer)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do it later, too busy rn :(

@njhill
Copy link
Member

njhill commented Jul 19, 2024

@youkaichao wouldn't the right thing to be to not attempt to use ShmRingBuffer at all for TP groups that span nodes?

@youkaichao
Copy link
Member Author

@njhill even for a group that spans nodes, we use shm for the ranks inside the node, and zmq for ranks outside the node.

this is, actually, in preparation for the future, the alternative to ray dag implementation.

@youkaichao youkaichao merged commit 07eb6f1 into vllm-project:main Jul 19, 2024
22 of 28 checks passed
@youkaichao youkaichao deleted the fix_shm branch July 19, 2024 23:17
cduk pushed a commit to cduk/vllm-pascal that referenced this pull request Aug 6, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
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.

[Bug]: Distributed Inference and Serving
4 participants