Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
flash-attention
Commits
4c8ff915
"example/01_gemm/gemm_dl_fp16.cpp" did not exist on "6260ced2f3a4d9a2a832563905135c01ba72b56b"
Unverified
Commit
4c8ff915
authored
Sep 25, 2023
by
Katherine Crowson
Committed by
GitHub
Sep 25, 2023
Browse files
Fix NameError and typo in ApplyRotaryEmbQKV_ (#569)
parent
0a1d03c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
flash_attn/layers/rotary.py
flash_attn/layers/rotary.py
+3
-3
No files found.
flash_attn/layers/rotary.py
View file @
4c8ff915
...
@@ -193,16 +193,16 @@ class ApplyRotaryEmbQKV_(torch.autograd.Function):
...
@@ -193,16 +193,16 @@ class ApplyRotaryEmbQKV_(torch.autograd.Function):
sin_k
=
sin
if
sin_k
is
None
else
sin_k
sin_k
=
sin
if
sin_k
is
None
else
sin_k
dq
,
dk
=
dqkv
[:,
:,
0
],
dqkv
[:,
:,
1
]
dq
,
dk
=
dqkv
[:,
:,
0
],
dqkv
[:,
:,
1
]
apply_rotary
(
apply_rotary
(
dq
,
cos
,
sin
,
seqlen_offsets
,
interleaved
=
interleaved
,
inplace
=
True
,
conjugate
=
True
dq
,
cos
,
sin
,
seqlen_offsets
,
interleaved
=
ctx
.
interleaved
,
inplace
=
True
,
conjugate
=
True
)
)
apply_rotary
(
apply_rotary
(
dk
,
dk
,
cos_k
,
cos_k
,
sin_k
,
sin_k
,
seqlen_offsets
,
seqlen_offsets
,
interleaved
=
interleaved
,
interleaved
=
ctx
.
interleaved
,
inplace
=
True
,
inplace
=
True
,
conju
d
ate
=
True
,
conju
g
ate
=
True
,
)
)
return
dqkv
,
None
,
None
,
None
,
None
,
None
,
None
return
dqkv
,
None
,
None
,
None
,
None
,
None
,
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment