-
- Notifications
You must be signed in to change notification settings - Fork 12.1k
[Attention] Refactor CUDA attention backend selection logic #24794
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
[Attention] Refactor CUDA attention backend selection logic #24794
Conversation
| This pull request has merge conflicts that must be resolved before it can be |
| @MatthewBonanni how hard would it be to keep backwards compatibility between |
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
@LucasWilkinson done in d0f4698 |
| Discussed offline thanks for the work @MatthewBonanni ! |
| return AttentionBackendEnum[name] | ||
| | ||
| | ||
| class _Backend(metaclass=_BackendMeta): |
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.
Nice change
mgoin 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.
Release has been cut, let's go for it on main
| The merge commit of this PR failed |
…ject#24794) Signed-off-by: Matthew Bonanni <mbonanni@redhat.com> Signed-off-by: Matthew Bonanni <mbonanni001@gmail.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
…ject#24794) Signed-off-by: Matthew Bonanni <mbonanni@redhat.com> Signed-off-by: Matthew Bonanni <mbonanni001@gmail.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
…ject#24794) Signed-off-by: Matthew Bonanni <mbonanni@redhat.com> Signed-off-by: Matthew Bonanni <mbonanni001@gmail.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com> Signed-off-by: Xingyu Liu <charlotteliu12x@gmail.com>
Purpose
CudaPlatformBase.get_attention_backend_clshas gotten complex and messy over time. This PR cleans up the logic (without changing the behavior) and standardizes the interface.Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.