-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
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, |
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.
can we add timing mechanism and result checking to ensure functional correctness?
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.
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, |
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.
What are the differences between this implementation of flash attention and https://github.com/intel/intel-xpu-backend-for-triton/blob/main/benchmarks/triton_kernels_benchmark/flash_attention_fwd_benchmark.py?
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.
seems many condition control, but the main difference is not using block pointer.
make it draft for now, need further discussion about how to support end2end kernel. |
No description provided.