Skip to content

Commit

Permalink
cherry-pick pr fix codestyle (#56066)
Browse files Browse the repository at this point in the history
  • Loading branch information
wentaoyu committed Dec 4, 2023
1 parent 4691a94 commit 3fd5ddb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions python/paddle/nn/functional/flash_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ def flash_attention(

if sdp_func_name == "flash_attn":
if in_dynamic_mode():
(
result_attention,
result_softmax,
) = _C_ops.flash_attn(
(result_attention, result_softmax, _, _) = _C_ops.flash_attn(
query,
key,
value,
Expand Down Expand Up @@ -504,7 +501,7 @@ def scaled_dot_product_attention(
fixed_seed_offset = (None,)
return_softmax = False
rng_name = ""
out, _ = _C_ops.flash_attn(
out, _, _, _ = _C_ops.flash_attn(
query,
key,
value,
Expand Down

0 comments on commit 3fd5ddb

Please sign in to comment.