vllm.model_executor.layers.fused_moe.experts.fused_batched_moe
¶
Fused batched MoE kernel.
Classes:
-
BatchedTritonExperts–A Triton based MoE expert class that operates on expert batched format,
-
NaiveBatchedExperts–A reference MoE expert class that operates on expert batched format,
Functions:
-
resize_batched_config_tiles–Narrow a default config's N/K tiles for the expert-batched layout.
BatchedTritonExperts
¶
Bases: FusedMoEExpertsModular
A Triton based MoE expert class that operates on expert batched format, i.e. E x max_num_tokens x K. This is the format that the batched dispatch/combine kernels use.
NaiveBatchedExperts
¶
Bases: FusedMoEExpertsModular
A reference MoE expert class that operates on expert batched format, i.e. E x max_num_tokens x K. This is the format that the batched dispatch/combine kernels use.
resize_batched_config_tiles(config, block_shape)
¶
Narrow a default config's N/K tiles for the expert-batched layout.
The shared heuristic sizes tiles for one large [M, K] x [K, N] GEMM, but this layout runs E small GEMMs of at most max_num_tokens rows, where wide N/K tiles are mostly masked-off work.