Fix notation and clarification of Puzzle 9#16
Fix notation and clarification of Puzzle 9#16alexzhang13 wants to merge 1 commit intogpu-mode:mainfrom
Conversation
The notation for the softmax in Puzzle 9 is both confusing and wrong. The indexing is not the outer product, and also the inclusion of an extra variable B1 is a bit ambiguous. I think the new description (minor change) is more clear.
|
Hi @alexzhang13 , function arguments are also not complete... but here i found: @triton.jit
def flashatt_kernel(
q_ptr, k_ptr, v_ptr, z_ptr, N0, T, B0: tl.constexpr, B1: tl.constexpr
): |
|
+1 that the current notation for Puzzle 9 is confusing/potentially incorrect, and also that As @VachanVY mentioned, it looks like it's been fixed/improved in The missing and then calls it with: |
|
This was fixed |

The notation for the softmax in Puzzle 9 is confusing. The current indexing is not representative of the outer product, and also the inclusion of an extra variable B1 is a bit ambiguous. I think the new description (minor change) is more clear.
The new notation also makes it clear the relationship between the
kvector andvvector, which is important for understanding how the full flash attention is done.