[Bugfix][MoE] Snapshot max_cudagraph_capture_size into FusedMoEConfig (#44613)

Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
aoshen02
2026-06-05 23:14:41 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent eafbb06331
commit f87df1df9e
5 changed files with 7 additions and 16 deletions
@@ -3,7 +3,6 @@
import torch
from vllm.config import get_current_vllm_config
from vllm.logger import init_logger
from vllm.model_executor.layers.attention import Attention
from vllm.model_executor.layers.fused_moe import (
@@ -141,9 +140,7 @@ class GptOssMxfp4MoEMethod(FusedMoEMethodBase):
self.weight_dtype = "gpt_oss_mxfp4"
self.mxfp4_backend, self.experts_cls = select_mxfp4_moe_backend(moe)
self.max_capture_size = (
get_current_vllm_config().compilation_config.max_cudagraph_capture_size
)
self.max_capture_size = moe.max_capture_size
self._cache_permute_indices: dict[torch.Size, torch.Tensor] = {}
self.moe_kernel: mk.FusedMoEKernel | None = None
@@ -475,9 +472,7 @@ class Mxfp4MoEMethod(FusedMoEMethodBase):
self.weight_dtype = "mxfp4"
self.mxfp4_backend, self.experts_cls = select_deepseek_v4_mxfp4_moe_backend(moe)
self.max_capture_size = (
get_current_vllm_config().compilation_config.max_cudagraph_capture_size
)
self.max_capture_size = moe.max_capture_size
self._cache_permute_indices: dict[torch.Size, torch.Tensor] = {}
self.moe_kernel: mk.FusedMoEKernel | None = None