[Gluon] [Triton] [MI450] [MI350] Enable Unified Attention option for decode#566
Open
[Gluon] [Triton] [MI450] [MI350] Enable Unified Attention option for decode#566
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables Unified Attention option for decode (Triton for MI350 and Gluon for MI450)
On MI350, the implementation here is just to verify the results on MI350. The primary purpose of this PR is to enable Gluon Unified Attention for decode on MI450.
Triton/Gluon Unified Attention right now supports shuffling of both Key and Value cache, therefore, I also edited
atom/model_engine/model_runner.pyto fix the layout for Value cache.I added an env var
ATOM_ENABLE_TRITON_UNIFIED_ATTENTION_DECODEfor the user to toggle between Unified Attention or Gluon Paged Attention.The block size has to be fixed to 64 for BF16 KV cache and 128 for FP8 KV cache, so I also added the switch at
atom/model_ops/attentions/aiter_attention.pyThis PR depends on ROCm/aiter#2472
Server commend:
lm_eval results (TP1):
lm_eval results (TP8)