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

flash_attn_with_kvcach return block_lse or attention_score #1301

Open
NonvolatileMemory opened this issue Oct 28, 2024 · 2 comments
Open

flash_attn_with_kvcach return block_lse or attention_score #1301

NonvolatileMemory opened this issue Oct 28, 2024 · 2 comments

Comments

@NonvolatileMemory
Copy link

Hi Dao,

The flash_attn_with_kvcach function currently does not return the intermediate outputs, such as block_lse or attention_score, which are useful for further analysis or debugging. Can you add an option to return these outputs would enhance flexibility and allow users to gain more insight into the attention computation process.

@tridao
Copy link
Contributor

tridao commented Oct 28, 2024

Yeah can you add a PR?

@NonvolatileMemory
Copy link
Author

I have a triton version but the speed is 2x slower than your cuda code.

But I don't know how to impl it with cuda code. But it should not be very hard, especially for block_lse, so can you slightly modify the code to support this func?

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