Browse Source

gatherv2 1-dim repeated calculation

tags/v1.1.0
yangzhenzhang 5 years ago
parent
commit
2f45b7171f
2 changed files with 4 additions and 1 deletions
  1. +4
    -0
      mindspore/ccsrc/frontend/parallel/ops_info/gather_v2_p_info.cc
  2. +0
    -1
      mindspore/ccsrc/frontend/parallel/pipeline_transformer/pipeline_transformer.cc

+ 4
- 0
mindspore/ccsrc/frontend/parallel/ops_info/gather_v2_p_info.cc View File

@@ -500,6 +500,10 @@ Status GatherV2PInfo::InferBias() {
// params_size=1, axis=0
if ((input_shape.size() == 1) && (axis_ == 0)) {
slice_size_ = input_shape.at(0) / params_strategy.at(0);
// if repeated calculation, because the repeated num in the right of dev-matrix, so rank need to div repeated num
if (repeated_calc_num_ > 1) {
rank = rank / repeated_calc_num_;
}
bias_ = rank * slice_size_;
return SUCCESS;
}


+ 0
- 1
mindspore/ccsrc/frontend/parallel/pipeline_transformer/pipeline_transformer.cc View File

@@ -60,7 +60,6 @@ void PipelineTransformer::Coloring() {
}
}
}
return;
}

void PipelineTransformer::BroadCastColoring() {


Loading…
Cancel
Save