parent
b2d1ab954b
commit
6339a3ba6c
@ -0,0 +1,34 @@
|
||||
# Copyright 2019-2020 Huawei Technologies Co., Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ============================================================================
|
||||
|
||||
#cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(STUB_ERROR_MANAGER)
|
||||
|
||||
file(GLOB_RECURSE SRCS RELATIVE ${CMAKE_CURRENT_LIST_DIR}
|
||||
"src/error_manager_stub.cc"
|
||||
)
|
||||
|
||||
include_directories(${GE_CODE_DIR}/third_party/fwkacllib/inc)
|
||||
include_directories(${GE_CODE_DIR}/inc)
|
||||
include_directories(${GE_CODE_DIR}/inc/external)
|
||||
include_directories(${GE_CODE_DIR}/metadef/inc)
|
||||
include_directories(${GE_CODE_DIR}/inc/framework)
|
||||
include_directories(${GE_CODE_DIR}/metadef/inc/external)
|
||||
|
||||
add_library(error_manager_stub SHARED ${SRCS})
|
||||
target_link_libraries(error_manager_stub PRIVATE
|
||||
$<BUILD_INTERFACE:intf_pub>
|
||||
)
|
@ -0,0 +1,85 @@
|
||||
/**
|
||||
* Copyright 2019-2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "common/util/error_manager/error_manager.h"
|
||||
|
||||
ErrorManager &ErrorManager::GetInstance() {
|
||||
static ErrorManager instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
///
|
||||
/// @brief init
|
||||
/// @param [in] path: current so path
|
||||
/// @return int 0(success) -1(fail)
|
||||
///
|
||||
int ErrorManager::Init(std::string path) { return 0; }
|
||||
|
||||
///
|
||||
/// @brief Report error message
|
||||
/// @param [in] error_code: error code
|
||||
/// @param [in] args_map: parameter map
|
||||
/// @return int 0(success) -1(fail)
|
||||
///
|
||||
int ErrorManager::ReportErrMessage(std::string error_code, const std::map<std::string, std::string> &args_map) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
///
|
||||
/// @brief output error message
|
||||
/// @param [in] handle: print handle
|
||||
/// @return int 0(success) -1(fail)
|
||||
///
|
||||
int ErrorManager::OutputErrMessage(int handle) { return 0; }
|
||||
|
||||
///
|
||||
/// @brief output message
|
||||
/// @param [in] handle: print handle
|
||||
/// @return int 0(success) -1(fail)
|
||||
///
|
||||
int ErrorManager::OutputMessage(int handle) { return 0; }
|
||||
|
||||
///
|
||||
/// @brief Report error message
|
||||
/// @param [in] key: vector parameter key
|
||||
/// @param [in] value: vector parameter value
|
||||
///
|
||||
void ErrorManager::ATCReportErrMessage(std::string error_code, const std::vector<std::string> &key,
|
||||
const std::vector<std::string> &value) {
|
||||
}
|
||||
|
||||
///
|
||||
/// @brief report graph compile failed message such as error code and op_name in mstune case
|
||||
/// @param [in] msg: failed message map, key is error code, value is op_name
|
||||
/// @return int 0(success) -1(fail)
|
||||
///
|
||||
int ErrorManager::ReportMstuneCompileFailedMsg(const std::map<std::string, std::string> &msg) { return 0; }
|
||||
|
||||
///
|
||||
/// @brief save graph compile failed message from thread local map to global map
|
||||
/// @param [in] graph_name: graph name
|
||||
///
|
||||
void ErrorManager::SaveMstuneCompileFailedMsg(const std::string &graph_name) {}
|
||||
|
||||
///
|
||||
/// @brief get graph compile failed message in mstune case
|
||||
/// @param [in] graph_name: graph name
|
||||
/// @param [out] msg_map: failed message map, key is error code, value is op_name list
|
||||
/// @return int 0(success) -1(fail)
|
||||
///
|
||||
int ErrorManager::GetMstuneCompileFailedMsg(const std::string &graph_name, std::map<std::string, std::vector<std::string>> &msg_map) { return 0; }
|
||||
|
||||
|
Loading…
Reference in new issue