Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Triton-Puzzles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -736,11 +736,9 @@
"\n",
"A scalar version of FlashAttention.\n",
"\n",
"Uses zero programs. Block size `B0` represents `k` of length `N0`.\n",
"Block size `B0` represents `q` of length `N0`. Block size `B0` represents `v` of length `N0`.\n",
"Sequence length is `T`. Process it `B1 < T` elements at a time. \n",
"Uses **zero** programs. Block size `B0` represents `k`, `q`, and `v`, all of length `N0`. Sequence length is `T`. Process it `B1 < T` elements at a time for some `B1`. \n",
"\n",
"$$z_{i} = \\sum_{j} \\text{softmax}(q_1 k_1, \\ldots, q_T k_T)_j v_{j} \\text{ for } i = 1\\ldots N_0$$\n",
"$$z_{i} = \\sum_{j=1}^{N_0} \\text{softmax}(q_1 k_j, \\ldots, q_T k_j) v_{j} \\text{ for } i = 1\\ldots N_0$$\n",
"\n",
"This can be done in 1 loop using a similar trick from the last puzzle."
]
Expand Down