Skip to content

Commit

Permalink
test: removed dropout test for varlen
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkranias-amd committed Nov 7, 2024
1 parent ea3e72d commit 547b828
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flash_attn/flash_attn_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,8 @@ def flash_attn_varlen_kvpacked_func(
max_seqlen_q,
max_seqlen_k,
dropout_p=0.0,
dropout_philox_seed=0,
dropout_philox_offset=0,
softmax_scale=None,
causal=False,
window_size=(-1, -1), # -1 means infinite context window
Expand Down Expand Up @@ -1398,6 +1400,8 @@ def flash_attn_varlen_kvpacked_func(
max_seqlen_q,
max_seqlen_k,
dropout_p,
dropout_philox_seed,
dropout_philox_offset,
softmax_scale,
causal,
window_size,
Expand Down
5 changes: 5 additions & 0 deletions tests/test_flash_attn_triton_amd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,9 @@ def test_flash_attn_varlen_output(
seqlen_q, seqlen_k, d, dropout_p, causal, local, alibi, deterministic, mha_type, dtype, kvpacked, softcap
):
if USE_TRITON_ROCM:

if dropout_p != 0.0:
pytest.skip("varlen does not support dropout on AMD Triton Backend currently.")

if USE_REF and dropout_p != 0.0:
pytest.skip("USE_REF not supported when Dropout is enabled.")
Expand Down Expand Up @@ -1347,6 +1350,8 @@ def test_flash_attn_varlen_output(
max_seqlen_q,
max_seqlen_k,
dropout_p,
dropout_philox_seed=dropout_philox_seed,
dropout_philox_offset=dropout_philox_offset,
causal=causal,
window_size=window_size,
softcap=softcap,
Expand Down

0 comments on commit 547b828

Please sign in to comment.