Skip to content

Commit 7f15118

Browse files
algo-homeCopilot
andauthored
Update csrc/flash_dmattn/flash_api.cpp
Co-authored-by: Copilot <[email protected]>
1 parent 9181f70 commit 7f15118

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csrc/flash_dmattn/flash_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ mha_bwd(
986986
: torch::zeros({batch_size, num_heads, seqlen_q, seqlen_k_rounded}, opts)
987987
: dbias
988988
: torch::empty({0}, opts);
989-
bool accum_dbias = has_bias && seqlen_q_bias != seqlen_q && seqlen_q_bias == 1;
989+
bool accum_dbias = has_bias && (seqlen_q_bias == 1 && seqlen_q != 1);
990990

991991
Flash_bwd_params params;
992992

0 commit comments

Comments
 (0)