-
Notifications
You must be signed in to change notification settings - Fork 29
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
Enable CK Attention for Navi31 #285
base: develop
Are you sure you want to change the base?
Conversation
hyoon1
commented
Nov 18, 2024
•
edited by github-actions
bot
Loading
edited by github-actions
bot
- Enables CK Attention for Navi31
- Requires this branch of Flash Attention:
- https://github.com/ROCm/flash-attention/tree/howiejay/navi_support
- Enables CK Attention for Navi31 - Requires this branch of Flash Attention: - https://github.com/ROCm/flash-attention/tree/howiejay/navi_support
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.
Is this similar to #281
Can the 2 efforts be combined?
Please also try to simplify the conditions, with this level of nested elseifs it's hard to follow the logic.
from flash_attn import flash_attn_varlen_func # noqa: F401 | ||
self.attn_func = flash_attn_varlen_func | ||
if flash_attn_available: | ||
if current_platform.has_device_capability(110): |
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.
This check isn't equivalent to is_navi
On Cuda device_capability is meant to increase with each new architecture, and is meant to differentiate by new features support, such as FP8, etc.
On ROCm it is 1st digit of gfx * 10 + 2nd digit, which doesn't mean much, especially for any future architectures.
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.
updated
PR #281 is specific to a particular vision model and does not call the path used in general LLM models. Therefore, it seems difficult to merge. The condition has been simplified to match the depth in the existing code. |