[Kernel][Amd] Add fp8 kv cache support for rocm custom paged attention (#8577)

This commit is contained in:
Charlie Fu
2024-09-19 17:37:57 +00:00
committed by GitHub
parent 76515f303b
commit 9cc373f390
6 changed files with 245 additions and 282 deletions
+3 -1
View File
@@ -146,12 +146,14 @@ def paged_attention_rocm(
max_seq_len: int,
alibi_slopes: Optional[torch.Tensor],
kv_cache_dtype: str,
k_scale: float,
v_scale: float,
) -> 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,
block_size, max_seq_len, alibi_slopes,
kv_cache_dtype)
kv_cache_dtype, k_scale, v_scale)
# pos encoding ops