From bc3879718e948320e1eaced8bfc13275fdf0135d Mon Sep 17 00:00:00 2001 From: "liyihan2@huawei.com" Date: Sat, 27 Mar 2021 15:21:05 +0800 Subject: [PATCH] Common log optimize --- ge/common/dump/dump_manager.cc | 2 +- ge/common/dump/dump_op.cc | 8 ++++---- ge/common/dump/opdebug_register.cc | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ge/common/dump/dump_manager.cc b/ge/common/dump/dump_manager.cc index 3d9df167..879e898f 100644 --- a/ge/common/dump/dump_manager.cc +++ b/ge/common/dump/dump_manager.cc @@ -56,7 +56,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status DumpManager::SetDumpConf dump_properties.SetDumpOpSwitch(dump_op_switch); if (dump_op_switch == kDumpoff && dump_config.dump_list.empty()) { dump_properties_map_.emplace(kInferSessionId, dump_properties); - GELOGE(PARAM_INVALID, "Dump list is invalid, dump_op_switch is %s", dump_op_switch.c_str()) + GELOGE(PARAM_INVALID, "Dump list is invalid,dump_op_switch is %s", dump_op_switch.c_str()) return PARAM_INVALID; } diff --git a/ge/common/dump/dump_op.cc b/ge/common/dump/dump_op.cc index d4119d52..0becbdc8 100755 --- a/ge/common/dump/dump_op.cc +++ b/ge/common/dump/dump_op.cc @@ -157,24 +157,24 @@ Status DumpOp::ExecutorDumpOp(aicpu::dump::OpMappingInfo &op_mapping_info) { rtError_t rt_ret = rtMalloc(&proto_dev_mem_, proto_size, RT_MEMORY_HBM); if (rt_ret != RT_ERROR_NONE) { - GELOGE(rt_ret, "Call rtMalloc failed, ret:0x%X", rt_ret); + GELOGE(rt_ret, "Call rtMalloc failed, ret: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } rt_ret = rtMemcpy(proto_dev_mem_, proto_size, proto_msg.c_str(), proto_size, RT_MEMCPY_HOST_TO_DEVICE); if (rt_ret != RT_ERROR_NONE) { - GELOGE(rt_ret, "Call rtMemcpy failed, ret:0x%X", rt_ret); + GELOGE(rt_ret, "Call rtMemcpy failed, ret: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } rt_ret = rtMalloc(&proto_size_dev_mem_, sizeof(size_t), RT_MEMORY_HBM); if (rt_ret != RT_ERROR_NONE) { - GELOGE(rt_ret, "Call rtMalloc failed, ret:0x%X", rt_ret); + GELOGE(rt_ret, "Call rtMalloc failed, ret: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } rt_ret = rtMemcpy(proto_size_dev_mem_, sizeof(size_t), &proto_size, sizeof(size_t), RT_MEMCPY_HOST_TO_DEVICE); if (rt_ret != RT_ERROR_NONE) { - GELOGE(rt_ret, "Call rtMemcpy failed, ret:0x%X", rt_ret); + GELOGE(rt_ret, "Call rtMemcpy failed, ret: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } diff --git a/ge/common/dump/opdebug_register.cc b/ge/common/dump/opdebug_register.cc index a439ef54..aae80cb0 100644 --- a/ge/common/dump/opdebug_register.cc +++ b/ge/common/dump/opdebug_register.cc @@ -27,7 +27,7 @@ Status OpdebugRegister::RegisterDebugForModel(rtModel_t model_handle, uint32_t o GELOGD("Start to register debug for model in overflow"); auto ret = MallocMemForOpdebug(); if (ret != SUCCESS) { - GELOGE(ret, "Malloc memory for opdebug in model overflow failed, ret:0x%X", ret); + GELOGE(ret, "Malloc memory for opdebug in model overflow failed ,ret:0x%X", ret); return ret; } uint32_t debug_stream_id = 0; @@ -74,7 +74,7 @@ Status OpdebugRegister::RegisterDebugForStream(rtStream_t stream, uint32_t op_de GELOGD("Start to register debug for stream in stream overflow"); auto ret = MallocMemForOpdebug(); if (ret != SUCCESS) { - GELOGE(ret, "Malloc memory for opdebug in stream overflow, ret:0x%X", ret); + GELOGE(ret, "Malloc memory for opdebug in stream overflow ,ret:0x%X", ret); return ret; } @@ -82,7 +82,7 @@ Status OpdebugRegister::RegisterDebugForStream(rtStream_t stream, uint32_t op_de uint32_t debug_task_id = 0; auto rt_ret = rtDebugRegisterForStream(stream, op_debug_mode, op_debug_addr_, &debug_stream_id, &debug_task_id); if (rt_ret != RT_ERROR_NONE) { - GELOGE(RT_FAILED, "rtDebugRegisterForStream error, ret:0x%X", rt_ret); + GELOGE(RT_FAILED, "rtDebugRegisterForStream error, ret: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); } GELOGD("debug_task_id:%u, debug_stream_id:%u in stream overflow.", debug_task_id, debug_stream_id); @@ -134,7 +134,7 @@ Status OpdebugRegister::MallocMemForOpdebug() { } rt_ret = rtMemcpy(p2p_debug_addr_, sizeof(uint64_t), &debug_addrs_tmp, sizeof(uint64_t), RT_MEMCPY_HOST_TO_DEVICE); if (rt_ret != RT_ERROR_NONE) { - GELOGE(RT_FAILED, "rtMemcpy to p2p_addr, ret: 0x%X", rt_ret); + GELOGE(RT_FAILED, "rtMemcpy to p2p_addr error: 0x%X", rt_ret); return RT_ERROR_TO_GE_STATUS(rt_ret); }