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

Questions about bf16 support and correctness check #12

Open
xiabingquan opened this issue Sep 11, 2024 · 1 comment
Open

Questions about bf16 support and correctness check #12

xiabingquan opened this issue Sep 11, 2024 · 1 comment

Comments

@xiabingquan
Copy link

Dear Alex.
Thanks for this great repo. The flash attention community really needs this feature.
I'm trying to integrate this repo in my own project, but encounter two issues:

  • torch.bfloat16 is not supported. It seems that this repo only support torch.fp32, torch.fp16 and fp8. I'm wondering how should I modify the code to support bfloat16.
  • How to ensure the results are correct. The benchmark scripts only provides speed comparsions, but not numerical check with the ground truth implementation. How can I make sure that the forward and backward results are correct?

Thanks for your reply!

@xiabingquan
Copy link
Author

Also, any detailed tutorial on how to implement flash attention with Triton is appreciated!

Tri Dao and Triton tutorials offer their implementations, but reading them from scratch will be a tough job

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

No branches or pull requests

1 participant