[Refactor] Remove duplicate ceil_div (#20023)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2025-06-25 05:19:09 +00:00
committed by GitHub
parent 7108934142
commit 879f69bed3
7 changed files with 20 additions and 42 deletions
@@ -6,11 +6,7 @@ import torch
from vllm import _custom_ops as ops
from vllm.triton_utils import tl, triton
from vllm.utils import round_up
def ceil_div(a, b):
return (a + b - 1) // b
from vllm.utils import cdiv, round_up
@triton.jit
@@ -115,7 +111,7 @@ def moe_align_block_size_triton(
cumsum = torch.zeros((num_experts + 1, ),
dtype=torch.int32,
device=topk_ids.device)
tokens_per_thread = ceil_div(numel, num_experts)
tokens_per_thread = cdiv(numel, num_experts)
moe_align_block_size_stage1[grid](
topk_ids,