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

[Test] port flash attention from sglang #3011

Closed
wants to merge 2 commits into from

Conversation

Dewei-Wang-sh
Copy link
Contributor

No description provided.

@Dewei-Wang-sh Dewei-Wang-sh linked an issue Dec 16, 2024 that may be closed by this pull request
b_seq_len_extend_test = b_seq_len_extend_test.to(device)
b_start_loc_extend_test = torch.arange(0, batch_size, dtype=torch.int32) * seq_len
b_start_loc_extend_test = b_start_loc_extend_test.to(device)
extend_attention_fwd(q_test, k_test, v_test, o_tensor_ptr, k_buffer_test, v_buffer_test, req_to_tokens_test,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add timing mechanism and result checking to ensure functional correctness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to compare the result...
it's originated from end2end test

b_seq_len_extend_test = b_seq_len_extend_test.to(device)
b_start_loc_extend_test = torch.arange(0, batch_size, dtype=torch.int32) * seq_len
b_start_loc_extend_test = b_start_loc_extend_test.to(device)
extend_attention_fwd(q_test, k_test, v_test, o_tensor_ptr, k_buffer_test, v_buffer_test, req_to_tokens_test,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems many condition control, but the main difference is not using block pointer.

@Dewei-Wang-sh
Copy link
Contributor Author

make it draft for now, need further discussion about how to support end2end kernel.

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.

[e2e test] port flash attention from sglang
2 participants