static check clean

pull/14/head
wangcong 5 years ago
parent fcbc376d5a
commit cd4eeb38e9

@ -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_

@ -18,6 +18,7 @@
#define INC_FRAMEWORK_COMMON_OP_ATTR_VALUE_UTIL_H_
#include <unordered_map>
#include <string>
#include <google/protobuf/map.h>
#include "graph/debug/ge_attr_define.h"
#include "common/types.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

@ -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 {}
};

@ -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());
}
}

@ -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
/// *: Remind: stack is reverse-order
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) {
// If not found in 'inputs_order_', skip it
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();
// Get all anchor point nodes and switch nodes
for (const auto &node_ptr : graph->GetAllNodes()) {
std::vector<bool> is_node_set_format;
if (node_ptr == nullptr) {
return GRAPH_FAILED;
}

@ -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 {

@ -22,7 +22,6 @@
#include <queue>
#include <set>
//#include "./array_ops.h"
#include "debug/ge_log.h"
#include "debug/ge_op_types.h"
#include "debug/ge_util.h"

@ -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"

@ -14,6 +14,10 @@
* limitations under the License.
*/
#include <vector>
#include <utility>
#include <map>
#include "graph/load/new_model_manager/data_dumper.h"
#include "graph/utils/attr_utils.h"
#include "graph/debug/ge_attr_define.h"

@ -19,6 +19,8 @@
#include <string>
#include <memory>
#include <vector>
#include <map>
#include "framework/common/ge_inner_error_codes.h"
#include "graph/node.h"

@ -24,6 +24,8 @@
#include <securec.h>
#include <sys/prctl.h>
#include <map>
#include <algorithm>
#include "common/debug/log.h"
#include "common/formats/formats.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_path("/");
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);
if (iter_dump_status != command.cmd_params.end()) {

@ -24,6 +24,7 @@
#include <memory>
#include <set>
#include <vector>
#include <string>
#include "cce/aicpu_engine_struct.h"
#include "common/types.h"
#include "common/ge_types.h"

@ -18,6 +18,7 @@
#define GE_GRAPH_PASSES_AICPU_CONSTANT_FOLDING_PASS_H_
#include <vector>
#include <string>
#include "common/opskernel/ops_kernel_info_store.h"
#include "graph/passes/folding_pass.h"

@ -19,6 +19,9 @@
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "inc/graph_pass.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_;
};
} // 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;
};
} // 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;
}
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());
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<int32_t *>(reinterpret_cast<const int32_t *>(axis_data)));

@ -42,4 +42,4 @@ class ReduceProdKernel : public Kernel {
};
} // 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 <utility>
#include <vector>
#include <unordered_set>
#include "framework/common/debug/ge_log.h"
#include "graph/utils/graph_utils.h"

@ -19,6 +19,7 @@
#include <set>
#include <string>
#include <vector>
#include <map>
#include "common/ge_inner_error_codes.h"
#include "framework/common/debug/ge_log.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 <vector>
#include <map>
#include <string>
#include "graph/graph.h"
#include "inc/graph_pass.h"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save