已合并
【PR】: 针对EH错误码ErrorMessage进行语义化描述整改 #3857
DanielTANG创建于 7月27日
【PR】: 针对EH错误码ErrorMessage进行语义化描述整改 #3857
已合并
共 16 个文件变更+150-67
| @@ -174,7 +174,7 @@ namespace acl { | |||
| 174 | default: { | 174 | default: { |
| 175 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 175 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 176 | std::vector<const char *>({"func", "value", "param", "expect"}), | 176 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 177 | - std::vector<const char *>({__func__, acl::GetTensorTypeDesc(aclType), | 177 | + std::vector<const char *>({"Obtaining the tdt data type", acl::GetTensorTypeDesc(aclType), |
| 178 | "aclType", "ACL_TENSOR_DATA_END_OF_SEQUENCE or ACL_TENSOR_DATA_TENSOR or ACL_TENSOR_DATA_ABNORMAL"})); | 178 | "aclType", "ACL_TENSOR_DATA_END_OF_SEQUENCE or ACL_TENSOR_DATA_TENSOR or ACL_TENSOR_DATA_ABNORMAL"})); |
| 179 | return ACL_ERROR_INVALID_PARAM; | 179 | return ACL_ERROR_INVALID_PARAM; |
| 180 | } | 180 | } |
| @@ -200,7 +200,7 @@ namespace acl { | |||
| 200 | default: { | 200 | default: { |
| 201 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 201 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 202 | std::vector<const char *>({"func", "value", "param", "expect"}), | 202 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 203 | - std::vector<const char *>({__func__, acl::GetTensorTypeDesc(aclType), | 203 | + std::vector<const char *>({"Obtaining the tdt data type", acl::GetTensorTypeDesc(aclType), |
| 204 | "aclType", "ACL_TENSOR_DATA_END_OF_SEQUENCE or ACL_TENSOR_DATA_TENSOR or ACL_TENSOR_DATA_ABNORMAL"})); | 204 | "aclType", "ACL_TENSOR_DATA_END_OF_SEQUENCE or ACL_TENSOR_DATA_TENSOR or ACL_TENSOR_DATA_ABNORMAL"})); |
| 205 | return ACL_ERROR_INVALID_PARAM; | 205 | return ACL_ERROR_INVALID_PARAM; |
| 206 | } | 206 | } |
| @@ -226,7 +226,7 @@ namespace acl { | |||
| 226 | default: { | 226 | default: { |
| 227 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 227 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 228 | std::vector<const char *>({"func", "value", "param", "expect"}), | 228 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 229 | - std::vector<const char *>({__func__, acl::GetTdtDataTypeDesc(tdtDataType), "tdtDataType", | 229 | + std::vector<const char *>({"Obtaining the tensor data type", acl::GetTdtDataTypeDesc(tdtDataType), "tdtDataType", |
| 230 | "TDT_END_OF_SEQUENCE or TDT_TENSOR or TDT_ABNORMAL"})); | 230 | "TDT_END_OF_SEQUENCE or TDT_TENSOR or TDT_ABNORMAL"})); |
| 231 | return ACL_ERROR_UNSUPPORTED_DATA_TYPE; | 231 | return ACL_ERROR_UNSUPPORTED_DATA_TYPE; |
| 232 | } | 232 | } |
| @@ -260,7 +260,7 @@ namespace acl { | |||
| 260 | default: { | 260 | default: { |
| 261 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 261 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 262 | std::vector<const char *>({"func", "value", "param", "expect"}), | 262 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 263 | - std::vector<const char *>({__func__, acl::GetTdtDataTypeDescV2(tdtDataType), "tdtDataType", | 263 | + std::vector<const char *>({"Obtaining the tensor data type", acl::GetTdtDataTypeDescV2(tdtDataType), "tdtDataType", |
| 264 | "[TDT_TENSOR(0), TDT_END_OF_SEQUENCE(1), TDT_ABNORMAL(2), TDT_SLICE_TENSOR(3), TDT_END_TENSOR(4)]"})); | 264 | "[TDT_TENSOR(0), TDT_END_OF_SEQUENCE(1), TDT_ABNORMAL(2), TDT_SLICE_TENSOR(3), TDT_END_TENSOR(4)]"})); |
| 265 | return ACL_ERROR_UNSUPPORTED_DATA_TYPE; | 265 | return ACL_ERROR_UNSUPPORTED_DATA_TYPE; |
| 266 | } | 266 | } |
| @@ -326,7 +326,7 @@ namespace acl { | |||
| 326 | const std::string sizeVal = std::to_string(dataset->blobs.size()); | 326 | const std::string sizeVal = std::to_string(dataset->blobs.size()); |
| 327 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 327 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 328 | std::vector<const char *>({"func", "value", "param", "reason"}), | 328 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 329 | - std::vector<const char *>({__func__, sizeVal.c_str(), "dataset->blobs.size", | 329 | + std::vector<const char *>({"tdt data deserialization", sizeVal.c_str(), "dataset->blobs.size", |
| 330 | "dataset must be empty before deserialization"})); | 330 | "dataset must be empty before deserialization"})); |
| 331 | return ACL_ERROR_INVALID_PARAM; | 331 | return ACL_ERROR_INVALID_PARAM; |
| 332 | } | 332 | } |
| @@ -402,7 +402,7 @@ namespace acl { | |||
| 402 | const std::string sizeVal = std::to_string(dataset->blobs.size()); | 402 | const std::string sizeVal = std::to_string(dataset->blobs.size()); |
| 403 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 403 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 404 | std::vector<const char *>({"func", "value", "param", "reason"}), | 404 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 405 | - std::vector<const char *>({__func__, sizeVal.c_str(), "dataset->blobs.size", | 405 | + std::vector<const char *>({"tdt data deserialization", sizeVal.c_str(), "dataset->blobs.size", |
| 406 | "dataset must be empty or freeSelf must be true before deserialization"})); | 406 | "dataset must be empty or freeSelf must be true before deserialization"})); |
| 407 | return ACL_ERROR_INVALID_PARAM; | 407 | return ACL_ERROR_INVALID_PARAM; |
| 408 | } | 408 | } |
| @@ -23,9 +23,9 @@ namespace { | |||
| 23 | aclError CopyParam(const void *const src, const size_t srcLen, void *const dst, const size_t dstLen, | 23 | aclError CopyParam(const void *const src, const size_t srcLen, void *const dst, const size_t dstLen, |
| 24 | size_t *const realCopySize = nullptr) | 24 | size_t *const realCopySize = nullptr) |
| 25 | { | 25 | { |
| 26 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(src); | 26 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(src, "Parameter copy"); |
| 27 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(dst); | 27 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(dst, "Parameter copy"); |
| 28 | - ACL_CHECK_INVALID_PARAM_WITH_REASON(srcLen > dstLen, srcLen, "srcLen must not be larger than dstLen"); | 28 | + ACL_CHECK_INVALID_PARAM_WITH_REASON_AND_FUNC_DESC(srcLen > dstLen, srcLen, "srcLen must not be larger than dstLen", "Parameter copy"); |
| 29 | const auto ret = memcpy_s(dst, dstLen, src, srcLen); | 29 | const auto ret = memcpy_s(dst, dstLen, src, srcLen); |
| 30 | if (ret != EOK) { | 30 | if (ret != EOK) { |
| 31 | const std::string retVal = std::to_string(ret); | 31 | const std::string retVal = std::to_string(ret); |
| @@ -36,7 +36,7 @@ namespace { | |||
| 36 | const std::string extendInfo = ss.str(); | 36 | const std::string extendInfo = ss.str(); |
| 37 | acl::AclErrorLogManager::ReportInputError(acl::STANDARD_FUNC_FAILED_MSG, | 37 | acl::AclErrorLogManager::ReportInputError(acl::STANDARD_FUNC_FAILED_MSG, |
| 38 | std::vector<const char *>({"func1", "func2", "ret_code", "reason", "extend_info"}), | 38 | std::vector<const char *>({"func1", "func2", "ret_code", "reason", "extend_info"}), |
| 39 | - std::vector<const char *>({__func__, "memcpy_s", retVal.c_str(), | 39 | + std::vector<const char *>({"Parameter copy", "memcpy_s", retVal.c_str(), |
| 40 | strerror(ret), extendInfo.c_str()})); | 40 | strerror(ret), extendInfo.c_str()})); |
| 41 | ACL_LOG_ERROR("[Call][MemCpy]call memcpy failed, result=%d, srcLen=%zu, dstLen=%zu", | 41 | ACL_LOG_ERROR("[Call][MemCpy]call memcpy failed, result=%d, srcLen=%zu, dstLen=%zu", |
| 42 | ret, srcLen, dstLen); | 42 | ret, srcLen, dstLen); |
| @@ -56,7 +56,7 @@ namespace acl { | |||
| 56 | ACL_LOG_ERROR("mode must be set in acltdtQueueRouteQueryInfo, please use acltdtSetQueueRouteQueryInfo"); | 56 | ACL_LOG_ERROR("mode must be set in acltdtQueueRouteQueryInfo, please use acltdtSetQueueRouteQueryInfo"); |
| 57 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 57 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 58 | std::vector<const char *>({"func", "value", "param", "reason"}), | 58 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 59 | - std::vector<const char *>({__func__, "false", "queryInfo->isConfigMode", | 59 | + std::vector<const char *>({"Checking the validity of the queue route query operation", "false", "queryInfo->isConfigMode", |
| 60 | "Currently, the query is configured based on queue. The queue must be configured through " | 60 | "Currently, the query is configured based on queue. The queue must be configured through " |
| 61 | "acltdtSetQueueRouteQueryInfo"})); | 61 | "acltdtSetQueueRouteQueryInfo"})); |
| 62 | return ACL_ERROR_INVALID_PARAM; | 62 | return ACL_ERROR_INVALID_PARAM; |
| @@ -68,7 +68,7 @@ namespace acl { | |||
| 68 | "please use acltdtSetQueueRouteQueryInfo"); | 68 | "please use acltdtSetQueueRouteQueryInfo"); |
| 69 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 69 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 70 | std::vector<const char *>({"func", "value", "param", "reason"}), | 70 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 71 | - std::vector<const char *>({__func__, "false", "queryInfo->isConfigSrc", | 71 | + std::vector<const char *>({"Checking the validity of the queue route query operation", "false", "queryInfo->isConfigSrc", |
| 72 | "Currently, the query is configured based on the source queue. The source queue must be configured through " | 72 | "Currently, the query is configured based on the source queue. The source queue must be configured through " |
| 73 | "acltdtSetQueueRouteQueryInfo"})); | 73 | "acltdtSetQueueRouteQueryInfo"})); |
| 74 | return ACL_ERROR_INVALID_PARAM; | 74 | return ACL_ERROR_INVALID_PARAM; |
| @@ -81,7 +81,7 @@ namespace acl { | |||
| 81 | "please use acltdtSetQueueRouteQueryInfo"); | 81 | "please use acltdtSetQueueRouteQueryInfo"); |
| 82 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 82 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 83 | std::vector<const char *>({"func", "value", "param", "reason"}), | 83 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 84 | - std::vector<const char *>({__func__, "false", "queryInfo->isConfigDst", | 84 | + std::vector<const char *>({"Checking the validity of the queue route query operation", "false", "queryInfo->isConfigDst", |
| 85 | "Currently, the query is configured based on the destination queue. The destination queue must be configured through " | 85 | "Currently, the query is configured based on the destination queue. The destination queue must be configured through " |
| 86 | "acltdtSetQueueRouteQueryInfo"})); | 86 | "acltdtSetQueueRouteQueryInfo"})); |
| 87 | return ACL_ERROR_INVALID_PARAM; | 87 | return ACL_ERROR_INVALID_PARAM; |
| @@ -94,7 +94,7 @@ namespace acl { | |||
| 94 | "please use acltdtSetQueueRouteQueryInfo"); | 94 | "please use acltdtSetQueueRouteQueryInfo"); |
| 95 | const char_t *argList[] = {"func", "value", "param", "reason"}; | 95 | const char_t *argList[] = {"func", "value", "param", "reason"}; |
| 96 | std::string value = std::to_string(queryInfo->isConfigSrc) + '/' + std::to_string(queryInfo->isConfigDst); | 96 | std::string value = std::to_string(queryInfo->isConfigSrc) + '/' + std::to_string(queryInfo->isConfigDst); |
| 97 | - const char_t *argVal[] = {__func__, value.c_str(), "queryInfo->isConfigSrc/isConfigDst", | 97 | + const char_t *argVal[] = {"Checking the validity of the queue route query operation", value.c_str(), "queryInfo->isConfigSrc/isConfigDst", |
| 98 | "Currently, the query is configured based on the source queue and the destination queue. The source queue and destination queue must be configured through " | 98 | "Currently, the query is configured based on the source queue and the destination queue. The source queue and destination queue must be configured through " |
| 99 | "acltdtSetQueueRouteQueryInfo"}; | 99 | "acltdtSetQueueRouteQueryInfo"}; |
| 100 | acl::AclErrorLogManager::ReportInputErrorWithChar(acl::INVALID_PARAM_REASON_MSG, argList, argVal, 4UL); | 100 | acl::AclErrorLogManager::ReportInputErrorWithChar(acl::INVALID_PARAM_REASON_MSG, argList, argVal, 4UL); |
| @@ -108,7 +108,7 @@ namespace acl { | |||
| 108 | default: { | 108 | default: { |
| 109 | ACL_LOG_ERROR("[Check][Type]unknown mode %d.", queryInfo->mode); | 109 | ACL_LOG_ERROR("[Check][Type]unknown mode %d.", queryInfo->mode); |
| 110 | const char_t *argList[] = {"func", "value", "param", "expect"}; | 110 | const char_t *argList[] = {"func", "value", "param", "expect"}; |
| 111 | - const char_t *argVal[] = {__func__, acl::GetQueueRouteQueryModeDesc(static_cast<acltdtQueueRouteQueryMode>(queryInfo->mode)), | 111 | + const char_t *argVal[] = {"Checking the validity of the queue route query operation", acl::GetQueueRouteQueryModeDesc(static_cast<acltdtQueueRouteQueryMode>(queryInfo->mode)), |
| 112 | "queryInfo->mode", "ACL_TDT_QUEUE_ROUTE_QUERY_SRC or ACL_TDT_QUEUE_ROUTE_QUERY_DST or ACL_TDT_QUEUE_ROUTE_QUERY_SRC_AND_DST or ACL_TDT_QUEUE_ROUTE_QUERY_ABNORMAL"}; | 112 | "queryInfo->mode", "ACL_TDT_QUEUE_ROUTE_QUERY_SRC or ACL_TDT_QUEUE_ROUTE_QUERY_DST or ACL_TDT_QUEUE_ROUTE_QUERY_SRC_AND_DST or ACL_TDT_QUEUE_ROUTE_QUERY_ABNORMAL"}; |
| 113 | acl::AclErrorLogManager::ReportInputErrorWithChar(acl::INVALID_VALUE_MSG, argList, argVal, 4UL); | 113 | acl::AclErrorLogManager::ReportInputErrorWithChar(acl::INVALID_VALUE_MSG, argList, argVal, 4UL); |
| 114 | return ACL_ERROR_INVALID_PARAM; | 114 | return ACL_ERROR_INVALID_PARAM; |
| @@ -110,7 +110,7 @@ namespace { | |||
| 110 | ACL_LOG_ERROR("[Check][Len]len[%u] is invalid, it should not be smaller than %zu", len, commandLen); | 110 | ACL_LOG_ERROR("[Check][Len]len[%u] is invalid, it should not be smaller than %zu", len, commandLen); |
| 111 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 111 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 112 | std::vector<const char *>({"func", "value", "param", "reason"}), | 112 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 113 | - std::vector<const char *>({__func__, lenVal.c_str(), "len", errMsg.c_str()})); | 113 | + std::vector<const char *>({"Processing profiling configuration data", lenVal.c_str(), "len", errMsg.c_str()})); |
| 114 | return ACL_ERROR_INVALID_PARAM; | 114 | return ACL_ERROR_INVALID_PARAM; |
| 115 | } | 115 | } |
| 116 | rtProfCommandHandle_t *const profilerConfig = static_cast<rtProfCommandHandle_t *>(data); | 116 | rtProfCommandHandle_t *const profilerConfig = static_cast<rtProfCommandHandle_t *>(data); |
| @@ -220,9 +220,10 @@ void aclGetMsgCallback(const char_t *msg, uint32_t len) | |||
| 220 | int32_t UpdateOpSystemRunCfg(void *cfgAddr, uint32_t cfgLen) | 220 | int32_t UpdateOpSystemRunCfg(void *cfgAddr, uint32_t cfgLen) |
| 221 | { | 221 | { |
| 222 | ACL_LOG_INFO("start to execute UpdateOpSystemRunCfg"); | 222 | ACL_LOG_INFO("start to execute UpdateOpSystemRunCfg"); |
| 223 | - ACL_REQUIRES_NOT_NULL_RET_INPUT_REPORT(cfgAddr, ACL_ERROR_RT_PARAM_INVALID); | 223 | + ACL_REQUIRES_NOT_NULL_RET_INPUT_REPORT_WITH_FUNC_DESC(cfgAddr, ACL_ERROR_RT_PARAM_INVALID, |
| 224 | - ACL_CHECK_INVALID_PARAM_WITH_REASON_RET(static_cast<size_t>(cfgLen) < sizeof(size_t), cfgLen, | 224 | + "Updating the system running configuration for operator delivery"); |
| 225 | - "cfgLen must be greater than or equal to sizeof(size_t)", ACL_ERROR_RT_PARAM_INVALID); | 225 | + ACL_CHECK_INVALID_PARAM_WITH_REASON_RET_AND_FUNC_DESC(static_cast<size_t>(cfgLen) < sizeof(size_t), cfgLen, |
| 226 | + "cfgLen must be greater than or equal to sizeof(size_t)", ACL_ERROR_RT_PARAM_INVALID, "Updating the system running configuration for operator delivery"); | ||
| 226 | 227 | ||
| 227 | // get device id | 228 | // get device id |
| 228 | int32_t devId = 0; | 229 | int32_t devId = 0; |
| @@ -275,10 +276,11 @@ aclError HandleErrorManagerConfig(const char_t *const configPath, error_message: | |||
| 275 | error_mode = error_message::ErrorMessageMode::PROCESS_MODE; | 276 | error_mode = error_message::ErrorMessageMode::PROCESS_MODE; |
| 276 | } else { | 277 | } else { |
| 277 | ACL_LOG_ERROR("err_msg mode config is invalid %s", strConfig.c_str()); | 278 | ACL_LOG_ERROR("err_msg mode config is invalid %s", strConfig.c_str()); |
| 278 | - acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 279 | + acl::AclErrorLogManager::ReportInputError( |
| 279 | - std::vector<const char *>({"func", "value", "param", "reason"}), | 280 | + acl::INVALID_PARAM_REASON_MSG, std::vector<const char*>({"func", "value", "param", "reason"}), |
| 280 | - std::vector<const char *>({__func__, strConfig.c_str(), "err_msg mode", | 281 | + std::vector<const char*>( |
| 281 | - "err_msg mode config is invalid, only support INTERNAL_MODE and PROCESS_MODE"})); | 282 | + {"Parsing the configuration of the error information reporting mode", strConfig.c_str(), "err_msg mode", |
| 283 | + "err_msg mode config is invalid, only support INTERNAL_MODE and PROCESS_MODE"})); | ||
| 282 | return ACL_ERROR_INVALID_PARAM; | 284 | return ACL_ERROR_INVALID_PARAM; |
| 283 | } | 285 | } |
| 284 | } | 286 | } |
| @@ -89,12 +89,12 @@ aclError aclrtGetCurrentContextImpl(aclrtContext *context) | |||
| 89 | 89 | ||
| 90 | static aclError GetSysParamOpt(aclSysParamOpt opt, int64_t *value, bool isCtx) | 90 | static aclError GetSysParamOpt(aclSysParamOpt opt, int64_t *value, bool isCtx) |
| 91 | { | 91 | { |
| 92 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(value); | 92 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(value, "Obtaining system parameter values from the current context"); |
| 93 | - ACL_CHECK_INVALID_VALUE_WITH_DESC( | 93 | + ACL_CHECK_INVALID_VALUE_WITH_DESC_AND_FUNC_DESC( |
| 94 | (opt == ACL_OPT_DETERMINISTIC || opt == ACL_OPT_ENABLE_DEBUG_KERNEL || opt == ACL_OPT_STRONG_CONSISTENCY), | 94 | (opt == ACL_OPT_DETERMINISTIC || opt == ACL_OPT_ENABLE_DEBUG_KERNEL || opt == ACL_OPT_STRONG_CONSISTENCY), |
| 95 | acl::GetSysParamOptDesc(opt), "opt", | 95 | acl::GetSysParamOptDesc(opt), "opt", |
| 96 | "ACL_OPT_DETERMINISTIC or ACL_OPT_ENABLE_DEBUG_KERNEL or ACL_OPT_STRONG_CONSISTENCY", | 96 | "ACL_OPT_DETERMINISTIC or ACL_OPT_ENABLE_DEBUG_KERNEL or ACL_OPT_STRONG_CONSISTENCY", |
| 97 | - ACL_ERROR_INVALID_PARAM); | 97 | + ACL_ERROR_INVALID_PARAM, "Obtaining system parameter values from the current context"); |
| 98 | rtError_t rtErr = RT_ERROR_NONE; | 98 | rtError_t rtErr = RT_ERROR_NONE; |
| 99 | if (isCtx) { | 99 | if (isCtx) { |
| 100 | rtErr = rtCtxGetSysParamOpt(static_cast<rtSysParamOpt>(opt), value); | 100 | rtErr = rtCtxGetSysParamOpt(static_cast<rtSysParamOpt>(opt), value); |
| @@ -115,11 +115,11 @@ static aclError GetSysParamOpt(aclSysParamOpt opt, int64_t *value, bool isCtx) | |||
| 115 | 115 | ||
| 116 | static aclError SetSysParamOpt(aclSysParamOpt opt, int64_t value, bool isCtx) | 116 | static aclError SetSysParamOpt(aclSysParamOpt opt, int64_t value, bool isCtx) |
| 117 | { | 117 | { |
| 118 | - ACL_CHECK_INVALID_VALUE_WITH_DESC( | 118 | + ACL_CHECK_INVALID_VALUE_WITH_DESC_AND_FUNC_DESC( |
| 119 | (opt == ACL_OPT_DETERMINISTIC || opt == ACL_OPT_ENABLE_DEBUG_KERNEL || opt == ACL_OPT_STRONG_CONSISTENCY), | 119 | (opt == ACL_OPT_DETERMINISTIC || opt == ACL_OPT_ENABLE_DEBUG_KERNEL || opt == ACL_OPT_STRONG_CONSISTENCY), |
| 120 | acl::GetSysParamOptDesc(opt), "opt", | 120 | acl::GetSysParamOptDesc(opt), "opt", |
| 121 | "ACL_OPT_DETERMINISTIC or ACL_OPT_ENABLE_DEBUG_KERNEL or ACL_OPT_STRONG_CONSISTENCY", | 121 | "ACL_OPT_DETERMINISTIC or ACL_OPT_ENABLE_DEBUG_KERNEL or ACL_OPT_STRONG_CONSISTENCY", |
| 122 | - ACL_ERROR_INVALID_PARAM); | 122 | + ACL_ERROR_INVALID_PARAM, "Setting system parameter values in the current context"); |
| 123 | if (isCtx) { | 123 | if (isCtx) { |
| 124 | ACL_REQUIRES_RTS_OK(rtCtxSetSysParamOpt(static_cast<rtSysParamOpt>(opt), value)); | 124 | ACL_REQUIRES_RTS_OK(rtCtxSetSysParamOpt(static_cast<rtSysParamOpt>(opt), value)); |
| 125 | } else { | 125 | } else { |
| @@ -108,7 +108,7 @@ inline aclError MemcpyKindTranslate(const aclrtMemcpyKind kind, rtMemcpyKind_t & | |||
| 108 | ACL_LOG_ERROR("[Check][MemcpyKindTranslate]param kind invalid, which is %s.", acl::GetMemcpyKindDesc(kind)); | 108 | ACL_LOG_ERROR("[Check][MemcpyKindTranslate]param kind invalid, which is %s.", acl::GetMemcpyKindDesc(kind)); |
| 109 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 109 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 110 | std::vector<const char *>({"func", "value", "param", "expect"}), | 110 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 111 | - std::vector<const char *>({__func__, acl::GetMemcpyKindDesc(kind), "kind", | 111 | + std::vector<const char *>({"Memory copy type conversion", acl::GetMemcpyKindDesc(kind), "kind", |
| 112 | "ACL_MEMCPY_HOST_TO_DEVICE or " | 112 | "ACL_MEMCPY_HOST_TO_DEVICE or " |
| 113 | "ACL_MEMCPY_DEVICE_TO_DEVICE or ACL_MEMCPY_DEVICE_TO_HOST or " | 113 | "ACL_MEMCPY_DEVICE_TO_DEVICE or ACL_MEMCPY_DEVICE_TO_HOST or " |
| 114 | "ACL_MEMCPY_HOST_TO_HOST or ACL_MEMCPY_DEFAULT or ACL_MEMCPY_HOST_TO_BUF_TO_DEVICE."})); | 114 | "ACL_MEMCPY_HOST_TO_HOST or ACL_MEMCPY_DEFAULT or ACL_MEMCPY_HOST_TO_BUF_TO_DEVICE."})); |
| @@ -138,8 +138,8 @@ aclError CheckMemcpy2dParam(const void *const dst, const size_t dpitch, const vo | |||
| 138 | return ACL_SUCCESS; | 138 | return ACL_SUCCESS; |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(dst); | 141 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(dst, "Checking the synchronous memory copy parameter validity"); |
| 142 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(src); | 142 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(src, "Checking the synchronous memory copy parameter validity"); |
| 143 | 143 | ||
| 144 | if ((width > spitch) || (width > dpitch)) { | 144 | if ((width > spitch) || (width > dpitch)) { |
| 145 | ACL_LOG_ERROR("[Check][Width]input param width[%zu] must be smaller than spitch[%zu] and dpitch[%zu]", | 145 | ACL_LOG_ERROR("[Check][Width]input param width[%zu] must be smaller than spitch[%zu] and dpitch[%zu]", |
| @@ -149,7 +149,7 @@ aclError CheckMemcpy2dParam(const void *const dst, const size_t dpitch, const vo | |||
| 149 | spitch, dpitch); | 149 | spitch, dpitch); |
| 150 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 150 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 151 | std::vector<const char *>({"func", "value", "param", "reason"}), | 151 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 152 | - std::vector<const char *>({__func__, widthVal.c_str(), "width", errMsg.c_str()})); | 152 | + std::vector<const char *>({"Checking the synchronous memory copy parameter validity", widthVal.c_str(), "width", errMsg.c_str()})); |
| 153 | return ACL_ERROR_INVALID_PARAM; | 153 | return ACL_ERROR_INVALID_PARAM; |
| 154 | } | 154 | } |
| 155 | switch (kind) { | 155 | switch (kind) { |
| @@ -173,7 +173,7 @@ aclError CheckMemcpy2dParam(const void *const dst, const size_t dpitch, const vo | |||
| 173 | ACL_LOG_ERROR("[Check][Kind]invalid kind of memcpy, kind = %s", acl::GetMemcpyKindDesc(kind)); | 173 | ACL_LOG_ERROR("[Check][Kind]invalid kind of memcpy, kind = %s", acl::GetMemcpyKindDesc(kind)); |
| 174 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 174 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 175 | std::vector<const char *>({"func", "value", "param", "expect"}), | 175 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 176 | - std::vector<const char *>({__func__, acl::GetMemcpyKindDesc(kind), | 176 | + std::vector<const char *>({"Checking the synchronous memory copy parameter validity", acl::GetMemcpyKindDesc(kind), |
| 177 | "kind", "ACL_MEMCPY_HOST_TO_DEVICE or ACL_MEMCPY_DEVICE_TO_HOST or ACL_MEMCPY_DEVICE_TO_DEVICE or ACL_MEMCPY_DEFAULT"})); | 177 | "kind", "ACL_MEMCPY_HOST_TO_DEVICE or ACL_MEMCPY_DEVICE_TO_HOST or ACL_MEMCPY_DEVICE_TO_DEVICE or ACL_MEMCPY_DEFAULT"})); |
| 178 | return ACL_ERROR_INVALID_PARAM; | 178 | return ACL_ERROR_INVALID_PARAM; |
| 179 | } | 179 | } |
| @@ -1596,12 +1596,13 @@ aclError aclrtCmoAsyncWithBarrierImpl(void *src, size_t size, aclrtCmoType cmoTy | |||
| 1596 | static aclError ValidateMemcpyBatchParams(void **dsts, size_t *destMaxs, void **srcs, size_t *sizes, | 1596 | static aclError ValidateMemcpyBatchParams(void **dsts, size_t *destMaxs, void **srcs, size_t *sizes, |
| 1597 | size_t numBatches, aclrtMemcpyBatchAttr *attrs, size_t *attrsIndexes, size_t numAttrs) | 1597 | size_t numBatches, aclrtMemcpyBatchAttr *attrs, size_t *attrsIndexes, size_t numAttrs) |
| 1598 | { | 1598 | { |
| 1599 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(dsts); | 1599 | + constexpr const char_t *funcDesc = "Checking the batch memory copy parameter validity"; |
| 1600 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(destMaxs); | 1600 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(dsts, funcDesc); |
| 1601 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(srcs); | 1601 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(destMaxs, funcDesc); |
| 1602 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(sizes); | 1602 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(srcs, funcDesc); |
| 1603 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(attrs); | 1603 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(sizes, funcDesc); |
| 1604 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(attrsIndexes); | 1604 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(attrs, funcDesc); |
| 1605 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(attrsIndexes, funcDesc); | ||
| 1605 | 1606 | ||
| 1606 | for (size_t i = 0UL; i < numBatches; i++) { | 1607 | for (size_t i = 0UL; i < numBatches; i++) { |
| 1607 | if (destMaxs[i] < sizes[i]) { | 1608 | if (destMaxs[i] < sizes[i]) { |
| @@ -1611,7 +1612,7 @@ static aclError ValidateMemcpyBatchParams(void **dsts, size_t *destMaxs, void ** | |||
| 1611 | sizes[i], i, destMaxs[i]); | 1612 | sizes[i], i, destMaxs[i]); |
| 1612 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 1613 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 1613 | std::vector<const char *>({"func", "value", "param", "reason"}), | 1614 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 1614 | - std::vector<const char *>({__func__, destMaxsVal.c_str(), "destMaxs", | 1615 | + std::vector<const char *>({funcDesc, destMaxsVal.c_str(), "destMaxs", |
| 1615 | errMsg.c_str()})); | 1616 | errMsg.c_str()})); |
| 1616 | return ACL_ERROR_INVALID_PARAM; | 1617 | return ACL_ERROR_INVALID_PARAM; |
| 1617 | } | 1618 | } |
| @@ -1625,7 +1626,7 @@ static aclError ValidateMemcpyBatchParams(void **dsts, size_t *destMaxs, void ** | |||
| 1625 | const std::string rsvVal = std::to_string(attrs[idx].rsv[i]); | 1626 | const std::string rsvVal = std::to_string(attrs[idx].rsv[i]); |
| 1626 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 1627 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 1627 | std::vector<const char *>({"func", "value", "param", "expect"}), | 1628 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 1628 | - std::vector<const char *>({__func__, rsvVal.c_str(), "attrs.rsv", "0"})); | 1629 | + std::vector<const char *>({funcDesc, rsvVal.c_str(), "attrs.rsv", "0"})); |
| 1629 | return ACL_ERROR_INVALID_PARAM; | 1630 | return ACL_ERROR_INVALID_PARAM; |
| 1630 | } | 1631 | } |
| 1631 | } | 1632 | } |
| @@ -1639,8 +1640,8 @@ static aclError MemcpyBatchImpl(void **dsts, size_t *destMaxs, void **srcs, size | |||
| 1639 | aclrtStream stream, bool async, const char *apiName) | 1640 | aclrtStream stream, bool async, const char *apiName) |
| 1640 | { | 1641 | { |
| 1641 | // 判断 sizes == nullptr, count == 0 报参数异常 | 1642 | // 判断 sizes == nullptr, count == 0 报参数异常 |
| 1642 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(sizes); | 1643 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(sizes, "Batch memory copy"); |
| 1643 | - ACL_REQUIRES_POSITIVE_REPORT(numBatches); | 1644 | + ACL_REQUIRES_POSITIVE_REPORT_WITH_FUNC_DESC(numBatches, "Batch memory copy"); |
| 1644 | // 如果所有批次的 size 都为 0,则不执行 memcpy,直接返回成功,不需要校验其他参数 | 1645 | // 如果所有批次的 size 都为 0,则不执行 memcpy,直接返回成功,不需要校验其他参数 |
| 1645 | if (IsAllZeroSizeBatch(sizes, numBatches)) { | 1646 | if (IsAllZeroSizeBatch(sizes, numBatches)) { |
| 1646 | if (failIndex != nullptr) { | 1647 | if (failIndex != nullptr) { |
| @@ -2160,8 +2161,8 @@ static aclError GetSymbolInfo(const void *symbol, size_t count, size_t offset, | |||
| 2160 | static aclError CheckMemcpyFromSymbol(void *dst, const void *symbol, size_t count, size_t dstMax, | 2161 | static aclError CheckMemcpyFromSymbol(void *dst, const void *symbol, size_t count, size_t dstMax, |
| 2161 | aclrtMemcpyKind kind) | 2162 | aclrtMemcpyKind kind) |
| 2162 | { | 2163 | { |
| 2163 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(symbol); | 2164 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(symbol, "Checking the synchronous memory copy parameter"); |
| 2164 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(dst); | 2165 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(dst, "Checking the synchronous memory copy parameter"); |
| 2165 | 2166 | ||
| 2166 | if (count > dstMax) { | 2167 | if (count > dstMax) { |
| 2167 | ACL_LOG_ERROR("[Check][Count]count[%zu] must not be greater than dstMax[%zu].", count, dstMax); | 2168 | ACL_LOG_ERROR("[Check][Count]count[%zu] must not be greater than dstMax[%zu].", count, dstMax); |
| @@ -2176,7 +2177,7 @@ static aclError CheckMemcpyFromSymbol(void *dst, const void *symbol, size_t coun | |||
| 2176 | acl::GetMemcpyKindDesc(kind)); | 2177 | acl::GetMemcpyKindDesc(kind)); |
| 2177 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 2178 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 2178 | std::vector<const char *>({"func", "value", "param", "expect"}), | 2179 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 2179 | - std::vector<const char *>({__func__, acl::GetMemcpyKindDesc(kind), "kind", | 2180 | + std::vector<const char *>({"Checking the synchronous memory copy parameter", acl::GetMemcpyKindDesc(kind), "kind", |
| 2180 | "ACL_MEMCPY_DEVICE_TO_HOST or ACL_MEMCPY_DEFAULT"})); | 2181 | "ACL_MEMCPY_DEVICE_TO_HOST or ACL_MEMCPY_DEFAULT"})); |
| 2181 | return ACL_ERROR_INVALID_PARAM; | 2182 | return ACL_ERROR_INVALID_PARAM; |
| 2182 | } | 2183 | } |
| @@ -2241,15 +2242,15 @@ aclError aclrtMemcpyFromSymbolAsyncImpl(void *dst, size_t dstMax, const void *sy | |||
| 2241 | static aclError CheckMemcpyToSymbol(const void *symbol, const void *src, | 2242 | static aclError CheckMemcpyToSymbol(const void *symbol, const void *src, |
| 2242 | aclrtMemcpyKind kind) | 2243 | aclrtMemcpyKind kind) |
| 2243 | { | 2244 | { |
| 2244 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(symbol); | 2245 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(symbol, "Checking the synchronous memory copy parameter"); |
| 2245 | - ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT(src); | 2246 | + ACL_REQUIRES_NOT_NULL_WITH_INPUT_REPORT_AND_FUNC_DESC(src, "Checking the synchronous memory copy parameter"); |
| 2246 | 2247 | ||
| 2247 | if ((kind != ACL_MEMCPY_HOST_TO_DEVICE) && (kind != ACL_MEMCPY_DEFAULT)) { | 2248 | if ((kind != ACL_MEMCPY_HOST_TO_DEVICE) && (kind != ACL_MEMCPY_DEFAULT)) { |
| 2248 | ACL_LOG_ERROR("[Check][Kind]kind[%s] only support ACL_MEMCPY_HOST_TO_DEVICE or ACL_MEMCPY_DEFAULT", | 2249 | ACL_LOG_ERROR("[Check][Kind]kind[%s] only support ACL_MEMCPY_HOST_TO_DEVICE or ACL_MEMCPY_DEFAULT", |
| 2249 | acl::GetMemcpyKindDesc(kind)); | 2250 | acl::GetMemcpyKindDesc(kind)); |
| 2250 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, | 2251 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_VALUE_MSG, |
| 2251 | std::vector<const char *>({"func", "value", "param", "expect"}), | 2252 | std::vector<const char *>({"func", "value", "param", "expect"}), |
| 2252 | - std::vector<const char *>({__func__, acl::GetMemcpyKindDesc(kind), "kind", | 2253 | + std::vector<const char *>({"Checking the synchronous memory copy parameter", acl::GetMemcpyKindDesc(kind), "kind", |
| 2253 | "ACL_MEMCPY_HOST_TO_DEVICE or ACL_MEMCPY_DEFAULT"})); | 2254 | "ACL_MEMCPY_HOST_TO_DEVICE or ACL_MEMCPY_DEFAULT"})); |
| 2254 | return ACL_ERROR_INVALID_PARAM; | 2255 | return ACL_ERROR_INVALID_PARAM; |
| 2255 | } | 2256 | } |
| @@ -321,7 +321,7 @@ namespace acl { | |||
| 321 | if (!std::regex_match(defaultDeviceIdStr, reg)) { | 321 | if (!std::regex_match(defaultDeviceIdStr, reg)) { |
| 322 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, | 322 | acl::AclErrorLogManager::ReportInputError(acl::INVALID_PARAM_REASON_MSG, |
| 323 | std::vector<const char *>({"func", "value", "param", "reason"}), | 323 | std::vector<const char *>({"func", "value", "param", "reason"}), |
| 324 | - std::vector<const char *>({__func__, defaultDeviceIdStr.c_str(), "default_device", | 324 | + std::vector<const char *>({"Parsing the default device ID from the configuration file", defaultDeviceIdStr.c_str(), "default_device", |
| 325 | "value must be zero or a positive integer"})); | 325 | "value must be zero or a positive integer"})); |
| 326 | ACL_LOG_ERROR("default_device %s in acl.json is neither zero nor positive integer.", | 326 | ACL_LOG_ERROR("default_device %s in acl.json is neither zero nor positive integer.", |
| 327 | defaultDeviceIdStr.c_str()); | 327 | defaultDeviceIdStr.c_str()); |
| @@ -342,6 +342,18 @@ public: | |||
| 342 | } \ | 342 | } \ |
| 343 | } while (false) | 343 | } while (false) |
| 344 | 344 | ||
| 345 | + | ||
| 346 | + do { \ | ||
| 347 | + if (condition) { \ | ||
| 348 | + const std::string paramVal = std::to_string(param); \ | ||
| 349 | + ACL_LOG_ERROR("[Check][PARAM]%s is invalid, %s. value=%s", | ||
| 350 | + acl::AclErrorLogManager::ReportInputError( \ | ||
| 351 | + acl::INVALID_PARAM_REASON_MSG, std::vector<const char*>({"func", "value", "param", "reason"}), \ | ||
| 352 | + std::vector<const char*>({(funcDesc), paramVal.c_str(), | ||
| 353 | + return ACL_ERROR_INVALID_PARAM; \ | ||
| 354 | + } \ | ||
| 355 | + } while (false) | ||
| 356 | + | ||
| 345 | 357 | ||
| 346 | do { \ | 358 | do { \ |
| 347 | if (condition) { \ | 359 | if (condition) { \ |
| @@ -356,6 +368,18 @@ public: | |||
| 356 | } \ | 368 | } \ |
| 357 | } while (false) | 369 | } while (false) |
| 358 | 370 | ||
| 371 | + | ||
| 372 | + do { \ | ||
| 373 | + if (condition) { \ | ||
| 374 | + const std::string paramVal = std::to_string(param); \ | ||
| 375 | + ACL_LOG_ERROR("[Check][PARAM]%s is invalid, %s. value=%s", | ||
| 376 | + acl::AclErrorLogManager::ReportInputError( \ | ||
| 377 | + acl::INVALID_PARAM_REASON_MSG, std::vector<const char*>({"func", "value", "param", "reason"}), \ | ||
| 378 | + std::vector<const char*>({(funcDesc), paramVal.c_str(), | ||
| 379 | + return (ret); \ | ||
| 380 | + } \ | ||
| 381 | + } while (false) | ||
| 382 | + | ||
| 359 | 383 | ||
| 360 | do { \ | 384 | do { \ |
| 361 | if (condition) { \ | 385 | if (condition) { \ |
| @@ -410,6 +434,17 @@ public: | |||
| 410 | } \ | 434 | } \ |
| 411 | } while (false) | 435 | } while (false) |
| 412 | 436 | ||
| 437 | + | ||
| 438 | + do { \ | ||
| 439 | + if (!(condition)) { \ | ||
| 440 | + ACL_LOG_ERROR("[Check][PARAM]%s is invalid, must be %s. value=%s", (paramName), (expect), (paramVal)); \ | ||
| 441 | + acl::AclErrorLogManager::ReportInputError( \ | ||
| 442 | + acl::INVALID_VALUE_MSG, std::vector<const char*>({"func", "value", "param", "expect"}), \ | ||
| 443 | + std::vector<const char*>({(funcDesc), (paramVal), (paramName), (expect)})); \ | ||
| 444 | + return (ret); \ | ||
| 445 | + } \ | ||
| 446 | + } while (false) | ||
| 447 | + | ||
| 413 | 448 | ||
| 414 | do { \ | 449 | do { \ |
| 415 | if ((param) != (expect)) { \ | 450 | if ((param) != (expect)) { \ |
| @@ -448,6 +483,29 @@ public: | |||
| 448 | while (false) | 483 | while (false) |
| 449 | 484 | ||
| 450 | 485 | ||
| 486 | + | ||
| 487 | + | ||
| 488 | + do { \ | ||
| 489 | + if (UNLIKELY((val) == nullptr)) { \ | ||
| 490 | + ACL_LOG_ERROR("[Check][%s]param must not be null.", | ||
| 491 | + acl::AclErrorLogManager::ReportInputError( \ | ||
| 492 | + acl::NULL_POINTER_FUNC_MSG, {"func", "param"}, {(funcDesc), | ||
| 493 | + return ACL_ERROR_INVALID_PARAM; \ | ||
| 494 | + } \ | ||
| 495 | + } while (false) | ||
| 496 | + | ||
| 497 | + | ||
| 498 | + do { \ | ||
| 499 | + if (UNLIKELY((val) == nullptr)) { \ | ||
| 500 | + ACL_LOG_ERROR("[Check][%s]param must not be null.", | ||
| 501 | + const char_t* argList[] = {"func", "param"}; \ | ||
| 502 | + const char_t* argVal[] = {(funcDesc), | ||
| 503 | + acl::AclErrorLogManager::ReportInputErrorWithChar(acl::NULL_POINTER_FUNC_MSG, argList, argVal, 2U); \ | ||
| 504 | + return ACL_ERROR_INVALID_PARAM; \ | ||
| 505 | + } \ | ||
| 506 | + } while (false) | ||
| 507 | + | ||
| 508 | + | ||
| 451 | 509 | ||
| 452 | do { \ | 510 | do { \ |
| 453 | if (UNLIKELY((val) == nullptr)) { \ | 511 | if (UNLIKELY((val) == nullptr)) { \ |
| @@ -524,6 +582,16 @@ do { \ | |||
| 524 | } \ | 582 | } \ |
| 525 | while (false) | 583 | while (false) |
| 526 | 584 | ||
| 585 | + | ||
| 586 | + do { \ | ||
| 587 | + if (UNLIKELY((val) == nullptr)) { \ | ||
| 588 | + ACL_LOG_ERROR("[Check][%s]param must not be null.", | ||
| 589 | + acl::AclErrorLogManager::ReportInputError( \ | ||
| 590 | + acl::NULL_POINTER_FUNC_MSG, {"func", "param"}, {(funcDesc), | ||
| 591 | + return (ret); \ | ||
| 592 | + } \ | ||
| 593 | + } while (false) | ||
| 594 | + | ||
| 527 | 595 | ||
| 528 | do { \ | 596 | do { \ |
| 529 | if ((val) == nullptr) { \ | 597 | if ((val) == nullptr) { \ |
| @@ -600,6 +668,18 @@ do { \ | |||
| 600 | } \ | 668 | } \ |
| 601 | while (false) | 669 | while (false) |
| 602 | 670 | ||
| 671 | + | ||
| 672 | + do { \ | ||
| 673 | + if ((val) <= 0) { \ | ||
| 674 | + ACL_LOG_ERROR("[Check][%s]param must be positive.", | ||
| 675 | + const std::string valStr = std::to_string(val); \ | ||
| 676 | + acl::AclErrorLogManager::ReportInputError( \ | ||
| 677 | + acl::INVALID_VALUE_MSG, std::vector<const char*>({"func", "value", "param", "expect"}), \ | ||
| 678 | + std::vector<const char*>({(funcDesc), valStr.c_str(), | ||
| 679 | + return ACL_ERROR_INVALID_PARAM; \ | ||
| 680 | + } \ | ||
| 681 | + } while (false) | ||
| 682 | + | ||
| 603 | 683 | ||
| 604 | do { \ | 684 | do { \ |
| 605 | if ((val) <= 0) { \ | 685 | if ((val) <= 0) { \ |
| @@ -5207,9 +5207,9 @@ rtError_t ApiErrorDecorator::CtxSetSysParamOpt(const rtSysParamOpt configOpt, co | |||
| 5207 | 5207 | ||
| 5208 | rtError_t ApiErrorDecorator::CtxGetSysParamOpt(const rtSysParamOpt configOpt, int64_t * const configVal) | 5208 | rtError_t ApiErrorDecorator::CtxGetSysParamOpt(const rtSysParamOpt configOpt, int64_t * const configVal) |
| 5209 | { | 5209 | { |
| 5210 | - COND_RETURN_AND_MSG_OUTER_WITH_PARAM_DESC((configOpt >= SYS_OPT_RESERVED) || (configOpt < 0), RT_ERROR_INVALID_VALUE, "Obtaining the default stream of the current context", | 5210 | + COND_RETURN_AND_MSG_OUTER_WITH_PARAM_DESC((configOpt >= SYS_OPT_RESERVED) || (configOpt < 0), RT_ERROR_INVALID_VALUE, "Obtaining the system parameter value in the current context", |
| 5211 | configOpt, "[0, " + std::to_string(SYS_OPT_RESERVED) + ")"); | 5211 | configOpt, "[0, " + std::to_string(SYS_OPT_RESERVED) + ")"); |
| 5212 | - NULL_PTR_RETURN_MSG_OUTER_WITH_FUNC_DESC(configVal, RT_ERROR_INVALID_VALUE, "Obtaining the default stream of the current context"); | 5212 | + NULL_PTR_RETURN_MSG_OUTER_WITH_FUNC_DESC(configVal, RT_ERROR_INVALID_VALUE, "Obtaining the system parameter value in the current context"); |
| 5213 | return impl_->CtxGetSysParamOpt(configOpt, configVal); | 5213 | return impl_->CtxGetSysParamOpt(configOpt, configVal); |
| 5214 | } | 5214 | } |
| 5215 | 5215 | ||
| @@ -1409,7 +1409,7 @@ rtError_t ApiImpl::SetupArgument(const void * const setupArg, const uint32_t siz | |||
| 1409 | std::stringstream ss; | 1409 | std::stringstream ss; |
| 1410 | ss << std::hex << "dest=0x" << RtPtrToValue(launchArgs + offset) << ", setupArg=0x" << RtPtrToValue(setupArg) | 1410 | ss << std::hex << "dest=0x" << RtPtrToValue(launchArgs + offset) << ", setupArg=0x" << RtPtrToValue(setupArg) |
| 1411 | << std::dec << ", destMax=" << sizeof(launchArg.args) - offset << ", size=" << size << "."; | 1411 | << std::dec << ", destMax=" << sizeof(launchArg.args) - offset << ", size=" << size << "."; |
| 1412 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, __func__, | 1412 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, "Setting kernel launch parameters", |
| 1413 | "memcpy_s", std::to_string(ret).c_str(), strerror(ret), ss.str().c_str()); | 1413 | "memcpy_s", std::to_string(ret).c_str(), strerror(ret), ss.str().c_str()); |
| 1414 | return RT_ERROR_SEC_HANDLE; | 1414 | return RT_ERROR_SEC_HANDLE; |
| 1415 | } | 1415 | } |
| @@ -5215,7 +5215,7 @@ rtError_t ApiImpl::LabelListCpy(Label ** const lbl, const uint32_t labelNumber, | |||
| 5215 | if (lbl[lbIdx]->Context_() != curCtx) { | 5215 | if (lbl[lbIdx]->Context_() != curCtx) { |
| 5216 | std::string extendInfo = RtFmtMsg("label_id=%u, label_ctx=%p, cur_ctx=%p.", | 5216 | std::string extendInfo = RtFmtMsg("label_id=%u, label_ctx=%p, cur_ctx=%p.", |
| 5217 | lbl[lbIdx]->Id_(), lbl[lbIdx]->Context_(), curCtx); | 5217 | lbl[lbIdx]->Id_(), lbl[lbIdx]->Context_(), curCtx); |
| 5218 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1010, __func__, "label[" + std::to_string(lbIdx) + "]", extendInfo); | 5218 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1010, "Label list copy", "label[" + std::to_string(lbIdx) + "]", extendInfo); |
| 5219 | return RT_ERROR_LABEL_CONTEXT; | 5219 | return RT_ERROR_LABEL_CONTEXT; |
| 5220 | } | 5220 | } |
| 5221 | COND_RETURN_AND_MSG_OUTER(lbl[lbIdx]->Stream_() == nullptr, RT_ERROR_LABEL_STREAM, ErrorCode::EE1018, "Label list copy", | 5221 | COND_RETURN_AND_MSG_OUTER(lbl[lbIdx]->Stream_() == nullptr, RT_ERROR_LABEL_STREAM, ErrorCode::EE1018, "Label list copy", |
| @@ -7548,7 +7548,7 @@ rtError_t ApiImpl::SetDeviceResLimit(const uint32_t devId, const rtDevResLimitTy | |||
| 7548 | COND_PROC_RETURN_AND_MSG_OUTER(value > initValue, RT_ERROR_INVALID_VALUE, ErrorCode::EE1003, | 7548 | COND_PROC_RETURN_AND_MSG_OUTER(value > initValue, RT_ERROR_INVALID_VALUE, ErrorCode::EE1003, |
| 7549 | RT_LOG(RT_LOG_ERROR, "The value exceeds the total number of cores." | 7549 | RT_LOG(RT_LOG_ERROR, "The value exceeds the total number of cores." |
| 7550 | " drv devId=%u, type=%d, value=%u, total number of cores=%u.", devId, type, value, initValue), | 7550 | " drv devId=%u, type=%d, value=%u, total number of cores=%u.", devId, type, value, initValue), |
| 7551 | - __func__, value, "value", RtFmtMsg("must be less than or equal to %u", initValue)); | 7551 | + "Setting the device resource limit", value, "value", RtFmtMsg("must be less than or equal to %u", initValue)); |
| 7552 | 7552 | ||
| 7553 | const auto error = SetDeviceResLimitByFe(devId, type, value); | 7553 | const auto error = SetDeviceResLimitByFe(devId, type, value); |
| 7554 | COND_RETURN_WITH_NOLOG((error != RT_ERROR_NONE), error); | 7554 | COND_RETURN_WITH_NOLOG((error != RT_ERROR_NONE), error); |
| @@ -8332,7 +8332,7 @@ rtError_t ApiImpl::KernelArgsAppend(RtArgsHandle *argsHandle, void *para, size_t | |||
| 8332 | std::stringstream ss; | 8332 | std::stringstream ss; |
| 8333 | ss << std::hex << "dest=0x" << offset << ", para=0x" << RtPtrToValue(para) | 8333 | ss << std::hex << "dest=0x" << offset << ", para=0x" << RtPtrToValue(para) |
| 8334 | << std::dec << ", destMax=" << paraSize << ", paraSize=" << paraSize << "."; | 8334 | << std::dec << ", destMax=" << paraSize << ", paraSize=" << paraSize << "."; |
| 8335 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, __func__, | 8335 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, "Adding placeholder parameters to the kernel parameter handle", |
| 8336 | "memcpy_s", std::to_string(ret).c_str(), strerror(ret), ss.str().c_str()); | 8336 | "memcpy_s", std::to_string(ret).c_str(), strerror(ret), ss.str().c_str()); |
| 8337 | return RT_ERROR_INVALID_VALUE; | 8337 | return RT_ERROR_INVALID_VALUE; |
| 8338 | } | 8338 | } |
| @@ -8364,7 +8364,7 @@ rtError_t ApiImpl::MemcpyBatch(void **dsts, void **srcs, size_t *sizes, size_t c | |||
| 8364 | ERROR_PROC_RETURN_MSG_INNER(error, SetFailIndex(failIdx, i), | 8364 | ERROR_PROC_RETURN_MSG_INNER(error, SetFailIndex(failIdx, i), |
| 8365 | "Failed to verify %zuth memory pair attributes. retCode=%#x.", i, static_cast<uint32_t>(error)); | 8365 | "Failed to verify %zuth memory pair attributes. retCode=%#x.", i, static_cast<uint32_t>(error)); |
| 8366 | COND_PROC_RETURN_AND_MSG_OUTER((realDstLoc == realSrcLoc), RT_ERROR_INVALID_VALUE, ErrorCode::EE1016, SetFailIndex(failIdx, i), | 8366 | COND_PROC_RETURN_AND_MSG_OUTER((realDstLoc == realSrcLoc), RT_ERROR_INVALID_VALUE, ErrorCode::EE1016, SetFailIndex(failIdx, i), |
| 8367 | - __func__, RtFmtMsg("Only H2D and D2H copy directions are supported. The destination location type is %s(%d)," | 8367 | + "Batch synchronous memory copy", RtFmtMsg("Only H2D and D2H copy directions are supported. The destination location type is %s(%d)," |
| 8368 | " and the source location type is %s(%d)", MemLocationTypeToStr(realDstLoc), realDstLoc, | 8368 | " and the source location type is %s(%d)", MemLocationTypeToStr(realDstLoc), realDstLoc, |
| 8369 | MemLocationTypeToStr(realSrcLoc), realSrcLoc)); | 8369 | MemLocationTypeToStr(realSrcLoc), realSrcLoc)); |
| 8370 | } | 8370 | } |
| @@ -8582,7 +8582,7 @@ rtError_t ApiImpl::FuncGetName(const Kernel * const kernel, const uint32_t maxLe | |||
| 8582 | std::stringstream ss; | 8582 | std::stringstream ss; |
| 8583 | ss << std::hex << "name=0x" << RtPtrToValue(name) << ", kernelName=0x" << RtPtrToValue(kernel->Name_().c_str()) | 8583 | ss << std::hex << "name=0x" << RtPtrToValue(name) << ", kernelName=0x" << RtPtrToValue(kernel->Name_().c_str()) |
| 8584 | << std::dec << ", maxLen=" << maxLen << ", actualLen=" << kernel->Name_().length() + 1U << "."; | 8584 | << std::dec << ", maxLen=" << maxLen << ", actualLen=" << kernel->Name_().length() + 1U << "."; |
| 8585 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, __func__, | 8585 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, "Obtaining the kernel function name", |
| 8586 | "memcpy_s", std::to_string(error).c_str(), strerror(error), ss.str().c_str()); | 8586 | "memcpy_s", std::to_string(error).c_str(), strerror(error), ss.str().c_str()); |
| 8587 | return RT_ERROR_SEC_HANDLE; | 8587 | return RT_ERROR_SEC_HANDLE; |
| 8588 | } | 8588 | } |
| @@ -8959,7 +8959,7 @@ rtError_t ApiImpl::TaskGetParams(rtTask_t task, rtTaskParams* const params) | |||
| 8959 | COND_RETURN_WITH_NOLOG((error != RT_ERROR_NONE), error); | 8959 | COND_RETURN_WITH_NOLOG((error != RT_ERROR_NONE), error); |
| 8960 | 8960 | ||
| 8961 | if (taskInfo->taskOwner == static_cast<uint8_t>(TaskOwner::RT_TASK_INNER)) { | 8961 | if (taskInfo->taskOwner == static_cast<uint8_t>(TaskOwner::RT_TASK_INNER)) { |
| 8962 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "task->type", | 8962 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Obtaining task parameter information", "task->type", |
| 8963 | "The current task type RT_TASK_DEFAULT does not support obtaining of parameters." | 8963 | "The current task type RT_TASK_DEFAULT does not support obtaining of parameters." |
| 8964 | " Only task types other than RT_TASK_DEFAULT supports obtaining of parameters"); | 8964 | " Only task types other than RT_TASK_DEFAULT supports obtaining of parameters"); |
| 8965 | RT_LOG(RT_LOG_ERROR, | 8965 | RT_LOG(RT_LOG_ERROR, |
| @@ -204,7 +204,7 @@ static rtError_t UpdateKernelTaskInfoWithArgsAndCfg( | |||
| 204 | rtError_t UpdateKernelParams(TaskInfo* const taskInfo, rtTaskParams* const params) | 204 | rtError_t UpdateKernelParams(TaskInfo* const taskInfo, rtTaskParams* const params) |
| 205 | { | 205 | { |
| 206 | if ((taskInfo->type != TS_TASK_TYPE_KERNEL_AICORE) && (taskInfo->type != TS_TASK_TYPE_KERNEL_AIVEC)) { | 206 | if ((taskInfo->type != TS_TASK_TYPE_KERNEL_AICORE) && (taskInfo->type != TS_TASK_TYPE_KERNEL_AIVEC)) { |
| 207 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "task", | 207 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Updating kernel parameters", "task", |
| 208 | "The input task must be a compute task on the Cube Core or Vector Core. Before calling aclmdlRITaskSetParams, " | 208 | "The input task must be a compute task on the Cube Core or Vector Core. Before calling aclmdlRITaskSetParams, " |
| 209 | "use aclmdlRITaskGetType to obtain the task type and check whether the task type is correct"); | 209 | "use aclmdlRITaskGetType to obtain the task type and check whether the task type is correct"); |
| 210 | RT_LOG(RT_LOG_ERROR, "Invalid taskInfo type(%d), expect 0(AI core) or 66(AI vector)", taskInfo->type); | 210 | RT_LOG(RT_LOG_ERROR, "Invalid taskInfo type(%d), expect 0(AI core) or 66(AI vector)", taskInfo->type); |
| @@ -287,7 +287,7 @@ rtError_t GetKernelAttribute(const TaskInfo* const taskInfo, rtLaunchKernelAttrI | |||
| 287 | rtLaunchKernelAttrVal_t *attrValue) | 287 | rtLaunchKernelAttrVal_t *attrValue) |
| 288 | { | 288 | { |
| 289 | if ((taskInfo->type != TS_TASK_TYPE_KERNEL_AICORE) && (taskInfo->type != TS_TASK_TYPE_KERNEL_AIVEC)) { | 289 | if ((taskInfo->type != TS_TASK_TYPE_KERNEL_AICORE) && (taskInfo->type != TS_TASK_TYPE_KERNEL_AIVEC)) { |
| 290 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "task", | 290 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Obtaining kernel function attributes", "task", |
| 291 | "The input task must be a compute task on the Cube Core or Vector Core. Before calling aclmdlRIKernelTaskGetAttribute, " | 291 | "The input task must be a compute task on the Cube Core or Vector Core. Before calling aclmdlRIKernelTaskGetAttribute, " |
| 292 | "use aclmdlRITaskGetType to obtain the task type and check whether the task type is correct"); | 292 | "use aclmdlRITaskGetType to obtain the task type and check whether the task type is correct"); |
| 293 | RT_LOG(RT_LOG_ERROR, "Invalid taskInfo type(%d), expect 0(AI core) or 66(AI vector)", taskInfo->type); | 293 | RT_LOG(RT_LOG_ERROR, "Invalid taskInfo type(%d), expect 0(AI core) or 66(AI vector)", taskInfo->type); |
| @@ -58,7 +58,7 @@ rtError_t SymbolTable::Lookup(const void *hostVar, SymbolEntry &entry) | |||
| 58 | auto it = symbolMap_.find(hostVar); | 58 | auto it = symbolMap_.find(hostVar); |
| 59 | if (it == symbolMap_.end()) { | 59 | if (it == symbolMap_.end()) { |
| 60 | symbolMapLock_.Unlock(); | 60 | symbolMapLock_.Unlock(); |
| 61 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "symbol", | 61 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Looking up symbol table", "symbol", |
| 62 | "The corresponding device variable cannot be found through the symbol"); | 62 | "The corresponding device variable cannot be found through the symbol"); |
| 63 | return RT_ERROR_INVALID_SYMBOL; | 63 | return RT_ERROR_INVALID_SYMBOL; |
| 64 | } | 64 | } |
| @@ -37,7 +37,7 @@ rtError_t CmoTaskInit(TaskInfo *taskInfo, const rtCmoTaskInfo_t *const cmoTaskIn | |||
| 37 | std::stringstream ss; | 37 | std::stringstream ss; |
| 38 | ss << std::hex << "dest=0x" << RtPtrToValue(&cmoTsk->cmoSqeInfo) << ", src=0x" << RtPtrToValue(cmoTaskInfo) | 38 | ss << std::hex << "dest=0x" << RtPtrToValue(&cmoTsk->cmoSqeInfo) << ", src=0x" << RtPtrToValue(cmoTaskInfo) |
| 39 | << std::dec << ", destMax=" << sizeof(rtCmoTaskInfo_t) << ", count=" << sizeof(rtCmoTaskInfo_t) << "."; | 39 | << std::dec << ", destMax=" << sizeof(rtCmoTaskInfo_t) << ", count=" << sizeof(rtCmoTaskInfo_t) << "."; |
| 40 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, __func__, | 40 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, "Initializing CMO task", |
| 41 | "memcpy_s", std::to_string(error).c_str(), strerror(error), ss.str().c_str()); | 41 | "memcpy_s", std::to_string(error).c_str(), strerror(error), ss.str().c_str()); |
| 42 | return RT_ERROR_SEC_HANDLE; | 42 | return RT_ERROR_SEC_HANDLE; |
| 43 | } | 43 | } |
| @@ -104,7 +104,7 @@ rtError_t ConstructHostFuncParamSqe(const rtTaskInput_t* const taskInput, uint32 | |||
| 104 | ss << std::hex << "dest=0x" << RtPtrToValue(taskInput->dataBuffer) | 104 | ss << std::hex << "dest=0x" << RtPtrToValue(taskInput->dataBuffer) |
| 105 | << ", src=0x" << RtPtrToValue(paramBufDesc.bufInfo) | 105 | << ", src=0x" << RtPtrToValue(paramBufDesc.bufInfo) |
| 106 | << std::dec << ", destMax=" << bufferLen << ", count=" << paramBufDesc.bufSize << "."; | 106 | << std::dec << ", destMax=" << bufferLen << ", count=" << paramBufDesc.bufSize << "."; |
| 107 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, __func__, | 107 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1020, "Constructing host function parameter SQE", |
| 108 | "memcpy_s", std::to_string(ret).c_str(), strerror(ret), ss.str().c_str()); | 108 | "memcpy_s", std::to_string(ret).c_str(), strerror(ret), ss.str().c_str()); |
| 109 | return RT_ERROR_SEC_HANDLE; | 109 | return RT_ERROR_SEC_HANDLE; |
| 110 | } | 110 | } |
| @@ -270,12 +270,12 @@ rtError_t CaptureModel::ExecuteCommon(Stream * const stm, int32_t timeout, const | |||
| 270 | RT_LOG(RT_LOG_INFO, "capture model execute, model_id=%u!", Id_()); | 270 | RT_LOG(RT_LOG_INFO, "capture model execute, model_id=%u!", Id_()); |
| 271 | 271 | ||
| 272 | if (IsCapturing()) { | 272 | if (IsCapturing()) { |
| 273 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "modelRI", RtFmtMsg("ModelRI (model_id=%u) is in capturing state, status=CAPTURING", Id_())); | 273 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Checking whether the capture model is ready", "modelRI", RtFmtMsg("ModelRI (model_id=%u) is in capturing state, status=CAPTURING", Id_())); |
| 274 | return RT_ERROR_MODEL_CAPTURED; | 274 | return RT_ERROR_MODEL_CAPTURED; |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | if (captureModelStatus_ != RtCaptureModelStatus::READY) { | 277 | if (captureModelStatus_ != RtCaptureModelStatus::READY) { |
| 278 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "modelRI", | 278 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Checking whether the capture model is ready", "modelRI", |
| 279 | RtFmtMsg("ModelRI (model_id=%u) is not ready, status=%s", Id_(), CaptureModelStatusToString(captureModelStatus_).c_str())); | 279 | RtFmtMsg("ModelRI (model_id=%u) is not ready, status=%s", Id_(), CaptureModelStatusToString(captureModelStatus_).c_str())); |
| 280 | return RT_ERROR_MODEL_EXE_FAILED; | 280 | return RT_ERROR_MODEL_EXE_FAILED; |
| 281 | } | 281 | } |
| @@ -208,7 +208,7 @@ rtError_t CheckCaptureModelForUpdate(const Stream* stm) { | |||
| 208 | RawDevice* const rawDev = dynamic_cast<RawDevice *>(dev); | 208 | RawDevice* const rawDev = dynamic_cast<RawDevice *>(dev); |
| 209 | rawDev->PollEndGraphNotifyInfoByModelId(mdl->Id_()); | 209 | rawDev->PollEndGraphNotifyInfoByModelId(mdl->Id_()); |
| 210 | if (!captureModel->CanUpdate()) { | 210 | if (!captureModel->CanUpdate()) { |
| 211 | - RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, __func__, "modelRI", | 211 | + RT_LOG_OUTER_MSG_IMPL(ErrorCode::EE1017, "Checking whether the capture model is updatable", "modelRI", |
| 212 | RtFmtMsg("ModelRI (model_id=%u) is in running or capture state, status=%s", | 212 | RtFmtMsg("ModelRI (model_id=%u) is in running or capture state, status=%s", |
| 213 | captureModel->Id_(), CaptureModelStatusToString(captureModel->GetCaptureModelStatus()).c_str())); | 213 | captureModel->Id_(), CaptureModelStatusToString(captureModel->GetCaptureModelStatus()).c_str())); |
| 214 | return RT_ERROR_MODEL_UPDATE_FAILED; | 214 | return RT_ERROR_MODEL_UPDATE_FAILED; |