!16482 fix multi parallel code bugs

Merge pull request !16482 from zoloft/pub_master2
This commit is contained in:
i-robot 2021-06-09 14:18:44 +08:00 committed by Gitee
commit ff8b2a024e
2 changed files with 6 additions and 3 deletions

View File

@ -205,7 +205,11 @@ int Flags::InitConfigFile() {
return RET_INPUT_PARAM_INVALID;
}
}
(void)CheckOfflineParallelConfig(this->configFile, &parallel_split_config_);
if (!CheckOfflineParallelConfig(this->configFile, &parallel_split_config_) &&
parallel_split_config_.parallel_split_type_ != SplitNo) {
std::cerr << "offline kernel parallel split config set error.";
return RET_INPUT_PARAM_INVALID;
}
return RET_OK;
}

View File

@ -97,7 +97,6 @@ void Spliter::RecordGraphInfo(const FuncGraphPtr &func_graph) {
break;
}
conv_nodes.push(pre_input_node);
match_num++;
}
// visit output
if (nodes_outputs_[curr_cnode].size() > kDefaultBatch) {
@ -108,8 +107,8 @@ void Spliter::RecordGraphInfo(const FuncGraphPtr &func_graph) {
break;
}
conv_nodes.push(post_output_node);
match_num++;
}
match_num++;
}
if (match_num != 0) {
match_numbers_.insert(match_num);