Skip to content

Commit

Permalink
backwards cuda causal mask hack now relies on padding once and indexi…
Browse files Browse the repository at this point in the history
…ng out
  • Loading branch information
lucidrains committed Apr 8, 2024
1 parent 228d824 commit 0b5d5af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions ring_attention_pytorch/ring_flash_attention_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,12 +767,6 @@ def backward(ctx, do):

else:
ring_dq, ring_dk, ring_dv = 0., 0., 0.

q = q[:, :row_length]
o = o[:, :row_length]
do = do[:, :row_length]
lse = lse[..., :row_length]

else:

(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'ring-attention-pytorch',
packages = find_packages(exclude=[]),
version = '0.3.6',
version = '0.3.7',
license='MIT',
description = 'Ring Attention - Pytorch',
author = 'Phil Wang',
Expand Down

0 comments on commit 0b5d5af

Please sign in to comment.