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 KV loading #758

Open
carryyu opened this issue Jan 27, 2025 · 2 comments
Open

Questions about KV loading #758

carryyu opened this issue Jan 27, 2025 · 2 comments

Comments

@carryyu
Copy link

carryyu commented Jan 27, 2025

Thanks for your work!

I noticed that in the Sparse implementation, TMA is not used for KV loading. Has there been any performance comparison between this approach and the use of TMA in FA3?

@yzh119
Copy link
Collaborator

yzh119 commented Jan 27, 2025

You can change the codebase to use ampere style LDGSTS for contiguous KV-Cache.

As far as I remember, with CUDA 12.4, using LDGSTS can get around 570+ TFLOPs/s for long context causal attention while using TMA can get you ~600 TFLOPs/s. CUDA 12.3 might get you a higher TFLOPs/s because I haven't tried it by myself.

@carryyu
Copy link
Author

carryyu commented Jan 27, 2025 via email

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

2 participants