Skip to content
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

Fix max_seqlens_q/k initialization for Navi GPUs #310

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions vllm/attention/ops/triton_flash_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,8 @@ def check_and_convert(t, scale):
p_descale = 1.0 / p_scale
o_descale = 1.0 / o_scale

if is_navi():
max_seqlens_q = 0
max_seqlens_k = 0
arg_max_seqlens_q = 0 if is_navi() else max_seqlens_q
arg_max_seqlens_k = 0 if is_navi() else max_seqlens_k

attn_fwd[grid](
q,
Expand Down Expand Up @@ -944,8 +943,8 @@ def check_and_convert(t, scale):
HQ=nheads_q,
HK=nheads_k,
ACTUAL_BLOCK_DMODEL=head_size,
MAX_SEQLENS_Q=max_seqlens_q,
MAX_SEQLENS_K=max_seqlens_k,
MAX_SEQLENS_Q=arg_max_seqlens_q,
MAX_SEQLENS_K=arg_max_seqlens_k,
IS_CAUSAL=causal,
VARLEN=True,
BLOCK_DMODEL=padded_d_model,
Expand Down
Loading