已合并
【PR】: 拼写错误修复 #1846
YiyangChen创建于 4月27日
【PR】: 拼写错误修复 #1846
已合并
共 30 个文件变更+62-58
| @@ -4,6 +4,7 @@ | |||
| 4 | /build_out/ | 4 | /build_out/ |
| 5 | /output/ | 5 | /output/ |
| 6 | /cov/ | 6 | /cov/ |
| 7 | +*__pycache__/ | ||
| 7 | 8 | ||
| 8 | # pre-commit log | 9 | # pre-commit log |
| 9 | log/ | 10 | log/ |
| @@ -15,3 +16,6 @@ oat_reports/ | |||
| 15 | 16 | ||
| 16 | # opencode 配置文件 | 17 | # opencode 配置文件 |
| 17 | .opencode/opencode.json | 18 | .opencode/opencode.json |
| 19 | + | ||
| 20 | +# third_party | ||
| 21 | +third_party/ | ||
| @@ -330,7 +330,7 @@ namespace acl { | |||
| 330 | routeNum = rsp->retValue; | 330 | routeNum = rsp->retValue; |
| 331 | eventSum.msgLen = 0U; | 331 | eventSum.msgLen = 0U; |
| 332 | eventSum.msg = nullptr; | 332 | eventSum.msg = nullptr; |
| 333 | - ACL_LOG_INFO("sucessfully to get queue route num %zu.", routeNum); | 333 | + ACL_LOG_INFO("successfully to get queue route num %zu.", routeNum); |
| 334 | return ACL_SUCCESS; | 334 | return ACL_SUCCESS; |
| 335 | } | 335 | } |
| 336 | 336 | ||
| @@ -441,7 +441,7 @@ namespace AicpuSchedule { | |||
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | tensorDescMap_[cfg.runtimeModelId] = tensorInfo; | 443 | tensorDescMap_[cfg.runtimeModelId] = tensorInfo; |
| 444 | - aicpusd_info("tensorInfo size = %d, cfg.runtimeModelId = %d", tensorInfo.size(), cfg.runtimeModelId); | 444 | + aicpusd_info("tensorInfo size = %zu, cfg.runtimeModelId = %u", tensorInfo.size(), cfg.runtimeModelId); |
| 445 | return AICPU_SCHEDULE_OK; | 445 | return AICPU_SCHEDULE_OK; |
| 446 | } | 446 | } |
| 447 | 447 | ||
| @@ -435,7 +435,7 @@ int32_t CreateDatadumpThread(const struct TsdSubEventInfo * const msg) | |||
| 435 | char message[EVENT_MAX_MSG_LEN] = {}; | 435 | char message[EVENT_MAX_MSG_LEN] = {}; |
| 436 | auto ret = memcpy_s(message, EVENT_MAX_MSG_LEN, msg, sizeof(struct TsdSubEventInfo)); | 436 | auto ret = memcpy_s(message, EVENT_MAX_MSG_LEN, msg, sizeof(struct TsdSubEventInfo)); |
| 437 | if (ret != 0) { | 437 | if (ret != 0) { |
| 438 | - aicpusd_err("Memcpy failed. ret[%d], size[%u].", ret, sizeof(struct TsdSubEventInfo)); | 438 | + aicpusd_err("Memcpy failed. ret[%d], size[%zu].", ret, sizeof(struct TsdSubEventInfo)); |
| 439 | return AicpuSchedule::AICPU_SCHEDULE_ERROR_PARAMETER_NOT_VALID; | 439 | return AicpuSchedule::AICPU_SCHEDULE_ERROR_PARAMETER_NOT_VALID; |
| 440 | } | 440 | } |
| 441 | return AicpuSchedule::AicpuSdCustDumpProcess::GetInstance().CreateUdfDatadumpThread(message, | 441 | return AicpuSchedule::AicpuSdCustDumpProcess::GetInstance().CreateUdfDatadumpThread(message, |
| @@ -710,7 +710,7 @@ StatusCode OpDumpTask::ProcessngNoTiliInput() | |||
| 710 | inputTotalSize_ += size; | 710 | inputTotalSize_ += size; |
| 711 | inputsShape_.push_back(inputshape); | 711 | inputsShape_.push_back(inputshape); |
| 712 | inputsOriginShape_.push_back(inputOriginShape); | 712 | inputsOriginShape_.push_back(inputOriginShape); |
| 713 | - aicpusd_info("op name[%s], dump input size[%llu], type[%lld]", opName_.c_str(), size, tensorDesc->dtype); | 713 | + aicpusd_info("op name[%s], dump input size[%llu], type[%d]", opName_.c_str(), size, tensorDesc->dtype); |
| 714 | } | 714 | } |
| 715 | } | 715 | } |
| 716 | return AICPU_SCHEDULE_OK; | 716 | return AICPU_SCHEDULE_OK; |
| @@ -775,7 +775,7 @@ StatusCode OpDumpTask::ProcessngNoTiliOutput() | |||
| 775 | outputTotalSize_ += size; | 775 | outputTotalSize_ += size; |
| 776 | outputsShape_.push_back(outputShape); | 776 | outputsShape_.push_back(outputShape); |
| 777 | outputsOriginShape_.push_back(outputOriginShape); | 777 | outputsOriginShape_.push_back(outputOriginShape); |
| 778 | - aicpusd_info("op name[%s], dump output size[%llu], type[%lld]", opName_.c_str(), size, tensorDesc->dtype); | 778 | + aicpusd_info("op name[%s], dump output size[%llu], type[%d]", opName_.c_str(), size, tensorDesc->dtype); |
| 779 | } | 779 | } |
| 780 | } | 780 | } |
| 781 | return AICPU_SCHEDULE_OK; | 781 | return AICPU_SCHEDULE_OK; |
Msrc/aicpu_sched/aicpu_schedule/core/operator_kernel/communication/operator_kernel_remote_comm.cpp+2-2
| @@ -123,7 +123,7 @@ int32_t OperatorKernelRemoteComm::ModelHcomBroadCast(const HcomOpDesc *const hco | |||
| 123 | tensorDesc->subFormat = FORMAT_ND; | 123 | tensorDesc->subFormat = FORMAT_ND; |
| 124 | // record mbuf to psIdBuffAddr | 124 | // record mbuf to psIdBuffAddr |
| 125 | *(reinterpret_cast<Mbuf **>(psIdBuffAddr)) = psIdBuffPtr; | 125 | *(reinterpret_cast<Mbuf **>(psIdBuffAddr)) = psIdBuffPtr; |
| 126 | - aicpusd_info("Hcom broadcast process psid sucess, model[%u].", taskContext.modelId); | 126 | + aicpusd_info("Hcom broadcast process psid success, model[%u].", taskContext.modelId); |
| 127 | 127 | ||
| 128 | if (stepBuffAddr != 0) { | 128 | if (stepBuffAddr != 0) { |
| 129 | // clear stepBuffAddr | 129 | // clear stepBuffAddr |
| @@ -162,7 +162,7 @@ int32_t OperatorKernelRemoteComm::ModelHcomBroadCast(const HcomOpDesc *const hco | |||
| 162 | stepTensorDesc->subFormat = FORMAT_ND; | 162 | stepTensorDesc->subFormat = FORMAT_ND; |
| 163 | // record mbuf to stepBuffAddr | 163 | // record mbuf to stepBuffAddr |
| 164 | *(reinterpret_cast<Mbuf **>(stepBuffAddr)) = stepBuffPtr; | 164 | *(reinterpret_cast<Mbuf **>(stepBuffAddr)) = stepBuffPtr; |
| 165 | - aicpusd_info("Hcom broadcast process step sucess, model[%u].", taskContext.modelId); | 165 | + aicpusd_info("Hcom broadcast process step success, model[%u].", taskContext.modelId); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | return static_cast<int32_t>(AICPU_SCHEDULE_OK); | 168 | return static_cast<int32_t>(AICPU_SCHEDULE_OK); |
| @@ -291,8 +291,8 @@ drvError_t halSqMsgSend(uint32_t devId, struct halSqMsgInfo *info) | |||
| 291 | command = (drvCommand_t)&queue->taskCommand[(queue->tailIndex + DRV_QOS_QUEUE_SIZE - 1) % | 291 | command = (drvCommand_t)&queue->taskCommand[(queue->tailIndex + DRV_QOS_QUEUE_SIZE - 1) % |
| 292 | DRV_QOS_QUEUE_SIZE]; | 292 | DRV_QOS_QUEUE_SIZE]; |
| 293 | 293 | ||
| 294 | - ret = drvQosHanddleToId(deviceId, &qos, &qid, command); | 294 | + ret = drvQosHandleToId(deviceId, &qos, &qid, command); |
| 295 | - COND_RETURN_CMODEL(ret != DRV_ERROR_NONE, ret, "drvQosHanddleToId failed"); | 295 | + COND_RETURN_CMODEL(ret != DRV_ERROR_NONE, ret, "drvQosHandleToId failed"); |
| 296 | COND_RETURN_CMODEL(qid < 0, DRV_ERROR_INVALID_VALUE, "invalid qid %d", qid); | 296 | COND_RETURN_CMODEL(qid < 0, DRV_ERROR_INVALID_VALUE, "invalid qid %d", qid); |
| 297 | 297 | ||
| 298 | qMgmt = &(g_drvQosQueueMgmt[deviceId][qos]); | 298 | qMgmt = &(g_drvQosQueueMgmt[deviceId][qos]); |
| @@ -22,13 +22,13 @@ const uint32_t MAX_STREAM_NUM = 64; | |||
| 22 | 22 | ||
| 23 | /* | 23 | /* |
| 24 | * @ingroup driver-stub | 24 | * @ingroup driver-stub |
| 25 | - * @brief Pilling there are 1024 events served each device. | 25 | + * @brief Piling there are 1024 events served each device. |
| 26 | */ | 26 | */ |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | /* | 29 | /* |
| 30 | * @ingroup driver-stub | 30 | * @ingroup driver-stub |
| 31 | - * @brief Pilling there are 1024 streams served each device. | 31 | + * @brief Piling there are 1024 streams served each device. |
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | 34 | ||
| @@ -86,7 +86,7 @@ EXIT: | |||
| 86 | 86 | ||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | -drvError_t drvQosHanddleToId(int32_t deviceId, int8_t *qos, int32_t *qid, const drvCommand_t * const cmd) | 89 | +drvError_t drvQosHandleToId(int32_t deviceId, int8_t *qos, int32_t *qid, const drvCommand_t * const cmd) |
| 90 | { | 90 | { |
| 91 | int32_t i, j; | 91 | int32_t i, j; |
| 92 | int8_t qosLevel = -1; | 92 | int8_t qosLevel = -1; |
| @@ -210,7 +210,7 @@ drvError_t drvQueueInit(void) | |||
| 210 | return DRV_ERROR_NONE; | 210 | return DRV_ERROR_NONE; |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | -void drvReportIrqTriger(drvInterruptNum_t irq) | 213 | +void drvReportIrqTrigger(drvInterruptNum_t irq) |
| 214 | { | 214 | { |
| 215 | int32_t deviceId; | 215 | int32_t deviceId; |
| 216 | drvError_t ret; | 216 | drvError_t ret; |
| @@ -42,7 +42,7 @@ typedef struct tagDrvCommandStruct { | |||
| 42 | 42 | ||
| 43 | /* | 43 | /* |
| 44 | * @ingroup driver-stub | 44 | * @ingroup driver-stub |
| 45 | - * @brief each reprot is 4 byte but we don't care the details. | 45 | + * @brief each report is 4 byte but we don't care the details. |
| 46 | */ | 46 | */ |
| 47 | typedef struct tagDrvReportStruct { | 47 | typedef struct tagDrvReportStruct { |
| 48 | uint8_t dummy[DRV_REPORT_STRUCT_SIZE]; | 48 | uint8_t dummy[DRV_REPORT_STRUCT_SIZE]; |
| @@ -93,10 +93,10 @@ extern drvQosMgmt_t g_drvQosQueueMgmt[MAX_DEV_NUM][TS_TASK_CMD_QUEUE_PRIORITIES_ | |||
| 93 | extern drvReportQueue_t g_drvReportQueue[MAX_DEV_NUM]; | 93 | extern drvReportQueue_t g_drvReportQueue[MAX_DEV_NUM]; |
| 94 | extern drvSem_t g_drvSem[MAX_DEV_NUM]; | 94 | extern drvSem_t g_drvSem[MAX_DEV_NUM]; |
| 95 | 95 | ||
| 96 | -drvError_t drvQosHanddleToId(int32_t deviceId, int8_t *qos, int32_t *qid, const drvCommand_t * const cmd); | 96 | +drvError_t drvQosHandleToId(int32_t deviceId, int8_t *qos, int32_t *qid, const drvCommand_t * const cmd); |
| 97 | drvError_t drvSetTaskCommand(int32_t device, int8_t qos, drvQosQueue_t *queue, drvQosMgmt_t *qMgmt); | 97 | drvError_t drvSetTaskCommand(int32_t device, int8_t qos, drvQosQueue_t *queue, drvQosMgmt_t *qMgmt); |
| 98 | drvError_t drvQueueInit(void); | 98 | drvError_t drvQueueInit(void); |
| 99 | -void drvReportIrqTriger(drvInterruptNum_t irq); | 99 | +void drvReportIrqTrigger(drvInterruptNum_t irq); |
| 100 | void drvSemWait(drvSem_t *sem); | 100 | void drvSemWait(drvSem_t *sem); |
| 101 | 101 | ||
| 102 | 102 | ||
| @@ -67,7 +67,7 @@ int32_t HdcRead(HDC_SESSION session, IdeRecvBuffT recvBuf, IdeI32Pt recvLen); | |||
| 67 | int32_t HdcReadNb(HDC_SESSION session, IdeRecvBuffT recvBuf, IdeI32Pt recvLen); | 67 | int32_t HdcReadNb(HDC_SESSION session, IdeRecvBuffT recvBuf, IdeI32Pt recvLen); |
| 68 | 68 | ||
| 69 | /** | 69 | /** |
| 70 | - * @brief Receives data based on HDC sessions in timout mode. | 70 | + * @brief Receives data based on HDC sessions in timeout mode. |
| 71 | * @param [in] session : specifies session in used | 71 | * @param [in] session : specifies session in used |
| 72 | * @param [in] timeout : max wait time | 72 | * @param [in] timeout : max wait time |
| 73 | * @param [out] recvBuf : buffer for receiving data | 73 | * @param [out] recvBuf : buffer for receiving data |
| @@ -22,7 +22,7 @@ int32_t AdxDumpReceive::Init() | |||
| 22 | 22 | ||
| 23 | int32_t AdxDumpReceive::Process(const CommHandle &handle, const SharedPtr<MsgProto> &proto) | 23 | int32_t AdxDumpReceive::Process(const CommHandle &handle, const SharedPtr<MsgProto> &proto) |
| 24 | { | 24 | { |
| 25 | - // hand shake control(sended by IdeDumpStart) | 25 | + // hand shake control(sent by IdeDumpStart) |
| 26 | if (proto->msgType == MsgType::MSG_CTRL && proto->status == MsgStatus::MSG_STATUS_HAND_SHAKE) { | 26 | if (proto->msgType == MsgType::MSG_CTRL && proto->status == MsgStatus::MSG_STATUS_HAND_SHAKE) { |
| 27 | IdeErrorT err = AdxMsgProto::SendResponse(handle, | 27 | IdeErrorT err = AdxMsgProto::SendResponse(handle, |
| 28 | (CmdClassT)proto->reqType, proto->devId, MsgStatus::MSG_STATUS_NONE_ERROR); | 28 | (CmdClassT)proto->reqType, proto->devId, MsgStatus::MSG_STATUS_NONE_ERROR); |
| @@ -39,7 +39,7 @@ int32_t AdxDumpReceive::Process(const CommHandle &handle, const SharedPtr<MsgPro | |||
| 39 | // store client session(persistent session. must be closed before close server) | 39 | // store client session(persistent session. must be closed before close server) |
| 40 | AdxCommHandle adxHandle = const_cast<AdxCommHandle>(&handle); | 40 | AdxCommHandle adxHandle = const_cast<AdxCommHandle>(&handle); |
| 41 | StoreSession(proto->devId, adxHandle); | 41 | StoreSession(proto->devId, adxHandle); |
| 42 | - // read dump data(sended by IdeDumpData) and end dump control(sended by IdeDumpEnd) | 42 | + // read dump data(sent by IdeDumpData) and end dump control(sent by IdeDumpEnd) |
| 43 | int32_t ret = Receive(handle, proto); | 43 | int32_t ret = Receive(handle, proto); |
| 44 | ReleaseSession(proto->devId, adxHandle); | 44 | ReleaseSession(proto->devId, adxHandle); |
| 45 | return ret; | 45 | return ret; |
| @@ -67,7 +67,7 @@ int32_t AdxDumpReceive::Receive(const CommHandle &handle, const SharedPtr<MsgPro | |||
| 67 | msg = nullptr; | 67 | msg = nullptr; |
| 68 | if (msgPtr->msgType == MsgType::MSG_CTRL) { | 68 | if (msgPtr->msgType == MsgType::MSG_CTRL) { |
| 69 | if (msgPtr->status == MsgStatus::MSG_STATUS_DATA_END) { | 69 | if (msgPtr->status == MsgStatus::MSG_STATUS_DATA_END) { |
| 70 | - IDE_LOGI("received dump ctrl msg from deivce(id:%u,session:%zu), end transfer dump data", | 70 | + IDE_LOGI("received dump ctrl msg from device(id:%u,session:%zu), end transfer dump data", |
| 71 | proto->devId, handle.session); | 71 | proto->devId, handle.session); |
| 72 | return IDE_DAEMON_OK; | 72 | return IDE_DAEMON_OK; |
| 73 | } else { | 73 | } else { |
| @@ -89,7 +89,7 @@ STATIC IdeThreadArg IdeMonitorThread(IdeThreadArg args) | |||
| 89 | MSPROF_LOGE("app mon client init failed with %d", ret); | 89 | MSPROF_LOGE("app mon client init failed with %d", ret); |
| 90 | return nullptr; | 90 | return nullptr; |
| 91 | } | 91 | } |
| 92 | - MSPROF_LOGI("app mon client init sucess."); | 92 | + MSPROF_LOGI("app mon client init success."); |
| 93 | IdeMonitorSetStatus(IDE_MONITOR_RUNNING); | 93 | IdeMonitorSetStatus(IDE_MONITOR_RUNNING); |
| 94 | while (IdeMonitorIsRun() == true) { | 94 | while (IdeMonitorIsRun() == true) { |
| 95 | if (IdeMonitorIsHeartBeat() != true) { | 95 | if (IdeMonitorIsHeartBeat() != true) { |
| @@ -98,7 +98,7 @@ STATIC IdeThreadArg IdeMonitorThread(IdeThreadArg args) | |||
| 98 | (void)mmSleep(MONITOR_REGISTER_WAIT_TIME); | 98 | (void)mmSleep(MONITOR_REGISTER_WAIT_TIME); |
| 99 | continue; | 99 | continue; |
| 100 | } | 100 | } |
| 101 | - MSPROF_LOGI("app mon client register sucess."); | 101 | + MSPROF_LOGI("app mon client register success."); |
| 102 | IdeMonitorSetStatus(IDE_MONITOR_HEARTBEAT); | 102 | IdeMonitorSetStatus(IDE_MONITOR_HEARTBEAT); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| @@ -145,7 +145,7 @@ SHARED_PTR_ALIA<google::protobuf::Message> DecodeMessage(const std::string &buf) | |||
| 145 | 145 | ||
| 146 | // parse name len | 146 | // parse name len |
| 147 | if (bufLen < currLen + sizeof(uint32_t)) { | 147 | if (bufLen < currLen + sizeof(uint32_t)) { |
| 148 | - MSPROF_LOGE("bufLen less than name len, bufLen=%d, expected_len=%d", bufLen, sizeof(uint32_t)); | 148 | + MSPROF_LOGE("bufLen less than name len, bufLen=%zu, expected_len=%zu", bufLen, sizeof(uint32_t)); |
| 149 | return message; | 149 | return message; |
| 150 | } | 150 | } |
| 151 | uint32_t nameLen = ::ntohl(*(reinterpret_cast<const uint32_t *>(buf.c_str()))); | 151 | uint32_t nameLen = ::ntohl(*(reinterpret_cast<const uint32_t *>(buf.c_str()))); |
| @@ -157,8 +157,8 @@ SHARED_PTR_ALIA<google::protobuf::Message> DecodeMessage(const std::string &buf) | |||
| 157 | 157 | ||
| 158 | // parse name | 158 | // parse name |
| 159 | if (bufLen < (currLen + nameLen)) { | 159 | if (bufLen < (currLen + nameLen)) { |
| 160 | - MSPROF_LOGE("bufLen less than name, bufLen=%d, expected_len=%d", | 160 | + MSPROF_LOGE("bufLen less than name, bufLen=%zu, expected_len=%zu", |
| 161 | - bufLen, currLen + nameLen); | 161 | + bufLen, static_cast<size_t>(currLen + nameLen)); |
| 162 | return message; | 162 | return message; |
| 163 | } | 163 | } |
| 164 | std::string name(buf.begin() + currLen, buf.begin() + currLen + nameLen); | 164 | std::string name(buf.begin() + currLen, buf.begin() + currLen + nameLen); |
| @@ -77,7 +77,7 @@ int main(int argc, const char **argv, const char **envp) | |||
| 77 | SetEnvList(*envp, envpList); | 77 | SetEnvList(*envp, envpList); |
| 78 | EnvManager::instance()->SetGlobalEnv(envpList); | 78 | EnvManager::instance()->SetGlobalEnv(envpList); |
| 79 | if (Platform::instance()->PlatformInitByDriver() != PROFILING_SUCCESS) { | 79 | if (Platform::instance()->PlatformInitByDriver() != PROFILING_SUCCESS) { |
| 80 | - CmdLog::CmdErrorLog("Init platform by driver faild!"); | 80 | + CmdLog::CmdErrorLog("Init platform by driver failed!"); |
| 81 | return PROFILING_FAILED; | 81 | return PROFILING_FAILED; |
| 82 | } | 82 | } |
| 83 | if (Platform::instance()->Init() != PROFILING_SUCCESS) { | 83 | if (Platform::instance()->Init() != PROFILING_SUCCESS) { |
| @@ -795,12 +795,12 @@ bool SystemMode::DataWillBeCollected() const | |||
| 795 | if (params_ == nullptr || params_->usedParams.empty()) { | 795 | if (params_ == nullptr || params_->usedParams.empty()) { |
| 796 | return false; | 796 | return false; |
| 797 | } | 797 | } |
| 798 | - std::set<int32_t> unneccessaryParams; | 798 | + std::set<int32_t> unnecessaryParams; |
| 799 | set_difference(params_->usedParams.begin(), params_->usedParams.end(), neccessarySet_.begin(), neccessarySet_.end(), | 799 | set_difference(params_->usedParams.begin(), params_->usedParams.end(), neccessarySet_.begin(), neccessarySet_.end(), |
| 800 | - inserter(unneccessaryParams, unneccessaryParams.begin())); | 800 | + inserter(unnecessaryParams, unnecessaryParams.begin())); |
| 801 | - set_intersection(params_->usedParams.begin(), params_->usedParams.end(), unneccessaryParams.begin(), | 801 | + set_intersection(params_->usedParams.begin(), params_->usedParams.end(), unnecessaryParams.begin(), |
| 802 | - unneccessaryParams.end(), inserter(unneccessaryParams, unneccessaryParams.begin())); | 802 | + unnecessaryParams.end(), inserter(unnecessaryParams, unnecessaryParams.begin())); |
| 803 | - if (unneccessaryParams.size() == 1 && *(unneccessaryParams.begin()) == ARGS_SYS_DEVICES) { | 803 | + if (unnecessaryParams.size() == 1 && *(unnecessaryParams.begin()) == ARGS_SYS_DEVICES) { |
| 804 | CmdLog::CmdWarningLog("No collection data type is specified, profiling will not start"); | 804 | CmdLog::CmdWarningLog("No collection data type is specified, profiling will not start"); |
| 805 | return false; | 805 | return false; |
| 806 | } | 806 | } |
| @@ -501,8 +501,8 @@ bool ProfCannPlugin::ProfIfReportBufEmpty() | |||
| 501 | static uint32_t cnt = 0; | 501 | static uint32_t cnt = 0; |
| 502 | int printFreq = 10; | 502 | int printFreq = 10; |
| 503 | if ((cnt++) % printFreq == 0) { | 503 | if ((cnt++) % printFreq == 0) { |
| 504 | - MSPROF_LOGD("apiBuffer_:%d compactBuffer_:%d additionalBuffer_:%d batchAdditionalBuffer_:%d \ | 504 | + MSPROF_LOGD("apiBuffer_:%zu compactBuffer_:%zu additionalBuffer_:%zu batchAdditionalBuffer_:%zu \ |
| 505 | - variableAdditionalBuffer_:%d", apiBuffer_.GetUsedSize(), compactBuffer_.GetUsedSize(), | 505 | + variableAdditionalBuffer_:%zu", apiBuffer_.GetUsedSize(), compactBuffer_.GetUsedSize(), |
| 506 | additionalBuffer_.GetUsedSize(), batchAdditionalBuffer_.GetUsedSize(), | 506 | additionalBuffer_.GetUsedSize(), batchAdditionalBuffer_.GetUsedSize(), |
| 507 | variableAdditionalBuffer_.GetUsedSize()); | 507 | variableAdditionalBuffer_.GetUsedSize()); |
| 508 | } | 508 | } |
| @@ -278,7 +278,7 @@ int32_t Sender::SendData(CONST_CHAR_PTR buffer, int32_t size) | |||
| 278 | if (sentLen != size) { | 278 | if (sentLen != size) { |
| 279 | MSPROF_LOGE("Failed to SendData, data_len=%d, sent len=%d", size, sentLen); | 279 | MSPROF_LOGE("Failed to SendData, data_len=%d, sent len=%d", size, sentLen); |
| 280 | } else { | 280 | } else { |
| 281 | - MSPROF_LOGD("[%s]sended data %d", engineName_.c_str(), size); | 281 | + MSPROF_LOGD("[%s]sent data %d", engineName_.c_str(), size); |
| 282 | } | 282 | } |
| 283 | } | 283 | } |
| 284 | 284 | ||
| @@ -259,7 +259,7 @@ void HashData::SaveNewHashData(bool isLastChunk) | |||
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | /** | 261 | /** |
| 262 | - * @brief return hash data keys string seperated by HASH_DIC_DELIMITER | 262 | + * @brief return hash data keys string separated by HASH_DIC_DELIMITER |
| 263 | * @param [in] std:string: saveHashData | 263 | * @param [in] std:string: saveHashData |
| 264 | * @return 0:SUCCESS, !0:FAILED | 264 | * @return 0:SUCCESS, !0:FAILED |
| 265 | */ | 265 | */ |
| @@ -80,8 +80,8 @@ ChannelReader::~ChannelReader() {} | |||
| 80 | 80 | ||
| 81 | int32_t ChannelReader::Init() | 81 | int32_t ChannelReader::Init() |
| 82 | { | 82 | { |
| 83 | - /* different channel of same device should be seperated to different thread and | 83 | + /* different channel of same device should be separated to different thread and |
| 84 | - different device of same channel shoud be seperate to different thread */ | 84 | + different device of same channel should be separate to different thread */ |
| 85 | hashId_ = channelId_ + deviceId_; | 85 | hashId_ = channelId_ + deviceId_; |
| 86 | MSVP_MAKE_SHARED1(readSpeedPerfCount_, PerfCount, SPEED_PERFCOUNT_MODULE_NAME, return PROFILING_FAILED); | 86 | MSVP_MAKE_SHARED1(readSpeedPerfCount_, PerfCount, SPEED_PERFCOUNT_MODULE_NAME, return PROFILING_FAILED); |
| 87 | MSVP_MAKE_SHARED1(overallReadSpeedPerfCount_, PerfCount, SPEEDALL_PERFCOUNT_MODULE_NAME, return PROFILING_FAILED); | 87 | MSVP_MAKE_SHARED1(overallReadSpeedPerfCount_, PerfCount, SPEEDALL_PERFCOUNT_MODULE_NAME, return PROFILING_FAILED); |
| @@ -372,19 +372,19 @@ bool PlatFormInfos::LoadFromBuffer(const char *bufPtr, const size_t bufLen) { | |||
| 372 | PF_LOGE("Parse proto failed."); | 372 | PF_LOGE("Parse proto failed."); |
| 373 | return false; | 373 | return false; |
| 374 | } | 374 | } |
| 375 | - std::map<std::string, std::vector<std::string>> aiCoreInstrinsicDtypesMap; | 375 | + std::map<std::string, std::vector<std::string>> aiCoreIntrinsicDtypesMap; |
| 376 | - std::map<std::string, std::vector<std::string>> aiVectorInstrinsicDtypesMap; | 376 | + std::map<std::string, std::vector<std::string>> aiVectorIntrinsicDtypesMap; |
| 377 | std::map<std::string, std::map<std::string, std::string>> platformResMap; | 377 | std::map<std::string, std::map<std::string, std::string>> platformResMap; |
| 378 | std::map<std::string, std::vector<std::string>> fixPipeDtypeMap; | 378 | std::map<std::string, std::vector<std::string>> fixPipeDtypeMap; |
| 379 | 379 | ||
| 380 | - GetVecMapInfoFromProtoBuf(platformDefInfos.mutable_ai_core_intrinsic_dtype_map(), aiCoreInstrinsicDtypesMap); | 380 | + GetVecMapInfoFromProtoBuf(platformDefInfos.mutable_ai_core_intrinsic_dtype_map(), aiCoreIntrinsicDtypesMap); |
| 381 | - GetVecMapInfoFromProtoBuf(platformDefInfos.mutable_vector_core_intrinsic_dtype_map(), aiVectorInstrinsicDtypesMap); | 381 | + GetVecMapInfoFromProtoBuf(platformDefInfos.mutable_vector_core_intrinsic_dtype_map(), aiVectorIntrinsicDtypesMap); |
| 382 | GetMapMapInfoFromProtoBuf(platformDefInfos.mutable_platform_res_map(), platformResMap); | 382 | GetMapMapInfoFromProtoBuf(platformDefInfos.mutable_platform_res_map(), platformResMap); |
| 383 | GetVecMapInfoFromProtoBuf(platformDefInfos.mutable_fixpipe_dtype_map(), fixPipeDtypeMap); | 383 | GetVecMapInfoFromProtoBuf(platformDefInfos.mutable_fixpipe_dtype_map(), fixPipeDtypeMap); |
| 384 | 384 | ||
| 385 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 385 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 386 | - platform_infos_impl_->SetAICoreIntrinsicDtype(aiCoreInstrinsicDtypesMap); | 386 | + platform_infos_impl_->SetAICoreIntrinsicDtype(aiCoreIntrinsicDtypesMap); |
| 387 | - platform_infos_impl_->SetVectorCoreIntrinsicDtype(aiVectorInstrinsicDtypesMap); | 387 | + platform_infos_impl_->SetVectorCoreIntrinsicDtype(aiVectorIntrinsicDtypesMap); |
| 388 | for (auto iter = platformResMap.begin(); iter != platformResMap.end(); ++iter) { | 388 | for (auto iter = platformResMap.begin(); iter != platformResMap.end(); ++iter) { |
| 389 | platform_infos_impl_->SetPlatformRes(iter->first, iter->second); | 389 | platform_infos_impl_->SetPlatformRes(iter->first, iter->second); |
| 390 | } | 390 | } |
| @@ -78,11 +78,11 @@ std::string RealSoFilePath(const std::string &path) { | |||
| 78 | return ""; | 78 | return ""; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | - char resoved_path[PATH_MAX] = {0}; | 81 | + char resolved_path[PATH_MAX] = {0}; |
| 82 | std::string res = ""; | 82 | std::string res = ""; |
| 83 | 83 | ||
| 84 | - if (realpath(path.c_str(), resoved_path) != nullptr) { | 84 | + if (realpath(path.c_str(), resolved_path) != nullptr) { |
| 85 | - res = resoved_path; | 85 | + res = resolved_path; |
| 86 | } else { | 86 | } else { |
| 87 | PF_LOGE("Path '%s' does not exist.", path.c_str()); | 87 | PF_LOGE("Path '%s' does not exist.", path.c_str()); |
| 88 | } | 88 | } |
| @@ -20,7 +20,7 @@ extern "C" { | |||
| 20 | * @param [in] deviceId : The id of self cpu. | 20 | * @param [in] deviceId : The id of self cpu. |
| 21 | * @param [in] reschedInterval : reshedule time in ctrl cpu | 21 | * @param [in] reschedInterval : reshedule time in ctrl cpu |
| 22 | * @param [in] deployMode : 0 single process 1 muti process 2 muti thread. | 22 | * @param [in] deployMode : 0 single process 1 muti process 2 muti thread. |
| 23 | - * @return AICPU_SCHEDULE_SUCCESS: sucess other: error code in ErrorCode | 23 | + * @return AICPU_SCHEDULE_SUCCESS: success other: error code in ErrorCode |
| 24 | */ | 24 | */ |
| 25 | __attribute__((visibility("default"))) int32_t InitQueueScheduler(const uint32_t deviceId, | 25 | __attribute__((visibility("default"))) int32_t InitQueueScheduler(const uint32_t deviceId, |
| 26 | const uint32_t reschedInterval); | 26 | const uint32_t reschedInterval); |
| @@ -146,7 +146,7 @@ struct tagTsHostFuncSendMsg{ | |||
| 146 | 146 | ||
| 147 | /** | 147 | /** |
| 148 | * @ingroup engine | 148 | * @ingroup engine |
| 149 | - * @brief the type defination of logic cq (total 16 bytes). | 149 | + * @brief the type definition of logic cq (total 16 bytes). |
| 150 | */ | 150 | */ |
| 151 | typedef struct tagTsLogicCqReportMsg { | 151 | typedef struct tagTsLogicCqReportMsg { |
| 152 | volatile uint16_t phase : 1; | 152 | volatile uint16_t phase : 1; |
| @@ -178,7 +178,7 @@ typedef enum tagTsLogicCqType { | |||
| 178 | 178 | ||
| 179 | /** | 179 | /** |
| 180 | * @ingroup engine | 180 | * @ingroup engine |
| 181 | - * @brief the type defination of virtual sq shm (total 32 bytes). | 181 | + * @brief the type definition of virtual sq shm (total 32 bytes). |
| 182 | */ | 182 | */ |
| 183 | typedef struct tagTsShmTaskMsg { | 183 | typedef struct tagTsShmTaskMsg { |
| 184 | volatile uint32_t taskId; // execute position | 184 | volatile uint32_t taskId; // execute position |
| @@ -106,7 +106,7 @@ enum { | |||
| 106 | 106 | ||
| 107 | /** | 107 | /** |
| 108 | * @ingroup | 108 | * @ingroup |
| 109 | - * @brief the type defination of task | 109 | + * @brief the type definition of task |
| 110 | */ | 110 | */ |
| 111 | typedef enum tagTsTaskType { | 111 | typedef enum tagTsTaskType { |
| 112 | TS_TASK_TYPE_KERNEL_AICORE = 0, /* AI core task */ | 112 | TS_TASK_TYPE_KERNEL_AICORE = 0, /* AI core task */ |
| @@ -301,7 +301,7 @@ struct RtLogicCqReportMsg { | |||
| 301 | 301 | ||
| 302 | /** | 302 | /** |
| 303 | * @ingroup engine or starsEngine | 303 | * @ingroup engine or starsEngine |
| 304 | - * @brief the type defination of logic cq for all chipType(total 32 bytes). | 304 | + * @brief the type definition of logic cq for all chipType(total 32 bytes). |
| 305 | */ | 305 | */ |
| 306 | struct rtLogicCqReport_t { | 306 | struct rtLogicCqReport_t { |
| 307 | volatile uint16_t streamId; | 307 | volatile uint16_t streamId; |
| @@ -300,7 +300,7 @@ typedef enum tag_debug_exception { | |||
| 300 | } ts_dbg_except_t; | 300 | } ts_dbg_except_t; |
| 301 | /** | 301 | /** |
| 302 | * @ingroup tsch | 302 | * @ingroup tsch |
| 303 | - * @brief the bool value defination | 303 | + * @brief the bool value definition |
| 304 | */ | 304 | */ |
| 305 | 305 | ||
| 306 | 306 | ||
| @@ -58,7 +58,7 @@ rtError_t SetupContext(Context *context) | |||
| 58 | mmMutexUnLock(&g_ctxRecordMutex); | 58 | mmMutexUnLock(&g_ctxRecordMutex); |
| 59 | return ACL_ERROR_RT_INTERNAL_ERROR; | 59 | return ACL_ERROR_RT_INTERNAL_ERROR; |
| 60 | } | 60 | } |
| 61 | - RT_LOG_INFO("new g_contextRecord size: %d", SortVectorSize(&g_contextRecord)); | 61 | + RT_LOG_INFO("new g_contextRecord size: %zu", SortVectorSize(&g_contextRecord)); |
| 62 | mmMutexUnLock(&g_ctxRecordMutex); | 62 | mmMutexUnLock(&g_ctxRecordMutex); |
| 63 | 63 | ||
| 64 | return RT_ERROR_NONE; | 64 | return RT_ERROR_NONE; |
| @@ -76,7 +76,7 @@ rtError_t TearDownContext(Context *context) | |||
| 76 | RemoveSortVector(&g_contextRecord, index); | 76 | RemoveSortVector(&g_contextRecord, index); |
| 77 | } | 77 | } |
| 78 | } | 78 | } |
| 79 | - RT_LOG_INFO("delete g_contextRecord size: %d", SortVectorSize(&g_contextRecord)); | 79 | + RT_LOG_INFO("delete g_contextRecord size: %zu", SortVectorSize(&g_contextRecord)); |
| 80 | mmMutexUnLock(&g_ctxRecordMutex); | 80 | mmMutexUnLock(&g_ctxRecordMutex); |
| 81 | 81 | ||
| 82 | mmMutexLock(&context->streamLock); | 82 | mmMutexLock(&context->streamLock); |
| @@ -65,13 +65,13 @@ public: | |||
| 65 | 65 | ||
| 66 | /** | 66 | /** |
| 67 | * @ingroup ThreadModeManager | 67 | * @ingroup ThreadModeManager |
| 68 | - * @brief used for release resource when error occured | 68 | + * @brief used for release resource when error occurred |
| 69 | * @return TSD_OK when SUCCESS | 69 | * @return TSD_OK when SUCCESS |
| 70 | */ | 70 | */ |
| 71 | void Destroy() override; | 71 | void Destroy() override; |
| 72 | /** | 72 | /** |
| 73 | * @ingroup ProcessModeManager | 73 | * @ingroup ProcessModeManager |
| 74 | - * @brief tsd capablity apply | 74 | + * @brief tsd capability apply |
| 75 | * @return TSD_OK when success | 75 | * @return TSD_OK when success |
| 76 | */ | 76 | */ |
| 77 | TSD_StatusT CapabilityGet(const int32_t type, const uint64_t ptr) override; | 77 | TSD_StatusT CapabilityGet(const int32_t type, const uint64_t ptr) override; |
| @@ -154,7 +154,7 @@ TEST_F(DrvDispatchTest, dispatch_send_test) | |||
| 154 | 154 | ||
| 155 | TEST_F(DrvDispatchTest, dispatch_send_test2) | 155 | TEST_F(DrvDispatchTest, dispatch_send_test2) |
| 156 | { | 156 | { |
| 157 | - MOCKER(drvQosHanddleToId).stubs().will(returnValue(DRV_ERROR_INVALID_VALUE)); | 157 | + MOCKER(drvQosHandleToId).stubs().will(returnValue(DRV_ERROR_INVALID_VALUE)); |
| 158 | 158 | ||
| 159 | drvError_t error; | 159 | drvError_t error; |
| 160 | int32_t deviceId = 0; | 160 | int32_t deviceId = 0; |
| @@ -262,7 +262,7 @@ TEST_F(DrvDispatchTest, dispatch_queueAPI_test) | |||
| 262 | TEST_F(DrvDispatchTest, dispatch_qosHandle2Id_API_test) | 262 | TEST_F(DrvDispatchTest, dispatch_qosHandle2Id_API_test) |
| 263 | { | 263 | { |
| 264 | drvError_t error; | 264 | drvError_t error; |
| 265 | - error=drvQosHanddleToId(2, NULL, NULL, NULL); | 265 | + error=drvQosHandleToId(2, NULL, NULL, NULL); |
| 266 | EXPECT_EQ(error, DRV_ERROR_INVALID_VALUE); | 266 | EXPECT_EQ(error, DRV_ERROR_INVALID_VALUE); |
| 267 | } | 267 | } |
| 268 | 268 | ||