@@ -89,6 +89,6 @@ typedef enum tagHiAiNpuModuleId { | |||||
#define HIAI_NPU_ERR_CODE_HEAD(npuLocal, codeType, errLevel, moduleId) \ | #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_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_ | #endif // INC_COMMON_NPU_ERROR_DEFINE_H_ |
@@ -18,6 +18,7 @@ | |||||
#define INC_FRAMEWORK_COMMON_OP_ATTR_VALUE_UTIL_H_ | #define INC_FRAMEWORK_COMMON_OP_ATTR_VALUE_UTIL_H_ | ||||
#include <unordered_map> | #include <unordered_map> | ||||
#include <string> | |||||
#include <google/protobuf/map.h> | #include <google/protobuf/map.h> | ||||
#include "graph/debug/ge_attr_define.h" | #include "graph/debug/ge_attr_define.h" | ||||
#include "common/types.h" | #include "common/types.h" | ||||
@@ -172,7 +172,7 @@ class OpUtils { | |||||
/// | /// | ||||
/// @ingroup domi_omg | /// @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] input Weight data in HWCK format | ||||
/// @param [in] H value of H dimension | /// @param [in] H value of H dimension | ||||
/// @param [in] W value of W 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); | static void TransDataHWCK2KCHW(const void *input, int64_t H, int64_t W, int64_t C, int64_t K, void **output); | ||||
/// | /// | ||||
/// @ingroup domi_omg | /// @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] input Weight data in HWCK format | ||||
/// @param [in] K value of K dimension | /// @param [in] K value of K dimension | ||||
/// @param [in] C value of C dimension | /// @param [in] C value of C dimension | ||||
@@ -238,13 +238,13 @@ class EventWaitTaskInfo : public EventTaskInfo { | |||||
class FusionStartTaskInfo : public TaskInfo { | class FusionStartTaskInfo : public TaskInfo { | ||||
public: | 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 {} | ~FusionStartTaskInfo() override {} | ||||
}; | }; | ||||
class FusionEndTaskInfo : public TaskInfo { | class FusionEndTaskInfo : public TaskInfo { | ||||
public: | 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 {} | ~FusionEndTaskInfo() override {} | ||||
}; | }; | ||||
@@ -51,7 +51,6 @@ void Anchor::UnlinkAll() noexcept { | |||||
if (Unlink(peer_anchor_ptr) != GRAPH_SUCCESS) { | if (Unlink(peer_anchor_ptr) != GRAPH_SUCCESS) { | ||||
GELOGW("unlink peer_anchor_ptr failed."); | GELOGW("unlink peer_anchor_ptr failed."); | ||||
} | } | ||||
} while (!peer_anchors_.empty()); | } while (!peer_anchors_.empty()); | ||||
} | } | ||||
} | } | ||||
@@ -640,7 +640,7 @@ graphStatus ComputeGraph::SortNodes(std::vector<NodePtr> &stack, std::map<NodePt | |||||
/// 2. Compare two indices, if not match, swap the positions of two inputs | /// 2. Compare two indices, if not match, swap the positions of two inputs | ||||
/// *: Remind: stack is reverse-order | /// *: Remind: stack is reverse-order | ||||
for (size_t i = 0; i < stack.size(); ++i) { | for (size_t i = 0; i < stack.size(); ++i) { | ||||
//[stack: should not be null] | |||||
// [stack: should not be null] | |||||
for (size_t j = i + 1; j < stack.size(); ++j) { | for (size_t j = i + 1; j < stack.size(); ++j) { | ||||
// If not found in 'inputs_order_', skip it | // If not found in 'inputs_order_', skip it | ||||
auto it_i = std::find(inputs_order_.begin(), inputs_order_.end(), stack[i]->GetName()); | auto it_i = std::find(inputs_order_.begin(), inputs_order_.end(), stack[i]->GetName()); | ||||
@@ -67,7 +67,6 @@ graphStatus FormatRefiner::GetAnchorPoints(const ge::ComputeGraphPtr &graph, std | |||||
anchor_points.clear(); | anchor_points.clear(); | ||||
// Get all anchor point nodes and switch nodes | // Get all anchor point nodes and switch nodes | ||||
for (const auto &node_ptr : graph->GetAllNodes()) { | for (const auto &node_ptr : graph->GetAllNodes()) { | ||||
std::vector<bool> is_node_set_format; | |||||
if (node_ptr == nullptr) { | if (node_ptr == nullptr) { | ||||
return GRAPH_FAILED; | return GRAPH_FAILED; | ||||
} | } | ||||
@@ -20,7 +20,8 @@ | |||||
#include "debug/ge_log.h" | #include "debug/ge_log.h" | ||||
#include "debug/ge_util.h" | #include "debug/ge_util.h" | ||||
using namespace std; | |||||
using std::vector; | |||||
using std::function; | |||||
namespace ge { | namespace ge { | ||||
@@ -22,7 +22,6 @@ | |||||
#include <queue> | #include <queue> | ||||
#include <set> | #include <set> | ||||
//#include "./array_ops.h" | |||||
#include "debug/ge_log.h" | #include "debug/ge_log.h" | ||||
#include "debug/ge_op_types.h" | #include "debug/ge_op_types.h" | ||||
#include "debug/ge_util.h" | #include "debug/ge_util.h" | ||||
@@ -20,8 +20,6 @@ | |||||
#include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
#include "common/ge_inner_error_codes.h" | #include "common/ge_inner_error_codes.h" | ||||
#include "common/ge/ge_util.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/tensor_utils.h" | ||||
#include "graph/utils/type_utils.h" | #include "graph/utils/type_utils.h" | ||||
#include "op/op_factory.h" | #include "op/op_factory.h" | ||||
@@ -14,6 +14,10 @@ | |||||
* limitations under the License. | * limitations under the License. | ||||
*/ | */ | ||||
#include <vector> | |||||
#include <utility> | |||||
#include <map> | |||||
#include "graph/load/new_model_manager/data_dumper.h" | #include "graph/load/new_model_manager/data_dumper.h" | ||||
#include "graph/utils/attr_utils.h" | #include "graph/utils/attr_utils.h" | ||||
#include "graph/debug/ge_attr_define.h" | #include "graph/debug/ge_attr_define.h" | ||||
@@ -19,6 +19,8 @@ | |||||
#include <string> | #include <string> | ||||
#include <memory> | #include <memory> | ||||
#include <vector> | |||||
#include <map> | |||||
#include "framework/common/ge_inner_error_codes.h" | #include "framework/common/ge_inner_error_codes.h" | ||||
#include "graph/node.h" | #include "graph/node.h" | ||||
@@ -24,6 +24,8 @@ | |||||
#include <securec.h> | #include <securec.h> | ||||
#include <sys/prctl.h> | #include <sys/prctl.h> | ||||
#include <map> | #include <map> | ||||
#include <algorithm> | |||||
#include "common/debug/log.h" | #include "common/debug/log.h" | ||||
#include "common/formats/formats.h" | #include "common/formats/formats.h" | ||||
#include "common/formats/utils/formats_trans_utils.h" | #include "common/formats/utils/formats_trans_utils.h" | ||||
@@ -515,7 +515,6 @@ Status ModelManager::HandleDumpCommand(const Command &command) { | |||||
std::string dump_model(DUMP_ALL_MODEL); | std::string dump_model(DUMP_ALL_MODEL); | ||||
std::string dump_path("/"); | std::string dump_path("/"); | ||||
std::set<std::string> dump_layers; | std::set<std::string> dump_layers; | ||||
std::string dump_layer_count; | |||||
auto iter_dump_status = std::find(command.cmd_params.begin(), command.cmd_params.end(), DUMP_STATUS); | auto iter_dump_status = std::find(command.cmd_params.begin(), command.cmd_params.end(), DUMP_STATUS); | ||||
if (iter_dump_status != command.cmd_params.end()) { | if (iter_dump_status != command.cmd_params.end()) { | ||||
@@ -24,6 +24,7 @@ | |||||
#include <memory> | #include <memory> | ||||
#include <set> | #include <set> | ||||
#include <vector> | #include <vector> | ||||
#include <string> | |||||
#include "cce/aicpu_engine_struct.h" | #include "cce/aicpu_engine_struct.h" | ||||
#include "common/types.h" | #include "common/types.h" | ||||
#include "common/ge_types.h" | #include "common/ge_types.h" | ||||
@@ -18,6 +18,7 @@ | |||||
#define GE_GRAPH_PASSES_AICPU_CONSTANT_FOLDING_PASS_H_ | #define GE_GRAPH_PASSES_AICPU_CONSTANT_FOLDING_PASS_H_ | ||||
#include <vector> | #include <vector> | ||||
#include <string> | |||||
#include "common/opskernel/ops_kernel_info_store.h" | #include "common/opskernel/ops_kernel_info_store.h" | ||||
#include "graph/passes/folding_pass.h" | #include "graph/passes/folding_pass.h" | ||||
@@ -19,6 +19,9 @@ | |||||
#include <memory> | #include <memory> | ||||
#include <string> | #include <string> | ||||
#include <unordered_map> | |||||
#include <vector> | |||||
#include "inc/graph_pass.h" | #include "inc/graph_pass.h" | ||||
#include "init/gelib.h" | #include "init/gelib.h" | ||||
@@ -49,4 +49,4 @@ class ControlTriggerPass : public GraphPass { | |||||
std::unordered_map<NodePtr, std::unordered_map<NodePtr, std::pair<NodePtr, NodePtr>>> control_trigger_map_; | std::unordered_map<NodePtr, std::unordered_map<NodePtr, std::pair<NodePtr, NodePtr>>> control_trigger_map_; | ||||
}; | }; | ||||
} // namespace ge | } // namespace ge | ||||
#endif // GE_GRAPH_PASSES_CONTROL_TRIGGER_PASS_H_ | |||||
#endif // GE_GRAPH_PASSES_CONTROL_TRIGGER_PASS_H_ |
@@ -34,4 +34,4 @@ class AddKernel : public Kernel { | |||||
std::vector<ge::GeTensorPtr> &v_output) override; | std::vector<ge::GeTensorPtr> &v_output) override; | ||||
}; | }; | ||||
} // namespace ge | } // namespace ge | ||||
#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_ADD_KERNEL_H_ | |||||
#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_ADD_KERNEL_H_ |
@@ -97,4 +97,4 @@ Status ConcatOffsetKernel::Compute(const OpDescPtr op_desc_ptr, const vector<Con | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
REGISTER_KERNEL(CONCATOFFSET, ConcatOffsetKernel); | REGISTER_KERNEL(CONCATOFFSET, ConcatOffsetKernel); | ||||
} // namespace ge | |||||
} // namespace ge |
@@ -163,7 +163,7 @@ void ReduceProdKernel::ShapeCal(const ge::OpDescPtr &op_desc_ptr, const std::vec | |||||
int32_t data_dim_size = static_cast<int32_t>(data_dims.size()); | int32_t data_dim_size = static_cast<int32_t>(data_dims.size()); | ||||
const uint8_t *axis_data = axis_tensor->GetData().GetData(); | const uint8_t *axis_data = axis_tensor->GetData().GetData(); | ||||
if (axis_data == nullptr) { | if (axis_data == nullptr) { | ||||
GE_LOGE(param axis_data must not be null.); | |||||
GE_LOGE("param axis_data must not be null."); | |||||
return; | return; | ||||
} | } | ||||
int32_t axis = *(const_cast<int32_t *>(reinterpret_cast<const int32_t *>(axis_data))); | int32_t axis = *(const_cast<int32_t *>(reinterpret_cast<const int32_t *>(axis_data))); | ||||
@@ -42,4 +42,4 @@ class ReduceProdKernel : public Kernel { | |||||
}; | }; | ||||
} // namespace ge | } // namespace ge | ||||
#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_REDUCE_PROD_KERNEL_H_ | |||||
#endif // GE_GRAPH_PASSES_FOLDING_KERNEL_REDUCE_PROD_KERNEL_H_ |
@@ -20,6 +20,7 @@ | |||||
#include <string> | #include <string> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
#include <unordered_set> | |||||
#include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
#include "graph/utils/graph_utils.h" | #include "graph/utils/graph_utils.h" | ||||
@@ -19,6 +19,7 @@ | |||||
#include <set> | #include <set> | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
#include <map> | |||||
#include "common/ge_inner_error_codes.h" | #include "common/ge_inner_error_codes.h" | ||||
#include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
@@ -17,6 +17,10 @@ | |||||
#ifndef GE_GRAPH_PASSES_LINK_GEN_MASK_NODES_PASS_H_ | #ifndef GE_GRAPH_PASSES_LINK_GEN_MASK_NODES_PASS_H_ | ||||
#define GE_GRAPH_PASSES_LINK_GEN_MASK_NODES_PASS_H_ | #define GE_GRAPH_PASSES_LINK_GEN_MASK_NODES_PASS_H_ | ||||
#include <vector> | |||||
#include <map> | |||||
#include <string> | |||||
#include "graph/graph.h" | #include "graph/graph.h" | ||||
#include "inc/graph_pass.h" | #include "inc/graph_pass.h" | ||||
@@ -47,4 +47,4 @@ class MultiBatchPass : public GraphPass { | |||||
std::vector<std::vector<NodePtr>> batch_head_nodes_; | std::vector<std::vector<NodePtr>> batch_head_nodes_; | ||||
}; | }; | ||||
} // namespace ge | } // namespace ge | ||||
#endif // GE_GRAPH_PASSES_MULTI_BATCH_PASS_H_ | |||||
#endif // GE_GRAPH_PASSES_MULTI_BATCH_PASS_H_ |
@@ -21,7 +21,6 @@ | |||||
#include "framework/common/types.h" | #include "framework/common/types.h" | ||||
#include "graph/debug/ge_attr_define.h" | #include "graph/debug/ge_attr_define.h" | ||||
#include "graph/common/omg_util.h" | #include "graph/common/omg_util.h" | ||||
#include "graph/debug/ge_attr_define.h" | |||||
#include "graph/graph.h" | #include "graph/graph.h" | ||||
#include "graph/passes/base_pass.h" | #include "graph/passes/base_pass.h" | ||||
#include "graph/utils/graph_utils.h" | #include "graph/utils/graph_utils.h" | ||||