diff --git a/exe_graph/lowering/bg_ir_attrs.cc b/exe_graph/lowering/bg_ir_attrs.cc index 3172df37bb7c1ffedbc99ee4ff2f1ad6ed546628..c93c3bab61db7108444088948b134ef34a8ac5e7 100644 --- a/exe_graph/lowering/bg_ir_attrs.cc +++ b/exe_graph/lowering/bg_ir_attrs.cc @@ -222,8 +222,8 @@ bool AppendVectorStrAttr(const ge::AnyValue &attr, std::vectorInit(val->size()); cv->SetSize(val->size()); size_t offset = 0U; - for (auto i = 0U; i < val->size(); ++i) { - const auto ele_str_size = (*val)[i].size() + 1U; + for (size_t i = 0U; i < val->size(); ++i) { + const size_t ele_str_size = (*val)[i].size() + 1U; GE_ASSERT_EOK(strcpy_s(ge::PtrToPtr(ge::PtrToPtr(cv->MutableData()) + offset), total_str_size, (*val)[i].c_str())); diff --git a/graph/opsproto/opsproto_manager.cc b/graph/opsproto/opsproto_manager.cc index 0a10bca0d6bfc9a4918876f2cdf04df23aca01c8..bd4b4c06c5329e4e96dfd467dce5d46b9cde1692 100644 --- a/graph/opsproto/opsproto_manager.cc +++ b/graph/opsproto/opsproto_manager.cc @@ -101,7 +101,7 @@ void GetOpsProtoSoFileList(const std::string &path, std::vector &fi std::string cpu_type; PluginManager::GetCurEnvPackageOsAndCpuType(os_type, cpu_type); - for (auto i = 0UL; i < v_path.size(); ++i) { + for (size_t i = 0UL; i < v_path.size(); ++i) { const std::string new_path = v_path[i] + "lib/" + os_type + "/" + cpu_type + "/"; char_t resolved_path[MMPA_MAX_PATH] = {}; const INT32 result = mmRealPath(new_path.c_str(), &(resolved_path[0U]), MMPA_MAX_PATH); diff --git a/graph/serialization/model_serialize.cc b/graph/serialization/model_serialize.cc index 02a869e91a8ed3196ea8501fc28c91cb469dd0f4..52434cd72e7b74fdd8586548b0703b5e10431e2a 100644 --- a/graph/serialization/model_serialize.cc +++ b/graph/serialization/model_serialize.cc @@ -765,10 +765,10 @@ Status ModelSerializeImp::ParallelUnserializeGraph( } // 当图个数小于16时,只需要拉起跟子图个数相同的线程数(这里需要拉起的线程数需要除去主线程) const int32_t thread_num = std::min(graphs_proto.size() - 1, kMaxThreadNum); - GELOGI("Start to unserialize graph, thread num[%ld], graph num[%ld]", + GELOGI("Start to unserialize graph, thread num[%d], graph num[%d]", thread_num, graphs_proto.size()); // 初始化子图表 - for (auto idx = 0; idx < graphs_proto.size(); ++idx) { + for (int32_t idx = 0; idx < graphs_proto.size(); ++idx) { graphs.emplace(std::make_pair(graphs_proto[idx].name(), nullptr)); } std::vector threads; diff --git a/graph/utils/args_format_desc_utils.cc b/graph/utils/args_format_desc_utils.cc index 0c6899e94bf70075502c42998bd2dc3f656456a7..739472c2d5776edf2d83c5385c2d41e24671d92c 100644 --- a/graph/utils/args_format_desc_utils.cc +++ b/graph/utils/args_format_desc_utils.cc @@ -7,8 +7,8 @@ * See LICENSE in the root of the software repository for the full text of the License. * ===================================================================================================================*/ -#include #include "graph/utils/args_format_desc_utils.h" +#include #include "common/checker.h" #include "common/ge_common/debug/ge_log.h" #include "graph/args_format_desc.h" diff --git a/inc/external/graph/utils/args_format_desc_utils.h b/inc/external/graph/utils/args_format_desc_utils.h index a40955d201437eac2a5f55595d94e286eb78655e..aec7ac93e0659f1d52757b6537a6fbea7cb112ad 100644 --- a/inc/external/graph/utils/args_format_desc_utils.h +++ b/inc/external/graph/utils/args_format_desc_utils.h @@ -15,7 +15,6 @@ #include "graph/ge_error_codes.h" #include "graph/op_desc.h" -#include "register/hidden_input_func_registry.h" #include "register/hidden_inputs_func_registry.h" namespace ge {