From be5eecabb729bf2a128d7cb1227c6b317fae3749 Mon Sep 17 00:00:00 2001 From: "liyihan2@huawei.com" Date: Wed, 24 Mar 2021 10:31:07 +0800 Subject: [PATCH] Common log optimize --- ge/common/cust_aicpu_kernel_store.cc | 4 ++-- ge/common/fmk_error_codes.cc | 36 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ge/common/cust_aicpu_kernel_store.cc b/ge/common/cust_aicpu_kernel_store.cc index 1055989b..fda7c040 100755 --- a/ge/common/cust_aicpu_kernel_store.cc +++ b/ge/common/cust_aicpu_kernel_store.cc @@ -25,7 +25,7 @@ void CustAICPUKernelStore::AddCustAICPUKernel(const CustAICPUKernelPtr &kernel) } void CustAICPUKernelStore::LoadCustAICPUKernelBinToOpDesc(const std::shared_ptr &op_desc) const { - GELOGD("LoadCustAICPUKernelBinToOpDesc in."); + GELOGD("LoadCustAICPUKernelBinToOpDesc in!"); if (op_desc != nullptr) { auto kernel_bin = FindKernel(op_desc->GetName()); if (kernel_bin != nullptr) { @@ -34,6 +34,6 @@ void CustAICPUKernelStore::LoadCustAICPUKernelBinToOpDesc(const std::shared_ptr< GELOGI("Load cust aicpu kernel:%s, %zu", kernel_bin->GetName().c_str(), kernel_bin->GetBinDataSize()); } } - GELOGD("LoadCustAICPUKernelBinToOpDesc success."); + GELOGD("LoadCustAICPUKernelBinToOpDesc success!"); } } // namespace ge diff --git a/ge/common/fmk_error_codes.cc b/ge/common/fmk_error_codes.cc index ddb8089d..a1798b80 100755 --- a/ge/common/fmk_error_codes.cc +++ b/ge/common/fmk_error_codes.cc @@ -37,28 +37,28 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY std::string StatusFactory::GetE return iter_find->second; } // General error code -DEF_ERRORNO(SUCCESS, "Success"); -DEF_ERRORNO(FAILED, "Failed"); +DEF_ERRORNO(SUCCESS, "Success."); +DEF_ERRORNO(FAILED, "Failed."); // Common errocode -DEF_ERRORNO(MEMALLOC_FAILED, "Failed to allocate memory!"); // 50331648 -DEF_ERRORNO(PARAM_INVALID, "Parameter's invalid!"); // 50331649 -DEF_ERRORNO(CCE_FAILED, "Failed to call CCE API!"); // 50331650 -DEF_ERRORNO(RT_FAILED, "Failed to call runtime API!"); // 50331651 -DEF_ERRORNO(INTERNAL_ERROR, "Internal errors"); // 50331652 -DEF_ERRORNO(CSEC_ERROR, "Failed to call libc_sec API!"); // 50331653 -DEF_ERRORNO(TEE_ERROR, "Failed to call tee API!"); // 50331653 -DEF_ERRORNO(UNSUPPORTED, "Parameter's unsupported!"); -DEF_ERRORNO(OUT_OF_MEMORY, "Out of memory!"); +DEF_ERRORNO(MEMALLOC_FAILED, "Failed to allocate memory."); // 50331648 +DEF_ERRORNO(PARAM_INVALID, "Parameter's invalid."); // 50331649 +DEF_ERRORNO(CCE_FAILED, "Failed to call CCE API."); // 50331650 +DEF_ERRORNO(RT_FAILED, "Failed to call runtime API."); // 50331651 +DEF_ERRORNO(INTERNAL_ERROR, "Internal errors."); // 50331652 +DEF_ERRORNO(CSEC_ERROR, "Failed to call libc_sec API."); // 50331653 +DEF_ERRORNO(TEE_ERROR, "Failed to call tee API."); // 50331653 +DEF_ERRORNO(UNSUPPORTED, "Parameter's unsupported."); +DEF_ERRORNO(OUT_OF_MEMORY, "Out of memory."); // errorcode -DEF_ERRORNO(PARSE_MODEL_FAILED, "Failed to parse the model!"); -DEF_ERRORNO(PARSE_WEIGHTS_FAILED, "Failed to parse the weights!"); -DEF_ERRORNO(NOT_INITIALIZED, "It hasn't been initialized!"); -DEF_ERRORNO(TIMEOUT, "Running time out!"); +DEF_ERRORNO(PARSE_MODEL_FAILED, "Failed to parse the model."); +DEF_ERRORNO(PARSE_WEIGHTS_FAILED, "Failed to parse the weights."); +DEF_ERRORNO(NOT_INITIALIZED, "It hasn't been initialized."); +DEF_ERRORNO(TIMEOUT, "Running time out."); // errorcode -DEF_ERRORNO(MODEL_NOT_READY, "The model is not ready yet!"); -DEF_ERRORNO(PUSH_DATA_FAILED, "Failed to push data!"); -DEF_ERRORNO(DATA_QUEUE_ISFULL, "Data queue is full!"); +DEF_ERRORNO(MODEL_NOT_READY, "The model is not ready yet."); +DEF_ERRORNO(PUSH_DATA_FAILED, "Failed to push data."); +DEF_ERRORNO(DATA_QUEUE_ISFULL, "Data queue is full."); } // namespace domi