Revert "[Perf][GLM-5.2] Blackwell decode optimizations" (#49768)

This commit is contained in:
Woosuk Kwon
2026-07-24 16:04:59 -07:00
committed by GitHub
parent 33c4f3551c
commit 213f681f81
29 changed files with 138 additions and 2139 deletions
@@ -43,7 +43,7 @@ try:
if flashinfer_comm is not None
else None
)
except (ImportError, AttributeError):
except ImportError:
flashinfer_trtllm_fused_allreduce_norm = None # type: ignore[assignment]
get_fi_ar_workspace = None # type: ignore[assignment]
_AR_RESIDUAL_RMS_NORM = None
@@ -52,23 +52,12 @@ except (ImportError, AttributeError):
_FI_SUPPORTED_DTYPES = (torch.bfloat16, torch.float16)
@torch.compiler.assume_constant_result
def _fi_ar_max_size_mb() -> dict[int, float]:
"""Flashinfer all-reduce fusion size table for the current device.
Device capability is constant; marking the result constant keeps this out
of the traced graph. Otherwise the per-forward call reaches
``current_platform.get_device_capability()`` inside ``torch.compile`` and
graph-breaks ("can't handle functions not implemented in python")."""
from vllm.config.compilation import PassConfig
return PassConfig.default_fi_allreduce_fusion_max_size_mb()
def _max_token_num(tp_size: int, hidden_size: int, dtype: torch.dtype) -> int | None:
"""Workspace token budget for flashinfer fused all-reduce, or None if the
current world size / device is unsupported. Mirrors ``FlashInferAllReduce``."""
max_size_mb = _fi_ar_max_size_mb().get(tp_size)
from vllm.config.compilation import PassConfig
max_size_mb = PassConfig.default_fi_allreduce_fusion_max_size_mb().get(tp_size)
if not max_size_mb:
return None
element_size = torch.tensor([], dtype=dtype).element_size()
+1 -2
View File
@@ -114,7 +114,7 @@ _TEXT_GENERATION_MODELS = {
"Glm4ForCausalLM": ("glm4", "Glm4ForCausalLM"),
"Glm4MoeForCausalLM": ("glm4_moe", "Glm4MoeForCausalLM"),
"Glm4MoeLiteForCausalLM": ("glm4_moe_lite", "Glm4MoeLiteForCausalLM"),
"GlmMoeDsaForCausalLM": ("vllm.models.deepseek_v32", "GlmMoeDsaForCausalLM"),
"GlmMoeDsaForCausalLM": ("deepseek_v2", "GlmMoeDsaForCausalLM"),
"GptOssForCausalLM": ("gpt_oss", "GptOssForCausalLM"),
"GPT2LMHeadModel": ("gpt2", "GPT2LMHeadModel"),
"GPTJForCausalLM": ("gpt_j", "GPTJForCausalLM"),
@@ -628,7 +628,6 @@ _SPECULATIVE_DECODING_MODELS = {
"Eagle3DeepseekV3ForCausalLM": ("deepseek_eagle3", "Eagle3DeepseekV2ForCausalLM"),
"EagleDeepSeekMTPModel": ("deepseek_eagle", "EagleDeepseekV3ForCausalLM"),
"DeepSeekMTPModel": ("deepseek_mtp", "DeepSeekMTP"),
"DeepseekV32MTPModel": ("vllm.models.deepseek_v32", "DeepseekV32MTP"),
"DeepSeekV4MTPModel": ("vllm.models.deepseek_v4", "DeepSeekV4MTP"),
"MiniMaxM3MTP": ("vllm.models.minimax_m3", "MiniMaxM3MTP"),
"BailingMoeV25MTPModel": ("bailing_moe_mtp", "BailingMoeV25MTPModel"),