Fix stage_activation: use Triton staging kernel from vLLM patch instead of fp4_utils

This commit is contained in:
2026-05-14 09:38:50 +00:00
parent 25cbc85afe
commit 98913c9b1a

View File

@@ -161,13 +161,13 @@ def nvfp4_mega_moe_l2(
def stage_activation(x_bf16):
"""Quantize BF16 activation to FP4 (E2M1) with UE4M3 block16 scales.
This replaces the Triton staging kernel from patches/staging_kernel.py.
Uses the Triton staging kernel from the vLLM deepseek_v4 patch.
"""
from vllm.model_executor.layers.quantization.utils.fp4_utils import (
per_token_cast_to_fp4,
from vllm.model_executor.models.staging_kernel import (
_stage_deepseek_v4_mega_moe_inputs,
)
return per_token_cast_to_fp4(x_bf16)
return _stage_deepseek_v4_mega_moe_inputs(x_bf16)
def nvfp4_mega_moe_full(