Skip to content

Commit

Permalink
fix minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
micmelesse committed Aug 8, 2024
1 parent 9690410 commit 182479c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_flash_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2823,7 +2823,7 @@ def test_flash_attn_varlen_deterministic(seqlen_q, seqlen_k, swap_sq_sk, d, caus
)

g = torch.randn_like(out)
test_backward = test_backward and (d <= MAX_HEADDIM_SM8x or d > 224) or (is_sm80 or is_sm90)
test_backward = test_backward and ((d <= MAX_HEADDIM_SM8x or d > 224) or (is_sm80 or is_sm90))
if test_backward:
dq, dk, dv = torch.autograd.grad(out, (q_unpad, k_unpad, v_unpad), g, retain_graph=True)
for _ in range(50):
Expand Down

0 comments on commit 182479c

Please sign in to comment.