Skip to content

Fix overflow in awq kernel#1295

Merged
WoosukKwon merged 2 commits into
vllm-project:mainfrom
chu-tianxiang:awq_fix
Oct 11, 2023
Merged

Fix overflow in awq kernel#1295
WoosukKwon merged 2 commits into
vllm-project:mainfrom
chu-tianxiang:awq_fix

Conversation

@chu-tianxiang

Copy link
Copy Markdown
Contributor

Fix overflow problem in #1236.
For Mistral model, the output dimension of gate_up_proj is 14336 * 2 = 28672 and maximum blockIdx_z is 7, so when a length over 2147483647 / 7 / 28672 = 10699 would cause overflow. (Considering the padding in vllm, the maximum is actually 10699 // 8 * 8 + 1 = 10697)

@casper-hansen

Copy link
Copy Markdown
Contributor

Thank you so much for this fix! This will enable other long-context models to be more easily implemented. @WoosukKwon @zhuohan123 Let's get this merged soon!

@WoosukKwon
WoosukKwon self-requested a review October 10, 2023 16:58

@WoosukKwon WoosukKwon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@chu-tianxiang Thanks for the fix! Left a small question. Please check it out!

Comment thread csrc/quantization/awq/gemm_kernels.cu Outdated

@WoosukKwon WoosukKwon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks again for fixing the bug!

@WoosukKwon
WoosukKwon merged commit 980dd4a into vllm-project:main Oct 11, 2023
s4rduk4r added a commit to s4rduk4r/AutoAWQ that referenced this pull request Nov 22, 2023
hongxiayang pushed a commit to hongxiayang/vllm that referenced this pull request Feb 13, 2024
pi314ever pushed a commit to pi314ever/vllm that referenced this pull request May 22, 2025
…del. (vllm-project#1295)

the issue as the PR descripted
HabanaAI/vllm-hpu-extension#184, and have merged
in vllm-hpu-extension repo side, so I update the commit to use it.

Signed-off-by: changwangss <[email protected]>
WeNeedMoreCode pushed a commit to WeNeedMoreCode/vllm that referenced this pull request Dec 15, 2025
### What this PR does / why we need it?
Add sleep related doc and example

---------

Signed-off-by: wangli <[email protected]>
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.

3 participants