Coverage for / home / jenkins / .local / lib / python3.10 / site-packages / hyper_parallel / data / parallel / __init__.py: 100%
4 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 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# ============================================================================
15"""data.parallel: batch-level parallel sharding primitives.
17Stage 4e contributed ``shard_batch_for_cp``; stage 6 (05 §11.2) adds the
18DataLoader-side CP/TP batch distribution, DP samplers and parallel
19dataloader construction from ``components/datasets/parallel``.
20"""
22from hyper_parallel.data.parallel.batch_parallel import (
23 CPBatchSharder,
24 TPBatchBroadcaster,
25 shard_batch_for_cp,
26)
27from hyper_parallel.data.parallel.batch_sampler import build_dataset_batch_sampler
28from hyper_parallel.data.parallel.dataloader_parallel import (
29 DataLoaderParallelContext,
30 build_dataset_for_dataloader,
31 create_dataloader_parallel_context,
32 split_iterable_dataset_by_dp,
33)
35__all__ = [
36 "CPBatchSharder",
37 "DataLoaderParallelContext",
38 "TPBatchBroadcaster",
39 "build_dataset_batch_sampler",
40 "build_dataset_for_dataloader",
41 "create_dataloader_parallel_context",
42 "shard_batch_for_cp",
43 "split_iterable_dataset_by_dp",
44]