Remove VLLM_TEST_FORCE_FP8_MARLIN to replace with linear_backend/moe_backend (#52182)

Signed-off-by: mgoin <mgoin64@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Misha Goin
2026-08-18 12:58:04 -04:00
committed by GitHub
co-authored by OpenAI Codex
parent 88b2bff2c6
commit bca7bea240
15 changed files with 46 additions and 66 deletions
@@ -394,12 +394,12 @@ _POSSIBLE_INT8_KERNELS: dict[PlatformEnum, list[type[Int8ScaledMMLinearKernel]]]
# in priority/performance order (when available)
_POSSIBLE_FP8_KERNELS: dict[PlatformEnum, list[type[FP8ScaledMMLinearKernel]]] = {
PlatformEnum.CUDA: [
MarlinFP8ScaledMMLinearKernel,
FlashInferFP8ScaledMMLinearKernel,
CutlassFP8ScaledMMLinearKernel,
B12xTensorFP8ScaledMMLinearKernel,
PerTensorTorchFP8ScaledMMLinearKernel,
ChannelWiseTorchFP8ScaledMMLinearKernel,
MarlinFP8ScaledMMLinearKernel,
HummingFP8ScaledMMLinearKernel,
],
PlatformEnum.ROCM: [
@@ -434,8 +434,8 @@ _POSSIBLE_FP8_BLOCK_KERNELS: dict[
CutlassFp8BlockScaledMMKernel,
B12xFp8BlockScaledMMKernel,
MarlinFP8ScaledMMLinearKernel,
TritonFp8BlockScaledMMKernel,
HummingFP8ScaledMMLinearKernel,
TritonFp8BlockScaledMMKernel,
BlockWiseTorchFP8ScaledMMLinearKernel,
],
PlatformEnum.ROCM: [
@@ -43,16 +43,6 @@ class MarlinFP8ScaledMMLinearKernel(FP8ScaledMMLinearKernel):
return False, "FP8 Marlin requires compute capability 7.5 or higher"
if envs.VLLM_BATCH_INVARIANT:
return False, "FP8 Marlin not supported for batch invariant execution."
if (
compute_capability is not None
and compute_capability >= 89
and not envs.VLLM_TEST_FORCE_FP8_MARLIN
):
return (
False,
"To apply FP8 Marlin on high-capability GPUs, please set "
"VLLM_TEST_FORCE_FP8_MARLIN=1",
)
return True, None
@classmethod
@@ -370,13 +370,6 @@ def select_fp8_moe_backend(
backend, config, weight_key, activation_key, activation_format
)
# Handle explicit MARLIN FP8 configuration.
if envs.VLLM_TEST_FORCE_FP8_MARLIN:
backend = Fp8MoeBackend.MARLIN
return _return_or_raise(
backend, config, weight_key, activation_key, activation_format
)
# Handle explicit AITER FP8 configuration.
if envs.is_set("VLLM_ROCM_USE_AITER") or envs.is_set("VLLM_ROCM_USE_AITER_MOE"):
skip_aiter_moe = (
@@ -4,7 +4,6 @@ from enum import Enum
import torch
import vllm.envs as envs
import vllm.model_executor.layers.fused_moe.modular_kernel as mk
from vllm.config.kernel import MoEBackend
from vllm.logger import init_logger
@@ -271,12 +270,6 @@ def select_nvfp4_moe_backend(
requested_backend, config, weight_key, activation_key, activation_format
)
if envs.VLLM_TEST_FORCE_FP8_MARLIN:
backend = NvFp4MoeBackend.MARLIN
return _return_or_raise(
backend, config, weight_key, activation_key, activation_format
)
# Select kernels in order of backend.
for backend in AVAILABLE_BACKENDS:
for k_cls in backend_to_kernel_cls(backend):