Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkranias-amd committed Oct 2, 2024
1 parent 99f2b07 commit 0ae279c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_flash_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,6 +2086,8 @@ def test_flash_attn_kvcache(
assert nheads % nheads_k == 0, "num heads cannot be evenly split into groups"
window_size = (-1, -1) if not local else torch.randint(0, seqlen_k, (2,))

DEBUG_ENABLED = True

if DEBUG_ENABLED:
q = torch.arange(seqlen_q, dtype=dtype, device="cuda").view(1, seqlen_q, 1, 1).expand(batch_size, seqlen_q, nheads, d).requires_grad_().contiguous().to(dtype=dtype)
else:
Expand Down

0 comments on commit 0ae279c

Please sign in to comment.