-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
[V1] Enable Triton(ROCm) Attention backend for Nvidia GPUs #14071
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: Isotr0py <2037008807@qq.com>
Signed-off-by: Isotr0py <2037008807@qq.com>
|
👋 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 🚀 |
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Isotr0py <2037008807@qq.com>
| logger.info_once("Using Flash Attention backend on V1 engine.") | ||
| return ("vllm.v1.attention.backends.flash_attn." | ||
| "FlashAttentionBackend") | ||
| if cls.has_device_capability(80): |
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 think we should move these logs to debug
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.
Why should we? I think people care about this log (although I really want to provide only one option per hardware).
Signed-off-by: Isotr0py <2037008807@qq.com>
|
This pull request has merge conflicts that must be resolved before it can be |
WoosukKwon
left a comment
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.
Hi @Isotr0py, thanks for the PR!
Does Triton actually support T4? I think the support is discontinued:
Supported Hardware:
NVIDIA GPUs (Compute Capability 8.0+)
|
Hmm, at least they still kept the FMA fallback when deprecating MMAv1 on pre-Ampere GPUs. (triton-lang/triton#5066). I also ran the prefix_prefill tests and it passed on dual T4 GPUs (with |
|
@WoosukKwon According to triton team's response (triton-lang/triton#5066 (comment)), old platform with FMA support code path is still maintained on main branch, though the MMA support is deprecated for old platforms. So I think we can still use triton kernels for Volta and Turing GPUs, especially there are still lots of users using 32GB V100 to serve models. I think a compromise about this deprecation is only allowing user to specify |
|
Hi @Isotr0py, thanks for sharing the information.
This sounds like a good compromise, but I'm still a bit worried:
That being sad, I think this needs broader discussion among the community, not just me. Will reach out to you offline! |
|
I don't really have an opinion regarding how to handle older hardware, but it would be really nice to have the option to ask vLLM to enable the |
Signed-off-by: Isotr0py <2037008807@qq.com>
Signed-off-by: Isotr0py <2037008807@qq.com>
|
This pull request has merge conflicts that must be resolved before it can be |
WoosukKwon
left a comment
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.
Ok.. I'm fine with this PR then.
| logger.info_once("Using Flash Attention backend on V1 engine.") | ||
| return ("vllm.v1.attention.backends.flash_attn." | ||
| "FlashAttentionBackend") | ||
| if cls.has_device_capability(80): |
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.
Why should we? I think people care about this log (although I really want to provide only one option per hardware).
Signed-off-by: Isotr0py <2037008807@qq.com>
Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
Signed-off-by: Isotr0py <2037008807@qq.com>
Signed-off-by: Isotr0py <2037008807@qq.com>
|
Hi, I tried this PR on V100, seems it can only support |
|
@taoluo I think that's because new version |
|
Thanks for the explanation. |
Updating to be able to use vllm-project/vllm#14071. --------- Signed-off-by: Burkhard Ringlein <ngl@zurich.ibm.com>
…ect#14071) Signed-off-by: Isotr0py <2037008807@qq.com> Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
…ect#14071) Signed-off-by: Isotr0py <2037008807@qq.com> Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
…ect#14071) Signed-off-by: Isotr0py <2037008807@qq.com> Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
…ect#14071) Signed-off-by: Isotr0py <2037008807@qq.com> Co-authored-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>

Related issue: #12724
ROCmAttentiontoTritonAttentionand allow user to use it on Nvidia GPUs throughVLLM_ATTENTION_BACKEND=triton_attn_vllm_v1Tested on T4 GPU