Skip to content

Commit

Permalink
flash-attn v2.0.3 fixed this issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Aug 3, 2023
1 parent 8d1a8e5 commit 698532d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions xformers/ops/fmha/flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,6 @@ class BwOp(AttentionBwOpBase):

MAX_HEADDIM_SM8x = 192

@classmethod
def shape_not_supported_reasons(
cls, Mq: int, Mkv: int, K: int, Kv: int
) -> List[str]:
reasons = super().shape_not_supported_reasons(Mq, Mkv, K, Kv)
if (Mq % 128) or (Mkv % 128):
reasons.append(
"flashv2 beta: BW is incorrect when seqlen is not aligned on 128 "
"(https://github.com/Dao-AILab/flash-attention/issues/334)"
)
return reasons

@classmethod
def not_supported_reasons(cls, d: Inputs) -> List[str]:
reasons = super(BwOp, cls).not_supported_reasons(d)
Expand Down

0 comments on commit 698532d

Please sign in to comment.