Skip to content

Conversation

ltoniazzi
Copy link

@ltoniazzi ltoniazzi commented Aug 18, 2025

Add code for the wonderful lecture by @t-vi about flash attention.

  • Reproduced the algo following the lecture exposition so that now it runs on par with scaled_dot_product_attention (on small tensors, on larger I think it needs better allocation of resources)
  • Moved cuda code outside the notebook
  • Added a bit of profiling to illustrate the register spilling slowdown, with code to illustrate the spilling slowdown in lecture_012/flash_attention_spilling_from_registers.cu and a main.cu to run ncu profiling (discussed in the notebook)

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.

1 participant