Skip to content

vllm.model_executor.layers.fused_moe.oracle.unquantized

Classes:

Functions:

UnquantizedMoEKernelOracle

Bases: MoEKernelOracle[UnquantizedMoeBackend]

Class-based view of the unquantized MoE kernel oracle.

Each method delegates to its module-level counterpart so that instantiating and calling this class is bit-identical to calling the standalone functions. Follow-up PRs may move logic from the module-level functions into these methods.

_get_priority_backends(moe_config)

Get available backends in priority order based on platform and config.

This function can be extended to become more complex as needed.

_trtllm_bf16_lora_supported(moe_config)

Gate for routing LoRA-enabled BF16 MoE to the FlashInfer TRT-LLM gemm1_lora_delta path (PR #3153).

_zero_intermediate_padding(moe_config, w13_weight, w2_weight)

Zero intermediate padding; reloads rewrite only the checkpoint slices.

aiter_moe_intermediate_alignment(intermediate)

Intermediate-size alignment required by AITER's CK 2stages MoE kernel.

AITER dispatches on inter_dim <= 192: below the threshold both stages use 64-wide tiles, above it at least one stage uses a 128-wide tile, and CK's IsSupportedArgument rejects a size not divisible by that width.

map_unquantized_backend(runner_backend)

Map user's MoEBackend to UnquantizedMoeBackend.

select_unquantized_moe_backend(moe_config)

Select the primary Unquantized MoE backend. Note: Shape-specific fallbacks may still occur at runtime. Returns NONE and a placeholder experts class when an online method replaces the unquantized one.

unquantized_round_up_hidden_size_and_intermediate_size(backend, hidden_size, intermediate_size)

Round up dimensions before allocation to satisfy the selected kernel.