-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Performance][ROCm] Add skinny gemms for unquantized linear on ROCm #15830
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
Conversation
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
👋 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 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 🚀 |
Signed-off-by: charlifu <[email protected]>
Can you merge from main to fix the Docker build issue? |
Signed-off-by: charlifu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a first pass. I haven't gone through the kernel. Can you add some unit tests that will exercise this kernel?
("true", "1")), | ||
|
||
# use rocm skinny gemms | ||
"VLLM_ROCM_USE_SKINNY_GEMM": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm somewhat hesitant to have this on by default. It looks like it only gives modest gains in low batch scenarios? Is this generally true or just for llama?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this a bit offline. Since this has been on by default in the rocm fork, which is deployed in customer environments, for some time, I'm fine with having it on by default.
Signed-off-by: charlifu <[email protected]>
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
@SageMoore Unit test added. Let me you know you wanna add more shapes to test. BTW, for the dispatch logic to select different gemm method, I am copying #14916. We might need to merge aiter code path with this PR. |
Signed-off-by: charlifu <[email protected]>
Signed-off-by: charlifu <[email protected]>
# fp8 rowwise scaling in torch._scaled_mm is introduced in | ||
# https://github.com/pytorch/pytorch/pull/144432 using | ||
# hipBLASLt and ROCm 6.3, which only exists in torch 2.7 and above. | ||
# For CUDA platform please validate if the | ||
# torch._scaled_mm support rowwise scaled GEMM | ||
# Fused GEMM_DQ Rowwise GEMM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is already in vLLM so not a problem with this PR in particular but why are landing comments like this one?
Who is the audience for this message? Who is supposed to "please validate if torch._scaled_mm support rowwise scaled GEMM" on CUDA? The user?
Head branch was pushed to by a user without write access
This pull request has merge conflicts that must be resolved before it can be |
Co-authored-by: Tyler Michael Smith <[email protected]> Signed-off-by: charlifu <[email protected]>
78b854e
to
6535863
Compare
Signed-off-by: charlifu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good to me.
Kernel test timeout is a known issue, and could be force merged. I want to make sure the other test failures are not problems with this PR, so have re-run them. (The lm-eval-small-models test failure is suspicious but it passes locally for me using this branch)
…llm-project#15830) Signed-off-by: charlifu <[email protected]> Co-authored-by: Tyler Michael Smith <[email protected]> Signed-off-by: Frieda (Jingying) Huang <[email protected]>
…llm-project#15830) Signed-off-by: charlifu <[email protected]> Co-authored-by: Tyler Michael Smith <[email protected]>
…llm-project#15830) Signed-off-by: charlifu <[email protected]> Co-authored-by: Tyler Michael Smith <[email protected]>
…llm-project#15830) Signed-off-by: charlifu <[email protected]> Co-authored-by: Tyler Michael Smith <[email protected]> Signed-off-by: Agata Dobrzyniewicz <[email protected]>
…llm-project#15830) Signed-off-by: charlifu <[email protected]> Co-authored-by: Tyler Michael Smith <[email protected]> Signed-off-by: Mu Huai <[email protected]>
This PR adds skinny gemms for unquantized linear (bf16 and fp16) op on ROCm to achieve better performance when the batch size is <= 2.
Llama 3.1 70b, fp16