core.transformer.moe.megakernel.factory#
Construction entry point for MoE megakernel backends.
Module Contents#
Functions#
Build the configured megakernel backend. |
|
Return the config used to construct backend-compatible shared experts. |
|
Return the backend-specific context used to construct shared experts. |
API#
- core.transformer.moe.megakernel.factory.build_megakernel_backend(
- *,
- config: megatron.core.transformer.transformer_config.TransformerConfig,
- ep_group: torch.distributed.ProcessGroup,
- routed_experts: torch.nn.Module,
- shared_experts: torch.nn.Module,
- num_local_experts: int,
Build the configured megakernel backend.
Backend imports are deliberately lazy so ordinary MCore MoE configurations do not acquire optional megakernel dependencies.
- config: megatron.core.transformer.transformer_config.TransformerConfig,
Return the config used to construct backend-compatible shared experts.
- config: megatron.core.transformer.transformer_config.TransformerConfig,
Return the backend-specific context used to construct shared experts.