Skip to content

Conversation

comaniac
Copy link
Collaborator

@comaniac comaniac commented Jul 12, 2024

This PR fixes the illegal memory access error that frequently happens after #6029. It seems like the following lines cause the problem:

intermediate_cache1 = intermediate_cache1[:tokens_in_chunk]
intermediate_cache2 = intermediate_cache2[:tokens_in_chunk]
intermediate_cache3 = intermediate_cache3[:tokens_in_chunk]

The chunk size is 64*1024, so in most cases we only have one chunk and this line should have no effect. So I have no idea why this causes the issue. This PR simply avoids this branch when we only have one chunk.

cc @robertgshaw2-neuralmagic @mgoin @pcmoritz

@comaniac comaniac changed the title [Bugfix] Fix illegal memory access in MoE kernel [Bugfix] Fix illegal memory access in FP8 MoE kernel Jul 12, 2024
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 trigger fastcheck CI to run, which consists only a small and essential subset of tests to quickly catch small errors.

Full CI run is still required to merge this PR so please make sure that you run full CI before merging or if you need more test signals.

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

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

🚀

@comaniac comaniac added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 12, 2024
Copy link
Member

@mgoin mgoin 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 tracking this down, this is good to get FP8 MoE working again in most cases

@comaniac comaniac enabled auto-merge (squash) July 12, 2024 18:59
@comaniac comaniac merged commit 75f64d8 into vllm-project:main Jul 12, 2024
@comaniac comaniac deleted the fix-moe branch July 12, 2024 21:33
xjpang pushed a commit to xjpang/vllm that referenced this pull request Jul 24, 2024
Alvant pushed a commit to compressa-ai/vllm that referenced this pull request Oct 26, 2024
LeiWang1999 pushed a commit to LeiWang1999/vllm-bitblas that referenced this pull request Mar 26, 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