Browse Source

!1954 [Auto parallel] Fix some codestyle warnings in parallel module

Merge pull request !1954 from Xiaoda/1-fix-some-codestyle-warnings-in-parallel-module
tags/v0.5.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
41198aa21c
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      mindspore/ccsrc/parallel/auto_parallel/rec_core/rec_generate_strategy.cc

+ 1
- 2
mindspore/ccsrc/parallel/auto_parallel/rec_core/rec_generate_strategy.cc View File

@@ -55,7 +55,7 @@ std::vector<std::vector<int32_t>> PrepareMatMul(const std::shared_ptr<Graph> &gr

// HCCL does not support multi-dimension partition, and the hardware does not support excessive
// number of EVENT, so we temporarily disable matmul's multi-dimension partition function.
auto max_cut = 1.0 / g_device_manager->DeviceNum();
const auto max_cut = 1.0 / g_device_manager->DeviceNum();
if (graph->nodes[iter_graph].apply.arguments[0].tensor_str.str_h != max_cut &&
graph->nodes[iter_graph].apply.arguments[1].tensor_str.str_w != max_cut) {
graph->nodes[iter_graph].apply.arguments[0].tensor_str.str_h = 1.0;
@@ -493,7 +493,6 @@ std::vector<int32_t> CopyIncomingOperatorInputStrategy(const std::vector<std::sh
const size_t iter_ops, const size_t incoming_op_index) {
std::vector<int32_t> s;
s = PrepareIncomingOperatorInputStrategy(ops, incoming_op_index);

if (s.size() != 0) {
if (ops[incoming_op_index]->type() == SQUEEZE) {
s = ModifyStrategyIfSqueezeIncoming(ops, incoming_op_index, s);


Loading…
Cancel
Save