Skip to content

Conversation

@Eviannn
Copy link
Contributor

@Eviannn Eviannn commented May 6, 2025

Some models like qwen3 series still use forward_native method when q and k need to be normalized.

The reason why fused rmsnorm kernel is not being used is that before q norm and k norm, operations like split are being done, which makes q and k non-contiguous.

However, currently fused rmsnorm kernel does not support non-contiguous input. If non-contiguous input were given, the ops would not check and gave the wrong output.

To optimize, this PR add contiguous call inside rmsnorm kernel wrapper to enable fused rmsnorm kernel, and input contiguous checking is being done to ensure that non-contiguous input would never be used.

The decode time of qwen3-8b eager mode decreases from 14ms to 13ms using 1*H20.

Signed-off-by: evian <eviantai@u.nus.edu>
@github-actions
Copy link

github-actions bot commented May 6, 2025

👋 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.

🚀

@Eviannn
Copy link
Contributor Author

Eviannn commented May 6, 2025

Please take a look for me, thx a lot! @Isotr0py

Signed-off-by: evian <eviantai@u.nus.edu>
Copy link
Member

@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 this investigation!

@Isotr0py Isotr0py enabled auto-merge (squash) May 7, 2025 03:01
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label May 7, 2025
@vllm-bot vllm-bot merged commit f80ae5b into vllm-project:main May 7, 2025
97 of 100 checks passed
tjtanaavllm pushed a commit to ROCm/vllm that referenced this pull request May 9, 2025
…oject#17735)

Signed-off-by: evian <eviantai@u.nus.edu>
Co-authored-by: evian <eviantai@u.nus.edu>
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
…oject#17735)

Signed-off-by: evian <eviantai@u.nus.edu>
Co-authored-by: evian <eviantai@u.nus.edu>
Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
mawong-amd pushed a commit to ROCm/vllm that referenced this pull request May 14, 2025
…oject#17735)

Signed-off-by: evian <eviantai@u.nus.edu>
Co-authored-by: evian <eviantai@u.nus.edu>
zzzyq pushed a commit to zzzyq/vllm that referenced this pull request May 24, 2025
…oject#17735)

Signed-off-by: evian <eviantai@u.nus.edu>
Co-authored-by: evian <eviantai@u.nus.edu>
Signed-off-by: Yuqi Zhang <yuqizhang@google.com>
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.

3 participants