• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright 2019 Huawei Technologies Co., Ltd
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package mindspore.straspb;
20
21message ParallelStrategy {
22    repeated uint32 dim = 1;
23}
24
25message ParallelStrategys {
26    required uint32 stage = 1;
27    repeated ParallelStrategy parallel_strategy = 2;
28}
29
30message ParallelStrategyItem {
31    required string node_name = 1;
32    required ParallelStrategys parallel_strategys = 2;
33}
34
35message DevMatrix {
36    repeated uint32 dim = 1;
37}
38
39message TensorMap {
40    repeated int32 dim = 1;
41}
42
43message ParamSplitShape {
44    repeated int64 dim = 1;
45}
46
47message IndicesOffset {
48    repeated int64 dim = 1;
49}
50
51message ParallelLayouts {
52    repeated DevMatrix dev_matrix = 1;
53    repeated TensorMap tensor_map = 2;
54    repeated ParamSplitShape param_split_shape = 3;
55    repeated IndicesOffset indices_offset = 4;
56    required int32 field = 5;
57    required int32 opt_weight_shard_step = 6;
58    required int32 opt_weight_shard_size = 7;
59}
60
61message ParallelLayoutItem {
62    required string param_name = 1;
63    required ParallelLayouts parallel_layouts = 2;
64}
65
66message ParallelGroupRanks {
67    repeated uint32 dim = 1;
68}
69
70message ParallelGroupItem {
71    required string group_name = 1;
72    required ParallelGroupRanks parallel_group_ranks = 2;
73}
74
75message ParallelGroupMap {
76    repeated ParallelGroupItem parallel_group_item = 1;
77    required ParallelGroupRanks ckpt_restore_rank_list = 2;
78}
79
80message ParallelStrategyMap {
81    required uint32 current_stage = 1;
82    repeated ParallelStrategyItem parallel_strategy_item = 2;
83    repeated ParallelLayoutItem parallel_layout_item = 3;
84}