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 a wrong reference to seqlen_k variable in the fwd_splitkv kernel #1455

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

muoshuosha
Copy link
Contributor

Use params.seqlen_k is wrong with varlen cases,this bug had been fixed in vllm-project/flash-attntion

@muoshuosha
Copy link
Contributor Author

params.seqlen_k also is wrong in page attn when use cu_seqlen_k store the real seqlen_k

if (seqlens_k_.has_value()) {
auto seqlens_k = seqlens_k_.value();
TORCH_CHECK(seqlens_k.dtype() == torch::kInt32, "seqlens_k must have dtype int32");
CHECK_DEVICE(seqlens_k);
CHECK_CONTIGUOUS(seqlens_k);
CHECK_SHAPE(seqlens_k, batch_size);
params.cu_seqlens_k = static_cast<int *>(seqlens_k.data_ptr());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant