Skip to content

Conversation

wxsIcey
Copy link
Contributor

@wxsIcey wxsIcey commented Sep 19, 2025

Purpose

[Qwen] Changed device specification from hard-coded CUDA devices to platform-independent device selectors

Test Plan

Test through the exsiting tests


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

…latform-independent device selectors

Signed-off-by: Icey <1790571317@qq.com>
@wxsIcey wxsIcey requested a review from sighingnow as a code owner September 19, 2025 09:43
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 ask your reviewers to trigger select CI tests on top of fastcheck CI.

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.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

@mergify mergify bot added the qwen Related to Qwen models label Sep 19, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the device specification in the Qwen3-Next model to be platform-independent. The change replaces a hard-coded CUDA device reference (torch.cuda.current_device()) with a platform-agnostic device selector (current_platform.current_device()). This is a good improvement for code portability across different hardware backends like CUDA, ROCm, and others supported by vLLM. The implementation is correct and follows the established pattern for platform abstraction in the codebase. I have no further comments.

@wxsIcey wxsIcey changed the title [Qwen] Changed device specification from hard-coded CUDA devices to platform-independent device selectors [Qwen] Remove cuda hard-code in qwen3 next Sep 19, 2025
@MengqingCao
Copy link
Contributor

LGTM, this make it easier for oot platforms to support Qwen3 Next, thx!

@jeejeelee jeejeelee added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 19, 2025
@jeejeelee jeejeelee enabled auto-merge (squash) September 19, 2025 10:05
@jeejeelee jeejeelee merged commit 838d711 into vllm-project:main Sep 19, 2025
63 checks passed
debroy-rh pushed a commit to debroy-rh/vllm that referenced this pull request Sep 19, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
charlifu pushed a commit to ROCm/vllm that referenced this pull request Sep 25, 2025
Signed-off-by: Icey <1790571317@qq.com>
Signed-off-by: charlifu <charlifu@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qwen Related to Qwen models 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.

3 participants