Coverage for hyper_parallel / __init__.py: 100%
12 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-03-01 07:33 +0800
« prev ^ index » next coverage.py v7.13.1, created at 2026-03-01 07:33 +0800
1# Copyright 2025 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# ============================================================================
15"""hyper parallel interface"""
16from hyper_parallel.platform import get_platform
17from hyper_parallel.core.hsdp.api import hsdp, hsdp_sync_stream, HSDPCell
18from hyper_parallel.core.layout import Layout
19from hyper_parallel.core.device_mesh import DeviceMesh, init_device_mesh
20from hyper_parallel.core.dtensor import DTensor, SkipDTensorDispatch
21from hyper_parallel.core.parameter_init import init_parameters
22from hyper_parallel.core.shard.api import shard_module
23from hyper_parallel.core.shard.api import parallelize_value_and_grad
24from hyper_parallel.core.shard.local_func import custom_shard
25from hyper_parallel.core.pipeline_parallel import (PipelineStage, ScheduleInterleaved1F1B, MetaStep, MetaStepType,
26 BatchDimSpec)
27from hyper_parallel.collectives.cc import (init_process_group, destroy_process_group,
28 get_process_group_ranks, get_backend, split_group)
30__all__ = ["get_platform", "hsdp", "hsdp_sync_stream", "HSDPCell", "Layout", "DTensor",
31 "Layout", "DeviceMesh", "init_device_mesh",
32 "init_parameters", "shard_module", "custom_shard", "parallelize_value_and_grad", "SkipDTensorDispatch",
33 "MetaStep", "MetaStepType", "BatchDimSpec", "PipelineStage", "ScheduleInterleaved1F1B",
34 "init_process_group", "destroy_process_group", "get_process_group_ranks", "get_backend", "split_group"]