Skip to content

Commit 268d439

Browse files
committed
simplify code in triton kernel _correct_attn_cp_out_kernel
Signed-off-by: augusto.yjh <augusto.yjh@antgroup.com>
1 parent 744554b commit 268d439

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

vllm/attention/ops/common.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ def _correct_attn_cp_out_kernel(
8787
-float("inf"),
8888
lse_finally,
8989
)
90-
if IS_BASE_E:
91-
factor = tl.exp(lse_finally)
92-
else:
93-
factor = tl.exp2(lse_finally)
90+
factor = tl.exp(lse_finally) if IS_BASE_E else tl.exp2(lse_finally)
9491
output = tl.load(outputs_ptr + output_offsets)
9592
output = output * factor
9693

0 commit comments

Comments
 (0)