已合并
[bugfix] 修复残留日志拼写错误以及语法问题 #763
justsheldon创建于 8月21日
[bugfix] 修复残留日志拼写错误以及语法问题 #763
已合并
共 17 个文件变更+31-31
| @@ -61,7 +61,7 @@ void AddParamToBuf(const T* addr, uint64_t size) | |||
| 61 | return; | 61 | return; |
| 62 | } | 62 | } |
| 63 | OP_CHECK(memcpy_s(g_hashBuf + hashOffset, K_HASH_BUF_SIZE - hashOffset, addr, size * sizeof(T)) == EOK, | 63 | OP_CHECK(memcpy_s(g_hashBuf + hashOffset, K_HASH_BUF_SIZE - hashOffset, addr, size * sizeof(T)) == EOK, |
| 64 | - OP_LOGW("Failed to memcpy in op cahce."), | 64 | + OP_LOGW("Failed to memcpy in op cache."), |
| 65 | ;); | 65 | ;); |
| 66 | hashOffset += size * sizeof(T); | 66 | hashOffset += size * sizeof(T); |
| 67 | }; | 67 | }; |
| @@ -93,7 +93,7 @@ void AddParamToBuf(const T& value) | |||
| 93 | return; | 93 | return; |
| 94 | } | 94 | } |
| 95 | OP_CHECK(memcpy_s(g_hashBuf + hashOffset, K_HASH_BUF_SIZE - hashOffset, &value, sizeof(T)) == EOK, | 95 | OP_CHECK(memcpy_s(g_hashBuf + hashOffset, K_HASH_BUF_SIZE - hashOffset, &value, sizeof(T)) == EOK, |
| 96 | - OP_LOGW("Failed to memcpy in op cahce."), | 96 | + OP_LOGW("Failed to memcpy in op cache."), |
| 97 | ;); | 97 | ;); |
| 98 | hashOffset += sizeof(T); | 98 | hashOffset += sizeof(T); |
| 99 | }; | 99 | }; |
| @@ -96,7 +96,7 @@ public: | |||
| 96 | void SetOffset(uint64_t offset) | 96 | void SetOffset(uint64_t offset) |
| 97 | { | 97 | { |
| 98 | if (aclTensor_ == nullptr) { | 98 | if (aclTensor_ == nullptr) { |
| 99 | - OP_LOGW("aclTensor is null, cant no set workspace offset."); | 99 | + OP_LOGW("aclTensor is null, can't set workspace offset."); |
| 100 | return; | 100 | return; |
| 101 | } | 101 | } |
| 102 | aclTensor_->SetWorkspaceOffset(offset); | 102 | aclTensor_->SetWorkspaceOffset(offset); |
| @@ -249,7 +249,7 @@ int32_t OpInfoSerialize(const gert::TilingContext* ctx, const aclnnOpInfoRecord: | |||
| 249 | return -1; | 249 | return -1; |
| 250 | } | 250 | } |
| 251 | if (!builtInJsonConfig.contains("supportInfo")) { | 251 | if (!builtInJsonConfig.contains("supportInfo")) { |
| 252 | - OP_LOGE(ACLNN_ERR_INNER, "Json %s does not contains supportInfo keyword.", builtInJsonPath.c_str()); | 252 | + OP_LOGE(ACLNN_ERR_INNER, "Json %s does not contain supportInfo keyword.", builtInJsonPath.c_str()); |
| 253 | return -1; | 253 | return -1; |
| 254 | } | 254 | } |
| 255 | nlohmann::json jsonDebug = TilingContextToJson(ctx, iniConfigMap, builtInJsonConfig["supportInfo"], | 255 | nlohmann::json jsonDebug = TilingContextToJson(ctx, iniConfigMap, builtInJsonConfig["supportInfo"], |
| @@ -67,7 +67,7 @@ aclnnStatus KernelGraph::TopologicalSortBFS() | |||
| 67 | for (auto& peer : tensor->GetPeerTensors()) { | 67 | for (auto& peer : tensor->GetPeerTensors()) { |
| 68 | auto topoId = peer->GetOwnerNode()->GetTopoId(); | 68 | auto topoId = peer->GetOwnerNode()->GetTopoId(); |
| 69 | if (topoId >= static_cast<int64_t>(indegrees.size())) { | 69 | if (topoId >= static_cast<int64_t>(indegrees.size())) { |
| 70 | - OP_LOGE(ACLNN_ERR_INNER, "peer node's topo id %ld is larger thank the in-degree size %zu.", topoId, | 70 | + OP_LOGE(ACLNN_ERR_INNER, "peer node's topo id %ld is larger than the in-degree size %zu.", topoId, |
| 71 | indegrees.size()); | 71 | indegrees.size()); |
| 72 | return ACLNN_ERR_INNER; | 72 | return ACLNN_ERR_INNER; |
| 73 | } | 73 | } |
| @@ -1082,7 +1082,7 @@ OpCacheKey OpExecCache::GetOpCacheKey() const { return key_; } | |||
| 1082 | 1082 | ||
| 1083 | void OpExecCache::MarkOpCacheInvalid() | 1083 | void OpExecCache::MarkOpCacheInvalid() |
| 1084 | { | 1084 | { |
| 1085 | - OP_CHECK(!(CanUse()), OP_LOGI("OpExecCache has been can used, cant change to invalid."), return); | 1085 | + OP_CHECK(!(CanUse()), OP_LOGI("OpExecCache is in use, can't change to invalid."), return); |
| 1086 | hashKey_ = 0; | 1086 | hashKey_ = 0; |
| 1087 | // 不释放/置空 buf 仅置 len 为 0,避免 operator== 跨线程读到 buf 为空而 len 非 0 的中间态导致崩溃 | 1087 | // 不释放/置空 buf 仅置 len 为 0,避免 operator== 跨线程读到 buf 为空而 len 非 0 的中间态导致崩溃 |
| 1088 | key_.len = 0; | 1088 | key_.len = 0; |
| @@ -1337,7 +1337,7 @@ bool OpExecCacheManager::AddOpExecCache(OpExecCache* exec) | |||
| 1337 | bool ret = false; | 1337 | bool ret = false; |
| 1338 | std::lock_guard<std::mutex> guard(lock_); | 1338 | std::lock_guard<std::mutex> guard(lock_); |
| 1339 | if (cache_.size() >= cacheLimit_) { | 1339 | if (cache_.size() >= cacheLimit_) { |
| 1340 | - OP_LOGW("op cache is full"); | 1340 | + OP_LOGW("op cache is full, cache size %zu, limit %zu", cache_.size(), cacheLimit_); |
| 1341 | op::internal::GetThreadLocalContext().cacheHasFull_ = true; | 1341 | op::internal::GetThreadLocalContext().cacheHasFull_ = true; |
| 1342 | delete exec; | 1342 | delete exec; |
| 1343 | return false; | 1343 | return false; |
| @@ -1349,7 +1349,7 @@ bool OpExecCacheManager::AddOpExecCache(OpExecCache* exec) | |||
| 1349 | } | 1349 | } |
| 1350 | 1350 | ||
| 1351 | if (cache2_.size() >= cacheLimit_) { | 1351 | if (cache2_.size() >= cacheLimit_) { |
| 1352 | - OP_LOGW("op cache is full"); | 1352 | + OP_LOGW("op cache2 is full, cache2 size %zu, limit %zu", cache2_.size(), cacheLimit_); |
| 1353 | ShrinkCache(K_CACHE_SHRINK_NUM, exec->GetShrinkList()); | 1353 | ShrinkCache(K_CACHE_SHRINK_NUM, exec->GetShrinkList()); |
| 1354 | } | 1354 | } |
| 1355 | OpCacheKey key = exec->GetOpCacheKey(); | 1355 | OpCacheKey key = exec->GetOpCacheKey(); |
| @@ -311,7 +311,7 @@ void KernelMgr::GetDirPath() | |||
| 311 | std::vector<std::string> configImplPath = knlLib.GetConfigImplPath(); | 311 | std::vector<std::string> configImplPath = knlLib.GetConfigImplPath(); |
| 312 | if (!configImplPath.empty()) { | 312 | if (!configImplPath.empty()) { |
| 313 | for (const auto& element : configImplPath) { | 313 | for (const auto& element : configImplPath) { |
| 314 | - OP_LOGI("add vector config.imi opp path: %s", element.c_str()); | 314 | + OP_LOGI("add vector config in opp path: %s", element.c_str()); |
| 315 | customConfigDirs_.emplace_back(element + DYN_KERNEL_CONFIG_PATH + knlLib.GetSocPath()); | 315 | customConfigDirs_.emplace_back(element + DYN_KERNEL_CONFIG_PATH + knlLib.GetSocPath()); |
| 316 | customBinAndJsonDirs_.emplace_back(element + DYN_BIN_AND_JSON_PATH); | 316 | customBinAndJsonDirs_.emplace_back(element + DYN_BIN_AND_JSON_PATH); |
| 317 | } | 317 | } |
| @@ -247,7 +247,7 @@ int32_t RecordOpArgCallbacker::RecordOpArgDump([[maybe_unused]] uint64_t dumpSwi | |||
| 247 | if (!GetOpProfilingRecordArgFlag()) { | 247 | if (!GetOpProfilingRecordArgFlag()) { |
| 248 | OP_LOGI("Record stop, start RecordOpArgDump"); | 248 | OP_LOGI("Record stop, start RecordOpArgDump"); |
| 249 | int32_t res = aclnnOpInfoRecord::OpInfoDump(); | 249 | int32_t res = aclnnOpInfoRecord::OpInfoDump(); |
| 250 | - CHECK_COND(res == EOK, ACLNN_ERR_INNER, "OpInfoDump filed"); | 250 | + CHECK_COND(res == EOK, ACLNN_ERR_INNER, "OpInfoDump failed"); |
| 251 | } | 251 | } |
| 252 | return 0; | 252 | return 0; |
| 253 | } | 253 | } |
| @@ -137,7 +137,7 @@ OpExecutorImpl::~OpExecutorImpl() | |||
| 137 | void OpExecutorImpl::FinalizeCache() | 137 | void OpExecutorImpl::FinalizeCache() |
| 138 | { | 138 | { |
| 139 | if (opExecCache_ != nullptr) { | 139 | if (opExecCache_ != nullptr) { |
| 140 | - OP_CHECK(!(opExecCache_->CanUse()), OP_LOGI("OpExecCache has been can used, cant finalize cache."), return); | 140 | + OP_CHECK(!(opExecCache_->CanUse()), OP_LOGI("OpExecCache is in use, can't finalize cache."), return); |
| 141 | opExecCache_->Finalize(); | 141 | opExecCache_->Finalize(); |
| 142 | opExecCache_->SetUse(); | 142 | opExecCache_->SetUse(); |
| 143 | } | 143 | } |
| @@ -157,10 +157,10 @@ aclnnStatus OpExecutorImpl::SetRepeatable(const op::FVector<op::KernelLauncher*> | |||
| 157 | OP_CHECK((repeatMode_ != RepeatMode::Unrepeatable), | 157 | OP_CHECK((repeatMode_ != RepeatMode::Unrepeatable), |
| 158 | OP_LOGW("unrepeatable executor, find keyword MarkOpCacheInvalid in log."), return ACLNN_ERR_INNER;); | 158 | OP_LOGW("unrepeatable executor, find keyword MarkOpCacheInvalid in log."), return ACLNN_ERR_INNER;); |
| 159 | OP_CHECK((hugeMemPoolIndex_ == op::kInvalidHugeMemIndexId), | 159 | OP_CHECK((hugeMemPoolIndex_ == op::kInvalidHugeMemIndexId), |
| 160 | - OP_LOGW("cant set executor repeatable when use huge page mem."), return ACLNN_ERR_INNER;); | 160 | + OP_LOGW("can't set executor repeatable when use huge page mem."), return ACLNN_ERR_INNER;); |
| 161 | 161 | ||
| 162 | OP_CHECK((tensorRelation_.size() % K_PAIR_STORAGE_RELATION == 0), | 162 | OP_CHECK((tensorRelation_.size() % K_PAIR_STORAGE_RELATION == 0), |
| 163 | - OP_LOGW("size if tensor relation must be pair of tensor"), return ACLNN_ERR_INNER;); | 163 | + OP_LOGW("size of tensor relation must be a pair of tensors"), return ACLNN_ERR_INNER;); |
| 164 | // check tensor can repeat | 164 | // check tensor can repeat |
| 165 | auto& opTlsCtx = op::internal::GetThreadLocalContext(); | 165 | auto& opTlsCtx = op::internal::GetThreadLocalContext(); |
| 166 | cachedStorageList_.assign(opTlsCtx.cachedStorageList_.begin(), | 166 | cachedStorageList_.assign(opTlsCtx.cachedStorageList_.begin(), |
| @@ -315,7 +315,7 @@ void OpExecutorImpl::OpExecCacheSetWorkspaceSize(uint64_t workspaceSize) | |||
| 315 | 315 | ||
| 316 | void OpExecutorImpl::OpExecCacheSetCacheBuf(void* buf) | 316 | void OpExecutorImpl::OpExecCacheSetCacheBuf(void* buf) |
| 317 | { | 317 | { |
| 318 | - OP_CHECK(!(opExecCache_->CanUse()), OP_LOGI("OpExecCache has been can used, cant change cache buf."), return); | 318 | + OP_CHECK(!(opExecCache_->CanUse()), OP_LOGI("OpExecCache is in use, can't change cache buf."), return); |
| 319 | opExecCache_->SetCacheBuf(buf); | 319 | opExecCache_->SetCacheBuf(buf); |
| 320 | } | 320 | } |
| 321 | } // namespace op | 321 | } // namespace op |
| @@ -1069,7 +1069,7 @@ void InitL2Phase2Context([[maybe_unused]] const char* l2Name, aclOpExecutor* exe | |||
| 1069 | 1069 | ||
| 1070 | void InitL0Context(const char* profilingName, aclOpExecutor* executor) | 1070 | void InitL0Context(const char* profilingName, aclOpExecutor* executor) |
| 1071 | { | 1071 | { |
| 1072 | - OP_CHECK_NO_RETURN(executor != nullptr, OP_LOGE(ACLNN_ERR_PARAM_NULLPTR, "executor cann't be nullptr.")); | 1072 | + OP_CHECK_NO_RETURN(executor != nullptr, OP_LOGE(ACLNN_ERR_PARAM_NULLPTR, "executor can't be nullptr.")); |
| 1073 | if (executor->GetMagicNumber() == K_EXECUTOR_MAGIC_NUMBER) { | 1073 | if (executor->GetMagicNumber() == K_EXECUTOR_MAGIC_NUMBER) { |
| 1074 | op::internal::OpLogInfo tmpLogInfo = executor->GetLogInfo(); | 1074 | op::internal::OpLogInfo tmpLogInfo = executor->GetLogInfo(); |
| 1075 | tmpLogInfo.l0Name = profilingName; | 1075 | tmpLogInfo.l0Name = profilingName; |
| @@ -856,7 +856,7 @@ aclnnStatus OpKernel::ParseAttributes(const nlohmann::json& singleBinJson, strin | |||
| 856 | /* Parse value for attributes. */ | 856 | /* Parse value for attributes. */ |
| 857 | auto value = attr.find(VALUE); | 857 | auto value = attr.find(VALUE); |
| 858 | if (value == attr.end()) { | 858 | if (value == attr.end()) { |
| 859 | - OP_LOGE(ACLNN_ERR_INNER, "Attr %s does not contains value!", attrInfo.attrName.c_str()); | 859 | + OP_LOGE(ACLNN_ERR_INNER, "Attr %s does not contain value!", attrInfo.attrName.c_str()); |
| 860 | return ACLNN_ERR_INNER; | 860 | return ACLNN_ERR_INNER; |
| 861 | } | 861 | } |
| 862 | 862 | ||
| @@ -1316,7 +1316,7 @@ aclnnStatus OpKernel::JudgeAttrSupportAll(const nlohmann::json& binListJson) | |||
| 1316 | /* 1. Check name. */ | 1316 | /* 1. Check name. */ |
| 1317 | auto name = attr.find(NAME); | 1317 | auto name = attr.find(NAME); |
| 1318 | if (name == attr.end() || name->is_null()) { | 1318 | if (name == attr.end() || name->is_null()) { |
| 1319 | - OP_LOGE(ACLNN_ERR_INNER, "Attr does not contains name!"); | 1319 | + OP_LOGE(ACLNN_ERR_INNER, "Attr does not contain name!"); |
| 1320 | return ACLNN_ERR_INNER; | 1320 | return ACLNN_ERR_INNER; |
| 1321 | } | 1321 | } |
| 1322 | 1322 | ||
| @@ -1340,7 +1340,7 @@ aclnnStatus OpKernel::JudgeAttrSupportAll(const nlohmann::json& binListJson) | |||
| 1340 | /* 2. Check value */ | 1340 | /* 2. Check value */ |
| 1341 | auto value = attr.find(VALUE); | 1341 | auto value = attr.find(VALUE); |
| 1342 | if (value == attr.end()) { | 1342 | if (value == attr.end()) { |
| 1343 | - OP_LOGE(ACLNN_ERR_INNER, "Attr %s does not contains value!", attrInfo.attrName.c_str()); | 1343 | + OP_LOGE(ACLNN_ERR_INNER, "Attr %s does not contain value!", attrInfo.attrName.c_str()); |
| 1344 | return ACLNN_ERR_INNER; | 1344 | return ACLNN_ERR_INNER; |
| 1345 | } | 1345 | } |
| 1346 | 1346 | ||
| @@ -1268,7 +1268,7 @@ public: | |||
| 1268 | aclnnStatus Run(aclrtStream stream, OpArgContext* args) | 1268 | aclnnStatus Run(aclrtStream stream, OpArgContext* args) |
| 1269 | { | 1269 | { |
| 1270 | if (bins_.empty()) { | 1270 | if (bins_.empty()) { |
| 1271 | - OP_LOGE(ACLNN_ERR_INNER, "Op %s does not has any binary.", op::OpTypeDict::ToString(opType_).GetString()); | 1271 | + OP_LOGE(ACLNN_ERR_INNER, "Op %s does not have any binary.", op::OpTypeDict::ToString(opType_).GetString()); |
| 1272 | return ACLNN_ERR_INNER; | 1272 | return ACLNN_ERR_INNER; |
| 1273 | } | 1273 | } |
| 1274 | CHECK_RET(args != nullptr, ACLNN_ERR_PARAM_NULLPTR); | 1274 | CHECK_RET(args != nullptr, ACLNN_ERR_PARAM_NULLPTR); |
| @@ -1288,7 +1288,7 @@ public: | |||
| 1288 | aclnnStatus GetWorkspace(size_t const*& size, size_t& num, OpArgList& inputs, OpArgList& outputs, OpArgList& attrs) | 1288 | aclnnStatus GetWorkspace(size_t const*& size, size_t& num, OpArgList& inputs, OpArgList& outputs, OpArgList& attrs) |
| 1289 | { | 1289 | { |
| 1290 | if (bins_.empty()) { | 1290 | if (bins_.empty()) { |
| 1291 | - OP_LOGE(ACLNN_ERR_INNER_OPP_KERNEL_PKG_NOT_FOUND, "Op %s does not has any binary.", | 1291 | + OP_LOGE(ACLNN_ERR_INNER_OPP_KERNEL_PKG_NOT_FOUND, "Op %s does not have any binary.", |
| 1292 | op::OpTypeDict::ToString(opType_).GetString()); | 1292 | op::OpTypeDict::ToString(opType_).GetString()); |
| 1293 | return ACLNN_ERR_INNER_OPP_KERNEL_PKG_NOT_FOUND; | 1293 | return ACLNN_ERR_INNER_OPP_KERNEL_PKG_NOT_FOUND; |
| 1294 | } | 1294 | } |
| @@ -1365,7 +1365,7 @@ public: | |||
| 1365 | OP_LOGD("implMode %ld, determin %ld. tensor size %zu, dynamic size %zu, attr size %zu, value depend size %zu.", | 1365 | OP_LOGD("implMode %ld, determin %ld. tensor size %zu, dynamic size %zu, attr size %zu, value depend size %zu.", |
| 1366 | implMode, determinConfig, tensors.size(), dynamicCount.size(), attrsVec.size(), | 1366 | implMode, determinConfig, tensors.size(), dynamicCount.size(), attrsVec.size(), |
| 1367 | valueDependIndex_.size()); | 1367 | valueDependIndex_.size()); |
| 1368 | - OP_LOGD("Finding static kernel with [aicNum %u, aivNum %u, determinisitcLevel %lld].", | 1368 | + OP_LOGD("Finding static kernel with [aicNum %u, aivNum %u, deterministicLevel %lld].", |
| 1369 | GetThreadLocalContext().opConfigInfo_.aicNum_, GetThreadLocalContext().opConfigInfo_.aivNum_, | 1369 | GetThreadLocalContext().opConfigInfo_.aicNum_, GetThreadLocalContext().opConfigInfo_.aivNum_, |
| 1370 | determinConfig); | 1370 | determinConfig); |
| 1371 | NnopbaseStaticTensorNumInfo tensorNumInfo{ | 1371 | NnopbaseStaticTensorNumInfo tensorNumInfo{ |
| @@ -1427,7 +1427,7 @@ public: | |||
| 1427 | } | 1427 | } |
| 1428 | 1428 | ||
| 1429 | if (maxKeyLength_ == 0) { | 1429 | if (maxKeyLength_ == 0) { |
| 1430 | - OP_LOGE(ACLNN_ERR_INNER, "Cannot find and bin for op %s.", op::OpTypeDict::ToString(opType_).GetString()); | 1430 | + OP_LOGE(ACLNN_ERR_INNER, "Cannot find any bin for op %s.", op::OpTypeDict::ToString(opType_).GetString()); |
| 1431 | return nullptr; | 1431 | return nullptr; |
| 1432 | } | 1432 | } |
| 1433 | 1433 | ||
| @@ -85,7 +85,7 @@ void OpKernelBin::ParseStaticImplMode(const nlohmann::json& objJson) | |||
| 85 | if (implModeIter != supportInfoIter->end()) { | 85 | if (implModeIter != supportInfoIter->end()) { |
| 86 | staticImplMode_ = implModeIter->get<std::string>(); | 86 | staticImplMode_ = implModeIter->get<std::string>(); |
| 87 | } else { | 87 | } else { |
| 88 | - OP_LOGW("Static json can not implMode in %s", jsonPath_.c_str()); | 88 | + OP_LOGW("Static json can not find implMode in %s", jsonPath_.c_str()); |
| 89 | return; | 89 | return; |
| 90 | } | 90 | } |
| 91 | } catch (const nlohmann::json::exception& e) { | 91 | } catch (const nlohmann::json::exception& e) { |
| @@ -184,7 +184,7 @@ void OpKernelBin::ParseKernelDfxConfig(const nlohmann::json& objJson) | |||
| 184 | { | 184 | { |
| 185 | auto debugOptionsConfig = objJson.find(DEBUG_OPTIONS); | 185 | auto debugOptionsConfig = objJson.find(DEBUG_OPTIONS); |
| 186 | if (debugOptionsConfig == objJson.end() || !debugOptionsConfig->is_string()) { | 186 | if (debugOptionsConfig == objJson.end() || !debugOptionsConfig->is_string()) { |
| 187 | - OP_LOGI("Dont enable kernel dfx."); | 187 | + OP_LOGI("Don't enable kernel dfx."); |
| 188 | return; | 188 | return; |
| 189 | } | 189 | } |
| 190 | const std::string debugOptionsConfigStr = debugOptionsConfig->get<std::string>(); | 190 | const std::string debugOptionsConfigStr = debugOptionsConfig->get<std::string>(); |
| @@ -213,7 +213,7 @@ uint64_t OpKernelBin::GetKernelDfxBufSize() const { return kernelDfxBufSize_; } | |||
| 213 | 213 | ||
| 214 | void OpKernelBin::DumpWorkspaceData(aclrtStream stream, OpArgContext* args) const | 214 | void OpKernelBin::DumpWorkspaceData(aclrtStream stream, OpArgContext* args) const |
| 215 | { | 215 | { |
| 216 | - OP_CHECK(args != nullptr && args->ContainsOpArgType(op::OP_WORKSPACE_ARG), OP_LOGW("Dont has workspace"), return); | 216 | + OP_CHECK(args != nullptr && args->ContainsOpArgType(op::OP_WORKSPACE_ARG), OP_LOGW("Don't have workspace"), return); |
| 217 | auto& argList = *args->GetOpArg(op::OP_WORKSPACE_ARG); | 217 | auto& argList = *args->GetOpArg(op::OP_WORKSPACE_ARG); |
| 218 | OP_CHECK((argList.count == 1), OP_LOGW("workspace must has only one value."), return); | 218 | OP_CHECK((argList.count == 1), OP_LOGW("workspace must has only one value."), return); |
| 219 | auto& arg = argList[0]; | 219 | auto& arg = argList[0]; |
| @@ -263,7 +263,7 @@ const std::vector<std::string> OpKernelLib::GetBuiltInFilePaths() | |||
| 263 | configFileDir.append(GetSocPath()); | 263 | configFileDir.append(GetSocPath()); |
| 264 | OP_CHECK(ReadDirBySuffix(configFileDir, ".json", configFileNames) == ACLNN_SUCCESS, | 264 | OP_CHECK(ReadDirBySuffix(configFileDir, ".json", configFileNames) == ACLNN_SUCCESS, |
| 265 | OP_LOGW("Failed to read dir: %s", configFileDir.c_str()), return configFilePaths); | 265 | OP_LOGW("Failed to read dir: %s", configFileDir.c_str()), return configFilePaths); |
| 266 | - OP_CHECK(!configFileNames.empty(), OP_LOGW("configFileNames is emtpy in %s", configFileDir.c_str()), | 266 | + OP_CHECK(!configFileNames.empty(), OP_LOGW("configFileNames is empty in %s", configFileDir.c_str()), |
| 267 | return configFilePaths); | 267 | return configFilePaths); |
| 268 | bool hasLegacyFile = false; | 268 | bool hasLegacyFile = false; |
| 269 | std::string lebacyFileName; | 269 | std::string lebacyFileName; |
| @@ -747,7 +747,7 @@ LaunchArgCache* RtsArg::DumpToCache() | |||
| 747 | OP_LOGD("no op cache in context"); | 747 | OP_LOGD("no op cache in context"); |
| 748 | return nullptr; | 748 | return nullptr; |
| 749 | } | 749 | } |
| 750 | - OP_CHECK(!(cache->CanUse()), OP_LOGI("OpExecCache has been can used, cant dump to cache."), return nullptr); | 750 | + OP_CHECK(!(cache->CanUse()), OP_LOGI("OpExecCache is in use, can't dump to cache."), return nullptr); |
| 751 | size_t tilingDataLen = rtsArgBuffer_->GetTilingDataPtr()->data_size_; | 751 | size_t tilingDataLen = rtsArgBuffer_->GetTilingDataPtr()->data_size_; |
| 752 | if (!cache->IsOpCacheValid() || tilingDataLen == 0 || tilingDataLen >= MAX_CACHE_TILING_SIZE) { | 752 | if (!cache->IsOpCacheValid() || tilingDataLen == 0 || tilingDataLen >= MAX_CACHE_TILING_SIZE) { |
| 753 | OP_LOGI("hash key is zero, or don't has tiling, or tiling size bigger than cache limit, skip cache."); | 753 | OP_LOGI("hash key is zero, or don't has tiling, or tiling size bigger than cache limit, skip cache."); |
| @@ -29,7 +29,7 @@ extern "C" { | |||
| 29 | int InitHugeMemThreadLocal([[maybe_unused]] void* arg, [[maybe_unused]] bool sync) | 29 | int InitHugeMemThreadLocal([[maybe_unused]] void* arg, [[maybe_unused]] bool sync) |
| 30 | { | 30 | { |
| 31 | op::internal::GetThreadLocalContext().poolIndex_ = op::internal::GetAvaiablePoolIndex(); | 31 | op::internal::GetThreadLocalContext().poolIndex_ = op::internal::GetAvaiablePoolIndex(); |
| 32 | - OP_LOGI("Hugemem trace: get avaiable pool index: %d", op::internal::GetThreadLocalContext().poolIndex_); | 32 | + OP_LOGI("Hugemem trace: get available pool index: %d", op::internal::GetThreadLocalContext().poolIndex_); |
| 33 | return 0; | 33 | return 0; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| @@ -27,7 +27,7 @@ protected: | |||
| 27 | int32_t eRes = error_message::ErrMgrInit(error_message::ErrorMessageMode::INTERNAL_MODE); | 27 | int32_t eRes = error_message::ErrMgrInit(error_message::ErrorMessageMode::INTERNAL_MODE); |
| 28 | OP_LOGI("Init%d", eRes); | 28 | OP_LOGI("Init%d", eRes); |
| 29 | auto errMsg = error_message::GetErrMgrErrorMessage(); // clear error message container | 29 | auto errMsg = error_message::GetErrMgrErrorMessage(); // clear error message container |
| 30 | - OP_LOGI("clear error massage, cached error msg:\n%s", errMsg.get()); | 30 | + OP_LOGI("clear error message, cached error msg:\n%s", errMsg.get()); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static void TearDownTestCase() {} | 33 | static void TearDownTestCase() {} |
| @@ -103,7 +103,7 @@ TEST_F(CheckDoubleFreeUt, HugeMemRange_NotReported) | |||
| 103 | void* addr = Allocate(64); // 大页场景 | 103 | void* addr = Allocate(64); // 大页场景 |
| 104 | ASSERT_NE(addr, nullptr); | 104 | ASSERT_NE(addr, nullptr); |
| 105 | // 前导断言:确认已进入大页路径(避免用例名误导) | 105 | // 前导断言:确认已进入大页路径(避免用例名误导) |
| 106 | - ASSERT_TRUE(op::internal::BlockPool::InHugeMemRange(addr)) << "测试前提:已进入大页路径"; | 106 | + ASSERT_TRUE(op::internal::BlockPool::InHugeMemRange(addr)) << "precondition: huge page path entered"; |
| 107 | EXPECT_FALSE(CheckDoubleFree(addr)); // 短路:大页 free 是 no-op | 107 | EXPECT_FALSE(CheckDoubleFree(addr)); // 短路:大页 free 是 no-op |
| 108 | // 仅调 ReleaseHugeMem 即可:其内部 FreeHugeMem 会读 poolIndex_ 归还 baseArray_ 后再置 -1。 | 108 | // 仅调 ReleaseHugeMem 即可:其内部 FreeHugeMem 会读 poolIndex_ 归还 baseArray_ 后再置 -1。 |
| 109 | // 若先调 UnInitHugeMemThreadLocal 把 poolIndex_ 置 -1,FreeHugeMem 会因 id 无效早退, | 109 | // 若先调 UnInitHugeMemThreadLocal 把 poolIndex_ 置 -1,FreeHugeMem 会因 id 无效早退, |
| @@ -27,7 +27,7 @@ protected: | |||
| 27 | int32_t eRes = error_message::ErrMgrInit(error_message::ErrorMessageMode::INTERNAL_MODE); | 27 | int32_t eRes = error_message::ErrMgrInit(error_message::ErrorMessageMode::INTERNAL_MODE); |
| 28 | OP_LOGI("Init%d", eRes); | 28 | OP_LOGI("Init%d", eRes); |
| 29 | auto errMsg = error_message::GetErrMgrErrorMessage(); // clear error message container | 29 | auto errMsg = error_message::GetErrMgrErrorMessage(); // clear error message container |
| 30 | - OP_LOGI("clear error massage, cached error msg:\n%s", errMsg.get()); | 30 | + OP_LOGI("clear error message, cached error msg:\n%s", errMsg.get()); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static void TearDownTestCase() {} | 33 | static void TearDownTestCase() {} |