-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[ROCm][Kernel][V1] Enable AMD Radeon GPU Custom Paged Attention on v1 #17004
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
Changes from 3 commits
4f6bd68
7c49487
7af074d
b877a0d
6c1ec10
87c7c3e
b5fdeb5
12a4b93
95d92da
e6831c9
543681b
79a4f26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,13 +117,27 @@ def paged_attention_rocm( | |
| kv_cache_dtype: str, | ||
| k_scale: torch.Tensor, | ||
| v_scale: torch.Tensor, | ||
| is_navi: bool = False, | ||
| ) -> None: | ||
| torch.ops._rocm_C.paged_attention(out, exp_sum, max_logits, tmp_out, query, | ||
| key_cache, value_cache, num_kv_heads, | ||
| scale, block_tables, seq_lens, | ||
| query_start_loc, block_size, max_seq_len, | ||
| alibi_slopes, kv_cache_dtype, k_scale, | ||
| v_scale) | ||
| torch.ops._rocm_C.paged_attention(out, | ||
| exp_sum, | ||
| max_logits, | ||
| tmp_out, | ||
| query, | ||
| key_cache, | ||
| value_cache, | ||
| num_kv_heads, | ||
| scale, | ||
| block_tables, | ||
| seq_lens, | ||
| query_start_loc, | ||
| block_size, | ||
| max_seq_len, | ||
| alibi_slopes, | ||
| kv_cache_dtype, | ||
| k_scale, | ||
| v_scale, | ||
| is_navi=current_platform.is_navi()) | ||
|
||
|
|
||
|
|
||
| def mla_decode_kvcache_cpu( | ||
|
|
||
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.
Nit: Can you delete this argument. It looks like its unused.
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