vllm.model_executor.layers.fused_moe.experts.flashinfer_cutlass_moe
¶
Classes:
Functions:
-
is_valid_flashinfer_cutlass_fused_moe–Check if the given problem size is supported by the FlashInfer CUTLASS MoE
FlashInferExperts
¶
Bases: FusedMoEExpertsModular
Methods:
-
workspace_shapes–Compute the shapes for the temporary and final outputs of the two gemms
workspace_shapes(M, N, K, topk, global_num_experts, local_num_experts, expert_tokens_meta, activation)
¶
Compute the shapes for the temporary and final outputs of the two gemms and activation in the fused expert function. Since the gemms are independent, the workspace for the first gemm can be shared with the workspace for the last gemm.
Returns a tuple of: - workspace13 shape tuple: must be large enough to hold the result of either expert gemm. - workspace2 shape tuple: must be large enough to hold the result of the activation function. - output shape tuple: must be exact size of the final gemm output. - Workspace type: The dtype to use for the workspace tensors. - Note: in order for activation chunking to work, the first dimension of each tuple must be the number of tokens.
is_valid_flashinfer_cutlass_fused_moe(hidden_states, w1, w2)
¶
Check if the given problem size is supported by the FlashInfer CUTLASS MoE kernel.