forked from mindspore-Ecosystem/mindspore
!47424 fix issues of auto parallel
Merge pull request !47424 from bichaoyang/master
This commit is contained in:
commit
543dc8d1a0
|
@ -1865,9 +1865,9 @@ Status OperatorInfo::CorrectMemoryCost(size_t input_index) {
|
|||
static_cast<double>(operator_cost()->inputs_type_lengths()[input_index]);
|
||||
swc->cost_list[0]->memory_with_reuse_ -= parameter_mem_cost;
|
||||
if (swc->cost_list[0]->memory_with_reuse_ < 0) {
|
||||
MS_LOG(ERROR) << name_ << ": The memory cost after correction is: " << swc->cost_list[0]->memory_with_reuse_
|
||||
<< ", the parameter memory cost is: " << parameter_mem_cost;
|
||||
return FAILED;
|
||||
MS_LOG(WARNING) << name_ << ": The memory cost after correction is: " << swc->cost_list[0]->memory_with_reuse_
|
||||
<< ", the parameter memory cost is: " << parameter_mem_cost;
|
||||
swc->cost_list[0]->memory_with_reuse_ = 0;
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
|
|
|
@ -758,7 +758,8 @@ bool IsAutoParallelCareNode(const CNodePtr &cnode) {
|
|||
}
|
||||
bool bool_result = IsParallelCareNode(cnode) && !IsSplittableOperator(prim->name());
|
||||
if (bool_result && (prim->name() != MAKE_TUPLE) && (prim->name() != MAKE_LIST)) {
|
||||
MS_LOG(EXCEPTION) << "Should implementing OperatorInfo for: " << prim->name();
|
||||
MS_LOG(EXCEPTION) << "For 'auto_parallel', missing the implementation of OperatorInfo for: " << prim->name()
|
||||
<< ", please use 'semi_auto_parallel' mode.";
|
||||
} else if (prim->name() == CAST) {
|
||||
if (cnode->fullname_with_scope().find(OPTIMIZER_SUB_STRING) != std::string::npos) {
|
||||
// Do not care CASTs from optimizer
|
||||
|
|
Loading…
Reference in New Issue