Coverage for / home / jenkins / .local / lib / python3.10 / site-packages / hyper_parallel / distributed / expert_parallel / __init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-10-25 05:45 +0800
« prev ^ index » next coverage.py v7.13.1, created at 2026-10-25 05:45 +0800
1# Copyright 2025-2026 Huawei Technologies Co., Ltd
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ============================================================================
16"""expert_parallel: EP collectives, routing, expert execution and recipes.
18Public surface: the built-in ``@local_compute`` EP archetype factories
19(``EP_ARCHETYPES`` + ``EP_ARCHETYPE_SUGGESTIONS``) and the EP primitives
20(``ep_all_to_all`` / ``MOE_ROUTER_ADAPTERS`` / ``ep_routed_forward`` /
21``bind_local_expert_forward`` and friends). Split out of
22components/distributed/ep_compute.py + ep_utils.py in stage 4e.
23"""
25from hyper_parallel.distributed.expert_parallel.collectives import (
26 ep_all_to_all,
27)
28from hyper_parallel.distributed.expert_parallel.routing import (
29 MOE_ROUTER_ADAPTERS,
30)
31from hyper_parallel.distributed.expert_parallel.experts import (
32 bind_local_expert_forward,
33 describe_moe_module,
34 ep_routed_forward,
35 require_attrs,
36 resolve_swiglu_weights,
37)
38from hyper_parallel.distributed.expert_parallel.recipes import (
39 EP_ARCHETYPE_SUGGESTIONS,
40 EP_ARCHETYPES,
41 build_ep_compute,
42 deepseekv3_ep_compute_fn,
43 mixtral_ep_compute_fn,
44 qwen2moe_ep_compute_fn,
45 routed_only_ep_compute_fn,
46)
48__all__ = [
49 "EP_ARCHETYPES",
50 "EP_ARCHETYPE_SUGGESTIONS",
51 "MOE_ROUTER_ADAPTERS",
52 "bind_local_expert_forward",
53 "build_ep_compute",
54 "deepseekv3_ep_compute_fn",
55 "describe_moe_module",
56 "ep_all_to_all",
57 "ep_routed_forward",
58 "mixtral_ep_compute_fn",
59 "qwen2moe_ep_compute_fn",
60 "require_attrs",
61 "resolve_swiglu_weights",
62 "routed_only_ep_compute_fn",
63]