Home
last modified time | relevance | path

Searched refs:stra (Results 1 – 25 of 62) sorted by relevance

123

/third_party/mindspore/mindspore/ccsrc/frontend/parallel/ops_info/
Dscatter_update_info.cc47 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
48 if (stra.size() != 3) { in CheckStrategy()
53 if (stra[0].empty()) { in CheckStrategy()
58 if (stra[0][0] != 1) { in CheckStrategy()
63 …if (!stra[1].empty() && std::accumulate(stra[1].begin(), stra[1].end(), 1, std::multiplies<int64_t… in CheckStrategy()
68 if (stra[2].empty()) { in CheckStrategy()
73 …if (std::accumulate(stra[2].begin(), stra[2].begin() + static_cast<different_type>(stra[1].size())… in CheckStrategy()
75 …MS_LOG(ERROR) << name_ << ": The first " << stra[1].size() << " dimensions of updates can not be s… in CheckStrategy()
79 if (stra[0].size() - 1 != stra[2].size() - stra[1].size()) { in CheckStrategy()
84 for (size_t i = 1; i < stra[0].size(); ++i) { in CheckStrategy()
[all …]
Dvirtual_dataset_info.cc39 Strategys stra = strategy->GetInputDim(); in CheckStrategy() local
40 if (stra.size() < 1) { in CheckStrategy()
44 …used_devices_ = int64_t(std::accumulate(stra[0].begin(), stra[0].end(), 1, std::multiplies<int64_t… in CheckStrategy()
45 for (size_t i = 0; i < stra.size(); ++i) { in CheckStrategy()
48 for (auto dim : stra[i]) { in CheckStrategy()
70 if (stra[i].size() > stra[max_size_strategy_dim_].size()) { in CheckStrategy()
74 …if (std::find(stra[max_size_strategy_dim_].begin(), stra[max_size_strategy_dim_].end(), shard_num_… in CheckStrategy()
75 stra[max_size_strategy_dim_].end()) { in CheckStrategy()
81 << stra[max_size_strategy_dim_]; in CheckStrategy()
87 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
[all …]
Duniform_real_info.cc56 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
57 if (stra.size() != 1) { in CheckStrategy()
58 MS_LOG(ERROR) << name_ << ": The size of strategy must be 1, but got " << stra.size(); in CheckStrategy()
66 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
67 if (stra.empty()) { in InferDevMatrixShape()
72 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
79 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferTensorMap() local
80 size_t size = stra[0].size(); in InferTensorMap()
128 std::vector<Dimensions> stra = strategy_->GetInputDim(); in UpdateShape() local
129 for (size_t i = 0; i < stra[0].size(); i++) { in UpdateShape()
[all …]
Dbatchnorm_info.cc72 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
73 if (stra.size() != 5) { in CheckStrategy()
74 MS_LOG(ERROR) << name_ << ": The size of strategy must be 5, but got " << stra.size(); in CheckStrategy()
78 if ((stra[0].size() != 4) && (stra[0].size() != 2)) { in CheckStrategy()
79 … MS_LOG(ERROR) << name_ << ": The size of strategy[0] must be 4 or 2, but got " << stra[0].size(); in CheckStrategy()
84 if (stra[i].empty()) { in CheckStrategy()
88 if (stra[0][1] != stra[i][0]) { in CheckStrategy()
89 …ROR) << name_ << ": Invalid strategy, the index is " << i << ", it must be equal to " << stra[0][1] in CheckStrategy()
90 << ", but got " << stra[i][0]; in CheckStrategy()
100 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
[all …]
Dselect_info.cc48 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
49 if (stra.size() != 3) { in CheckStrategy()
54 if ((stra[0] != stra[1]) || (stra[1] != stra[2])) { in CheckStrategy()
64 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
65 if (stra.empty()) { in InferDevMatrixShape()
70 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dgathernd_info.cc41 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
42 if (stra.size() != 2) { in CheckStrategy()
47 …int64_t input_split_size = std::accumulate(stra[0].begin(), stra[0].end(), 1, std::multiplies<int6… in CheckStrategy()
53 if (stra[1].empty()) { in CheckStrategy()
58 if (stra[1].back() != 1) { in CheckStrategy()
69 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
70 if (stra.size() != 2) { in InferDevMatrixShape()
75 dev_matrix_shape_ = stra[1]; in InferDevMatrixShape()
Dresizebilinear_info.cc58 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
59 if (stra.size() != 1) { in CheckStrategy()
60 MS_LOG(ERROR) << name_ << ": The size of strategy must be 1, but got " << stra.size(); in CheckStrategy()
64 Dimensions input_strategy = stra[0]; in CheckStrategy()
82 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
83 if (stra.empty()) { in InferDevMatrixShape()
88 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dconcat_info.cc68 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
69 if (stra.empty()) { in CheckStrategy()
74 if (stra.size() != inputs_shape_.size()) { in CheckStrategy()
79 for (size_t i = 0; i < stra.size(); ++i) { in CheckStrategy()
80 auto strategy_ele = stra[i]; in CheckStrategy()
98 if (strategy_ele[j] != stra[0][j]) { in CheckStrategy()
110 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
111 if (stra.empty()) { in InferDevMatrixShape()
116 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dbias_add_info.cc34 Strategys stra = strategy->GetInputDim(); in CheckStrategy() local
35 Dimensions sub_a_strategy = stra.at(0); in CheckStrategy()
36 Dimensions sub_b_strategy = stra.at(1); in CheckStrategy()
47 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
48 Dimensions sub_a_strategy = stra.at(0); in InferDevMatrixShape()
61 Strategys stra = strategy_->GetInputDim(); in InferTensorMap() local
62 Dimensions sub_a_strategy = stra.at(0); in InferTensorMap()
Dprelu_info.cc41 Strategys stra = strategy->GetInputDim(); in CheckStrategy() local
42 if (stra[1].size() != PRELU_SECOND_INPUT_SIZE) { in CheckStrategy()
46 if (stra[0][PRELU_CHANNEL_INDEX] != stra[1][0] && inputs_shape_[1][0] != 1) { in CheckStrategy()
57 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
58 Dimensions input_strategy = stra.at(0); in InferDevMatrixShape()
Dmaxpool_info.cc133 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
134 if (stra.size() != 1) { in CheckStrategy()
135 MS_LOG(ERROR) << name_ << ": The size of strategy must be 1, but got " << stra.size(); in CheckStrategy()
139 Dimensions input_strategy = stra[0]; in CheckStrategy()
158 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
159 if (stra.empty()) { in InferDevMatrixShape()
164 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dpack_info.cc67 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
68 for (size_t i = 0; i < stra.size(); ++i) { in CheckStrategy()
69 auto strategy_ele = stra[i]; in CheckStrategy()
76 if (strategy_ele[j] != stra[0][j]) { in CheckStrategy()
88 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
89 if (stra.empty()) { in InferDevMatrixShape()
94 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dreduce_method_info.cc35 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
36 Dimensions input_strategy = stra.at(0); in InferDevMatrixShape()
147 Dimensions stra = strategy_->GetInputDim().at(0); in InferForwardCommunication() local
148 if (cross_batch_ && IsDataParallelStrategy(stra, stage_id_)) { in InferForwardCommunication()
158 size_t size = stra.size(); in InferForwardCommunication()
170 if (pos != dim_list.end() && stra[index] != 1) { in InferForwardCommunication()
227 Dimensions stra = strategy_->GetInputDim().at(0); in InferForwardCommunication() local
228 if (cross_batch_ && IsDataParallelStrategy(stra, stage_id_)) { in InferForwardCommunication()
234 size_t size = stra.size(); in InferForwardCommunication()
247 if (pos != dim_list.end() && stra[index] != 1) { in InferForwardCommunication()
[all …]
Dgatherd_info.cc66 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
67 if (stra.size() != 2) { in CheckStrategy()
68 MS_LOG(ERROR) << name_ << ": The size of strategy must be 2, but got " << stra.size(); in CheckStrategy()
72 Dimensions input_strategy = stra[0]; in CheckStrategy()
73 Dimensions index_strategy = stra[1]; in CheckStrategy()
89 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
90 if (stra.empty()) { in InferDevMatrixShape()
95 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dsplit_info.cc84 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
85 if (stra.empty()) { in CheckStrategy()
90 if (axis_ >= stra[0].size()) { in CheckStrategy()
95 if (stra[0][axis_] != 1) { in CheckStrategy()
105 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
106 if (stra.empty()) { in InferDevMatrixShape()
111 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dlayer_norm_info.cc59 Strategys stra = strategy->GetInputDim(); in CheckStrategy() local
60 if (stra.size() != LAYER_NORM_INPUT_SIZE) { in CheckStrategy()
61 MS_LOG(ERROR) << name_ << ": Invalid strategy size " << stra.size(); in CheckStrategy()
70 Dimensions input_strategy = stra[LAYER_NORM_INPUT_INDEX]; in CheckStrategy()
71 Dimensions gamma_strategy = stra[LAYER_NORM_GAMMA_INDEX]; in CheckStrategy()
72 Dimensions beta_strategy = stra[LAYER_NORM_BETA_INDEX]; in CheckStrategy()
114 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
115 if (stra.empty()) { in InferDevMatrixShape()
119 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dconv2d_info.cc260 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategyBase() local
261 if (stra.size() != 2) { in CheckStrategyBase()
262 MS_LOG(ERROR) << name_ << ": The size of strategy must be 2, but got " << stra.size(); in CheckStrategyBase()
266 Dimensions input_strategy = stra[0]; in CheckStrategyBase()
267 Dimensions weight_strategy = stra[1]; in CheckStrategyBase()
315 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
316 Dimensions input_strategy = stra[0]; in CheckStrategy()
317 Dimensions weight_strategy = stra[1]; in CheckStrategy()
342 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
343 if (stra.size() != 2) { in InferDevMatrixShape()
[all …]
Dtopk_info.cc38 std::vector<Dimensions> stra = strategy->GetInputDim(); in CheckStrategy() local
39 if (stra.empty()) { in CheckStrategy()
44 if (stra[0].back() != 1) { in CheckStrategy()
54 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
55 if (stra.empty()) { in InferDevMatrixShape()
60 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Darithmetic_info.cc58 Strategys stra = strategy->GetInputDim(); in ExpendStrategy() local
59 Dimensions sub_a_strategy = stra.at(0); in ExpendStrategy()
60 Dimensions sub_b_strategy = stra.at(1); in ExpendStrategy()
70 expend_strategy = stra; in ExpendStrategy()
157 Strategys stra = strategy_->GetInputDim(); in InferTensorMap() local
158 Dimensions sub_a_strategy = stra.at(0); in InferTensorMap()
159 Dimensions sub_b_strategy = stra.at(1); in InferTensorMap()
Dbroadcast_to_info.cc68 auto stra = strategy->GetInputDim().at(0); in CheckStrategy() local
70 for (size_t i = 0; i < stra.size(); ++i) { in CheckStrategy()
71 if ((in_shape[i] == 1) && (stra[i] != 1)) { in CheckStrategy()
81 std::vector<Dimensions> stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
82 if (stra.empty()) { in InferDevMatrixShape()
87 dev_matrix_shape_ = stra[0]; in InferDevMatrixShape()
Dloss_info.cc36 Strategys stra = strategy->GetInputDim(); in CheckStrategy() local
37 Dimensions input_strategy = stra.at(0); in CheckStrategy()
38 Dimensions label_strategy = stra.at(1); in CheckStrategy()
73 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
74 Dimensions input_strategy = stra.at(0); in InferDevMatrixShape()
Dget_next_info.cc115 for (Dimensions stra : stras) { in CheckStrategy() local
116 if (stra.size() != 0) { in CheckStrategy()
134 for (auto &stra : dataset_strategy_) { in CheckStrategy() local
135 if (!stra.empty()) { in CheckStrategy()
136 stra[0] = dev_num; in CheckStrategy()
232 Strategys stra; in GenerateOpStrategies() local
233 StrategyPtr sp = std::make_shared<Strategy>(stage_id, stra); in GenerateOpStrategies()
Dreluv2_info.cc41 Strategys stra = strategy->GetInputDim(); in CheckStrategy() local
42 Dimensions input_strategy = stra.at(0); in CheckStrategy()
68 Strategys stra = strategy_->GetInputDim(); in InferDevMatrixShape() local
69 Dimensions input_strategy = stra.at(0); in InferDevMatrixShape()
/third_party/mindspore/tests/st/auto_parallel/
Donehot_model_parallel.py73 for stra in strategy:
77 temp.extend(np.split(block, stra, axis=i))
88 stra = [1] * len(shape)
89 stra[0] = device_num
90 datas = self.get_parallel_blocks(data, stra)
95 stra = [1] * len(shape)
96 stra[0] = device_num
97 datas = self.get_parallel_blocks(data, stra)
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/tensor_layout/
Dtensor_info.h50 Dimensions stra; in InferStrategy() local
53 return stra; in InferStrategy()
56 stra.push_back(dim); in InferStrategy()
58 return stra; in InferStrategy()

123