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] Enhance test_pos_encoding to support execution on multi-devices #13187

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

wchen61
Copy link
Contributor

@wchen61 wchen61 commented Feb 13, 2025

"The test case in test_pos_encoding.py frequently fails when run in a multi-device environment.
FAILED test_pos_encoding.py::test_rotary_embedding[cuda:1-0-dtype0-32-120-17-8192-5-False] - RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argument for argument index in method wrapper_CUDA__inde...
The issue arises because the rope created in this case does not specify a device, so it is always created on device 0, even if a default device is set. This patch fixes the problem, allowing the test case to pass when running on multiple devices.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

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 either: Add ready label to the PR or enable auto-merge.

🚀

@wchen61 wchen61 force-pushed the support_test_pos_encoding branch from 63cd2a2 to 54d63b0 Compare February 13, 2025 03:17
Copy link
Collaborator

@Isotr0py Isotr0py left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! The test passed locally with 2 GPUs with this fix.

@Isotr0py Isotr0py enabled auto-merge (squash) February 16, 2025 06:56
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 16, 2025
@Isotr0py Isotr0py merged commit dc0f7cc into vllm-project:main Feb 16, 2025
43 checks passed
panf2333 pushed a commit to yottalabsai/vllm that referenced this pull request Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants