!47713 ErrorManager init bugfix

Merge pull request !47713 from tanghuikang/bugfix
This commit is contained in:
i-robot 2023-01-11 02:09:48 +00:00 committed by Gitee
commit f36ce9b04d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 4 deletions

View File

@ -338,8 +338,7 @@ void AscendKernelRuntime::ReleaseDeviceRes() {
#ifndef ENABLE_SECURITY
void AscendKernelRuntime::PreInit() {
const auto error_manager_ret = ErrorManagerAdapter::Init();
if (error_manager_ret != 0) {
if (!ErrorManagerAdapter::Init()) {
MS_LOG(WARNING) << "Init ErrorManager failed.";
}
}
@ -366,8 +365,7 @@ bool AscendKernelRuntime::Init() {
if (!mindspore::kernel::OpInfoUtils::GenerateOpInfos(soc_version)) {
MS_LOG(EXCEPTION) << "Load op info form json config failed, version: " << soc_version;
}
const auto error_manager_ret = ErrorManagerAdapter::Init();
if (error_manager_ret != 0) {
if (!ErrorManagerAdapter::Init()) {
MS_LOG(WARNING) << "Init ErrorManager failed.";
}
bool init_device = false;