!31043 raise_exception_in_matmul_no_stra_scene

Merge pull request !31043 from yao_yf/raise_exception_in_matmul_no_stra_scene
This commit is contained in:
i-robot 2022-03-10 06:49:01 +00:00 committed by Gitee
commit 1d01344468
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 0 deletions

View File

@ -488,6 +488,9 @@ Status MatMulBase::GenerateStrategiesNotPower2(int64_t stage_id, size_t dev_num_
continue;
}
}
if (strategy_cost_.empty()) {
MS_LOG(EXCEPTION) << "No available strategy.";
}
return SUCCESS;
}
@ -523,6 +526,9 @@ Status MatMulBase::GenerateStrategies(int64_t stage_id) {
continue;
}
}
if (strategy_cost_.empty()) {
MS_LOG(EXCEPTION) << "No available strategy.";
}
return SUCCESS;
}
auto dev_num_not_2_power = dev_num / (dev_num - dev_num_2_power);