[Performance] Improve Triton prefill attention kernel's performance (#32403)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
This commit is contained in:
Isotr0py
2026-01-17 20:19:59 -08:00
committed by GitHub
parent 4a6af8813f
commit 8cc26acd8b
3 changed files with 32 additions and 47 deletions
+4
View File
@@ -2,6 +2,10 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Math utility functions for vLLM."""
# Approximate value of 1/ln(2), used for log/exp base conversion
# Best FP32 approximation: 1.4426950216 (hex 0x3FB8AA3B)
RCP_LN2 = 1.4426950216
def cdiv(a: int, b: int) -> int:
"""Ceiling division."""