From e523e2167a9558457f820bba54db657ba1df690e Mon Sep 17 00:00:00 2001 From: b8zhong Date: Thu, 13 Nov 2025 17:09:27 -0800 Subject: [PATCH] remove deprecated `tile_tokens_dim` (#13186) --- python/sglang/srt/layers/quantization/fp8.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/python/sglang/srt/layers/quantization/fp8.py b/python/sglang/srt/layers/quantization/fp8.py index a367d68fa..14d8671e9 100644 --- a/python/sglang/srt/layers/quantization/fp8.py +++ b/python/sglang/srt/layers/quantization/fp8.py @@ -87,7 +87,6 @@ from sglang.srt.utils import ( is_sm90_supported, is_sm100_supported, log_info_on_rank0, - next_power_of_2, print_warning_once, set_weight_attrs, use_intel_amx_backend, @@ -518,16 +517,6 @@ class Fp8LinearMethod(LinearMethodBase): ) -def get_tile_tokens_dim(num_tokens, top_k, num_experts): - # Guess tokens per expert assuming perfect expert distribution first. - num_tokens_per_expert = (num_tokens * top_k) // num_experts - # And pad the number to the next power of 2. - tile_tokens_dim = next_power_of_2(num_tokens_per_expert) - # Cap to 8-64 tokens per CTA tile as it's the range supported by the kernel. - tile_tokens_dim = min(max(tile_tokens_dim, 8), 64) - return tile_tokens_dim - - class Fp8MoEMethod(FusedMoEMethodBase): """MoE method for FP8. Supports loading FP8 checkpoints with static weight scale and @@ -1256,9 +1245,7 @@ class Fp8MoEMethod(FusedMoEMethodBase): routed_scaling_factor=( routed_scaling_factor if routed_scaling_factor is not None else 1.0 ), - tile_tokens_dim=get_tile_tokens_dim( - x.shape[0], topk_config.top_k, layer.num_experts - ), + tile_tokens_dim=None, routing_method_type=routing_method_type, use_shuffled_weight=False, )