"refactor: refactor_repeated_interfaces" (#32486)
Signed-off-by: tom-zju <tanjianpingzju1990@gmail.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@ from vllm.utils.deep_gemm import (
|
||||
get_mk_alignment_for_contiguous_layout,
|
||||
m_grouped_fp8_gemm_nt_contiguous,
|
||||
)
|
||||
from vllm.utils.math_utils import cdiv
|
||||
|
||||
|
||||
def _generate_optimal_warmup_m_values(
|
||||
@@ -40,9 +41,6 @@ def _generate_optimal_warmup_m_values(
|
||||
device: The torch device to get properties from.
|
||||
"""
|
||||
|
||||
def ceil_div(a: int, b: int) -> int:
|
||||
return (a + b - 1) // b
|
||||
|
||||
# DeepGEMM's possible block sizes
|
||||
block_ms = [64, 128, 256]
|
||||
block_ns = list(range(16, min(257, n + 1), 16))
|
||||
@@ -63,7 +61,7 @@ def _generate_optimal_warmup_m_values(
|
||||
for wave in range(1, 11): # Up to 10 waves
|
||||
# M where this block config transitions to next wave
|
||||
target_blocks = wave * num_sms
|
||||
m = target_blocks * block_m // ceil_div(n, block_n)
|
||||
m = target_blocks * block_m // cdiv(n, block_n)
|
||||
if 1 <= m <= max_tokens:
|
||||
m_values.add(m)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user