diff --git a/inc/common/npu_error_define.h b/inc/common/npu_error_define.h index 249ea673..d8bfc1ba 100644 --- a/inc/common/npu_error_define.h +++ b/inc/common/npu_error_define.h @@ -89,6 +89,6 @@ typedef enum tagHiAiNpuModuleId { #define HIAI_NPU_ERR_CODE_HEAD(npuLocal, codeType, errLevel, moduleId) \ (HIAI_NPU_LOC_BIT(npuLocal) + HIAI_NPU_CODE_TYPE_BIT(codeType) + HIAI_NPU_ERR_LEV_BIT(errLevel) + \ - HIAI_NPU_MOD_ID_BIT(moduleId)) + HIAI_NPU_MOD_ID_BIT(moduleId)) #endif // INC_COMMON_NPU_ERROR_DEFINE_H_ diff --git a/inc/framework/common/op/attr_value_util.h b/inc/framework/common/op/attr_value_util.h index ad13d75c..98f27c24 100644 --- a/inc/framework/common/op/attr_value_util.h +++ b/inc/framework/common/op/attr_value_util.h @@ -18,6 +18,7 @@ #define INC_FRAMEWORK_COMMON_OP_ATTR_VALUE_UTIL_H_ #include +#include #include #include "graph/debug/ge_attr_define.h" #include "common/types.h" diff --git a/inc/framework/common/op/ge_op_utils.h b/inc/framework/common/op/ge_op_utils.h index 94f98c5e..dd933de7 100644 --- a/inc/framework/common/op/ge_op_utils.h +++ b/inc/framework/common/op/ge_op_utils.h @@ -172,7 +172,7 @@ class OpUtils { /// /// @ingroup domi_omg - /// @brief Convert the convolutionˇ®s weight data from [h, w, c, k] to [k, c, h, w] + /// @brief Convert the convolution weight data from [h, w, c, k] to [k, c, h, w] /// @param [in] input Weight data in HWCK format /// @param [in] H value of H dimension /// @param [in] W value of W dimension @@ -183,7 +183,7 @@ class OpUtils { static void TransDataHWCK2KCHW(const void *input, int64_t H, int64_t W, int64_t C, int64_t K, void **output); /// /// @ingroup domi_omg - /// @brief Converts the convolutionˇ®s weight data from [k, c, h, w] to [h, w, c, k]. + /// @brief Converts the convolution weight data from [k, c, h, w] to [h, w, c, k]. /// @param [in] input Weight data in HWCK format /// @param [in] K value of K dimension /// @param [in] C value of C dimension diff --git a/inc/framework/ge_runtime/task_info.h b/inc/framework/ge_runtime/task_info.h index 567a2964..a48ed68b 100644 --- a/inc/framework/ge_runtime/task_info.h +++ b/inc/framework/ge_runtime/task_info.h @@ -238,13 +238,13 @@ class EventWaitTaskInfo : public EventTaskInfo { class FusionStartTaskInfo : public TaskInfo { public: - FusionStartTaskInfo(uint32_t stream_id) : TaskInfo(stream_id, TaskInfoType::FUSION_START) {} + explicit FusionStartTaskInfo(uint32_t stream_id) : TaskInfo(stream_id, TaskInfoType::FUSION_START) {} ~FusionStartTaskInfo() override {} }; class FusionEndTaskInfo : public TaskInfo { public: - FusionEndTaskInfo(uint32_t stream_id) : TaskInfo(stream_id, TaskInfoType::FUSION_END) {} + explicit FusionEndTaskInfo(uint32_t stream_id) : TaskInfo(stream_id, TaskInfoType::FUSION_END) {} ~FusionEndTaskInfo() override {} }; diff --git a/src/common/graph/anchor.cc b/src/common/graph/anchor.cc index fbfd3033..592d8b78 100644 --- a/src/common/graph/anchor.cc +++ b/src/common/graph/anchor.cc @@ -51,7 +51,6 @@ void Anchor::UnlinkAll() noexcept { if (Unlink(peer_anchor_ptr) != GRAPH_SUCCESS) { GELOGW("unlink peer_anchor_ptr failed."); } - } while (!peer_anchors_.empty()); } } diff --git a/src/common/graph/compute_graph.cc b/src/common/graph/compute_graph.cc index b0382357..70ddb00f 100644 --- a/src/common/graph/compute_graph.cc +++ b/src/common/graph/compute_graph.cc @@ -640,7 +640,7 @@ graphStatus ComputeGraph::SortNodes(std::vector &stack, std::mapGetName()); diff --git a/src/common/graph/format_refiner.cc b/src/common/graph/format_refiner.cc index 3217b17a..037b18c9 100644 --- a/src/common/graph/format_refiner.cc +++ b/src/common/graph/format_refiner.cc @@ -67,7 +67,6 @@ graphStatus FormatRefiner::GetAnchorPoints(const ge::ComputeGraphPtr &graph, std anchor_points.clear(); // Get all anchor point nodes and switch nodes for (const auto &node_ptr : graph->GetAllNodes()) { - std::vector is_node_set_format; if (node_ptr == nullptr) { return GRAPH_FAILED; } diff --git a/src/common/graph/op_imp.cc b/src/common/graph/op_imp.cc index 9abf242b..0d9acefa 100644 --- a/src/common/graph/op_imp.cc +++ b/src/common/graph/op_imp.cc @@ -20,7 +20,8 @@ #include "debug/ge_log.h" #include "debug/ge_util.h" -using namespace std; +using std::vector; +using std::function; namespace ge { diff --git a/src/common/graph/operator.cc b/src/common/graph/operator.cc index b40938a8..7bfedad9 100644 --- a/src/common/graph/operator.cc +++ b/src/common/graph/operator.cc @@ -22,7 +22,6 @@ #include #include -//#include "./array_ops.h" #include "debug/ge_log.h" #include "debug/ge_op_types.h" #include "debug/ge_util.h" diff --git a/src/ge/ge_local_engine/ops_kernel_store/ge_local_ops_kernel_info.cc b/src/ge/ge_local_engine/ops_kernel_store/ge_local_ops_kernel_info.cc index 0e5844b8..18819125 100644 --- a/src/ge/ge_local_engine/ops_kernel_store/ge_local_ops_kernel_info.cc +++ b/src/ge/ge_local_engine/ops_kernel_store/ge_local_ops_kernel_info.cc @@ -20,8 +20,6 @@ #include "framework/common/debug/ge_log.h" #include "common/ge_inner_error_codes.h" #include "common/ge/ge_util.h" -#include "common/ge_inner_error_codes.h" -#include "framework/common/debug/ge_log.h" #include "graph/utils/tensor_utils.h" #include "graph/utils/type_utils.h" #include "op/op_factory.h" diff --git a/src/ge/graph/load/new_model_manager/data_dumper.cc b/src/ge/graph/load/new_model_manager/data_dumper.cc index d99e8452..402a3ff6 100644 --- a/src/ge/graph/load/new_model_manager/data_dumper.cc +++ b/src/ge/graph/load/new_model_manager/data_dumper.cc @@ -14,6 +14,10 @@ * limitations under the License. */ +#include +#include +#include + #include "graph/load/new_model_manager/data_dumper.h" #include "graph/utils/attr_utils.h" #include "graph/debug/ge_attr_define.h" diff --git a/src/ge/graph/load/new_model_manager/data_dumper.h b/src/ge/graph/load/new_model_manager/data_dumper.h index ea25da31..128e18ee 100644 --- a/src/ge/graph/load/new_model_manager/data_dumper.h +++ b/src/ge/graph/load/new_model_manager/data_dumper.h @@ -19,6 +19,8 @@ #include #include +#include +#include #include "framework/common/ge_inner_error_codes.h" #include "graph/node.h" diff --git a/src/ge/graph/load/new_model_manager/davinci_model.cc b/src/ge/graph/load/new_model_manager/davinci_model.cc index 95d28ef4..236b934a 100644 --- a/src/ge/graph/load/new_model_manager/davinci_model.cc +++ b/src/ge/graph/load/new_model_manager/davinci_model.cc @@ -24,6 +24,8 @@ #include #include #include +#include + #include "common/debug/log.h" #include "common/formats/formats.h" #include "common/formats/utils/formats_trans_utils.h" diff --git a/src/ge/graph/load/new_model_manager/model_manager.cc b/src/ge/graph/load/new_model_manager/model_manager.cc index 70828916..3137d17b 100644 --- a/src/ge/graph/load/new_model_manager/model_manager.cc +++ b/src/ge/graph/load/new_model_manager/model_manager.cc @@ -515,7 +515,6 @@ Status ModelManager::HandleDumpCommand(const Command &command) { std::string dump_model(DUMP_ALL_MODEL); std::string dump_path("/"); std::set dump_layers; - std::string dump_layer_count; auto iter_dump_status = std::find(command.cmd_params.begin(), command.cmd_params.end(), DUMP_STATUS); if (iter_dump_status != command.cmd_params.end()) { diff --git a/src/ge/graph/load/new_model_manager/model_manager.h b/src/ge/graph/load/new_model_manager/model_manager.h index c2d98d10..3aca1605 100644 --- a/src/ge/graph/load/new_model_manager/model_manager.h +++ b/src/ge/graph/load/new_model_manager/model_manager.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "cce/aicpu_engine_struct.h" #include "common/types.h" #include "common/ge_types.h" diff --git a/src/ge/graph/passes/aicpu_constant_folding_pass.h b/src/ge/graph/passes/aicpu_constant_folding_pass.h index c27042fb..615bf060 100644 --- a/src/ge/graph/passes/aicpu_constant_folding_pass.h +++ b/src/ge/graph/passes/aicpu_constant_folding_pass.h @@ -18,6 +18,7 @@ #define GE_GRAPH_PASSES_AICPU_CONSTANT_FOLDING_PASS_H_ #include +#include #include "common/opskernel/ops_kernel_info_store.h" #include "graph/passes/folding_pass.h" diff --git a/src/ge/graph/passes/compile_nodes_pass.h b/src/ge/graph/passes/compile_nodes_pass.h index 56df7b87..30d1d974 100644 --- a/src/ge/graph/passes/compile_nodes_pass.h +++ b/src/ge/graph/passes/compile_nodes_pass.h @@ -19,6 +19,9 @@ #include #include +#include +#include + #include "inc/graph_pass.h" #include "init/gelib.h" diff --git a/src/ge/graph/passes/control_trigger_pass.h b/src/ge/graph/passes/control_trigger_pass.h index 39ee515d..b9fff9b4 100644 --- a/src/ge/graph/passes/control_trigger_pass.h +++ b/src/ge/graph/passes/control_trigger_pass.h @@ -49,4 +49,4 @@ class ControlTriggerPass : public GraphPass { std::unordered_map>> control_trigger_map_; }; } // namespace ge -#endif // GE_GRAPH_PASSES_CONTROL_TRIGGER_PASS_H_ \ No newline at end of file +#endif // GE_GRAPH_PASSES_CONTROL_TRIGGER_PASS_H_ diff --git a/src/ge/graph/passes/folding_kernel/add_kernel.h b/src/ge/graph/passes/folding_kernel/add_kernel.h index 23318c82..f0f4f72f 100644 --- a/src/ge/graph/passes/folding_kernel/add_kernel.h +++ b/src/ge/graph/passes/folding_kernel/add_kernel.h @@ -34,4 +34,4 @@ class AddKernel : public Kernel { std::vector &v_output) override; }; } // namespace ge -#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_ADD_KERNEL_H_ \ No newline at end of file +#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_ADD_KERNEL_H_ diff --git a/src/ge/graph/passes/folding_kernel/concat_offset_kernel.cc b/src/ge/graph/passes/folding_kernel/concat_offset_kernel.cc index fb95e3cf..e734b9dd 100644 --- a/src/ge/graph/passes/folding_kernel/concat_offset_kernel.cc +++ b/src/ge/graph/passes/folding_kernel/concat_offset_kernel.cc @@ -97,4 +97,4 @@ Status ConcatOffsetKernel::Compute(const OpDescPtr op_desc_ptr, const vector(data_dims.size()); const uint8_t *axis_data = axis_tensor->GetData().GetData(); if (axis_data == nullptr) { - GE_LOGE(param axis_data must not be null.); + GE_LOGE("param axis_data must not be null."); return; } int32_t axis = *(const_cast(reinterpret_cast(axis_data))); diff --git a/src/ge/graph/passes/folding_kernel/reduce_prod_kernel.h b/src/ge/graph/passes/folding_kernel/reduce_prod_kernel.h index 4b858b4a..326dd2f5 100644 --- a/src/ge/graph/passes/folding_kernel/reduce_prod_kernel.h +++ b/src/ge/graph/passes/folding_kernel/reduce_prod_kernel.h @@ -42,4 +42,4 @@ class ReduceProdKernel : public Kernel { }; } // namespace ge -#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_REDUCE_PROD_KERNEL_H_ \ No newline at end of file +#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_REDUCE_PROD_KERNEL_H_ diff --git a/src/ge/graph/passes/folding_pass.cc b/src/ge/graph/passes/folding_pass.cc index 9a64fc4f..fef34eb3 100644 --- a/src/ge/graph/passes/folding_pass.cc +++ b/src/ge/graph/passes/folding_pass.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include "framework/common/debug/ge_log.h" #include "graph/utils/graph_utils.h" diff --git a/src/ge/graph/passes/link_gen_mask_nodes_pass.cc b/src/ge/graph/passes/link_gen_mask_nodes_pass.cc index 33e22035..16e8e3d5 100644 --- a/src/ge/graph/passes/link_gen_mask_nodes_pass.cc +++ b/src/ge/graph/passes/link_gen_mask_nodes_pass.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include "common/ge_inner_error_codes.h" #include "framework/common/debug/ge_log.h" diff --git a/src/ge/graph/passes/link_gen_mask_nodes_pass.h b/src/ge/graph/passes/link_gen_mask_nodes_pass.h index 4f24600e..3d37d3e8 100644 --- a/src/ge/graph/passes/link_gen_mask_nodes_pass.h +++ b/src/ge/graph/passes/link_gen_mask_nodes_pass.h @@ -17,6 +17,10 @@ #ifndef GE_GRAPH_PASSES_LINK_GEN_MASK_NODES_PASS_H_ #define GE_GRAPH_PASSES_LINK_GEN_MASK_NODES_PASS_H_ +#include +#include +#include + #include "graph/graph.h" #include "inc/graph_pass.h" diff --git a/src/ge/graph/passes/multi_batch_pass.h b/src/ge/graph/passes/multi_batch_pass.h index fd4e6b57..6e3f5e46 100644 --- a/src/ge/graph/passes/multi_batch_pass.h +++ b/src/ge/graph/passes/multi_batch_pass.h @@ -47,4 +47,4 @@ class MultiBatchPass : public GraphPass { std::vector> batch_head_nodes_; }; } // namespace ge -#endif // GE_GRAPH_PASSES_MULTI_BATCH_PASS_H_ \ No newline at end of file +#endif // GE_GRAPH_PASSES_MULTI_BATCH_PASS_H_ diff --git a/src/ge/graph/passes/print_op_pass.h b/src/ge/graph/passes/print_op_pass.h index bcb62e12..64bf6573 100644 --- a/src/ge/graph/passes/print_op_pass.h +++ b/src/ge/graph/passes/print_op_pass.h @@ -21,7 +21,6 @@ #include "framework/common/types.h" #include "graph/debug/ge_attr_define.h" #include "graph/common/omg_util.h" -#include "graph/debug/ge_attr_define.h" #include "graph/graph.h" #include "graph/passes/base_pass.h" #include "graph/utils/graph_utils.h"