From 99a94bfd01d32c6b39026cee7fa1ee4fcd44aedf Mon Sep 17 00:00:00 2001 From: zhoufeng Date: Mon, 24 Aug 2020 14:38:47 +0800 Subject: [PATCH] clean static check Signed-off-by: zhoufeng --- .../kernel_compiler/tbe/tbe_kernel_select/tbe_kernel_select.cc | 1 - mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc | 3 ++- mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.h | 2 +- mindspore/ccsrc/transform/graph_ir/convert.cc | 1 - mindspore/ccsrc/transform/graph_ir/op_adapter_map.h | 1 - 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_select/tbe_kernel_select.cc b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_select/tbe_kernel_select.cc index 9f19de9d013..da366cecacf 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_select/tbe_kernel_select.cc +++ b/mindspore/ccsrc/backend/kernel_compiler/tbe/tbe_kernel_select/tbe_kernel_select.cc @@ -364,7 +364,6 @@ bool TbeKernelSelect::GenBuilderItem(bool is_input, size_t kernel_build_info_ind } dynamic_input_index++; real_io_tensor_index += dynamic_input_size; - } else { if (ios_info.size() != 1) { MS_LOG(EXCEPTION) << "if output is dynamic, so output must has one output."; diff --git a/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc b/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc index 3307e86028b..65216a83c7a 100644 --- a/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc +++ b/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc @@ -18,6 +18,7 @@ #include #include #include +#include #include "utility" #include "backend/session/anf_runtime_algorithm.h" #include "runtime/mem.h" @@ -226,7 +227,7 @@ void DataDumper::ConstructDumpTask(NotNull kernel, NotNull dump_info) const { +void DataDumper::SetOpDebugMappingInfo(const NotNull dump_info) const { MS_LOG(INFO) << "[DataDump] Add op debug info to OpMappingInfo, task id = " << debug_task_id_ << ", stream id = " << debug_stream_id_; aicpu::dump::Task task; diff --git a/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.h b/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.h index 5dbbb92a784..27b1381f2d5 100644 --- a/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.h +++ b/mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.h @@ -61,7 +61,7 @@ class DataDumper { void ReleaseDevMem(void **ptr) const; bool KernelNeedDump(const CNodePtr &kernel) const; void SetOpMappingInfo(NotNull dump_info) const; - void SetOpDebugMappingInfo(NotNull dump_info) const; + void SetOpDebugMappingInfo(const NotNull dump_info) const; void ConstructDumpTask(NotNull kernel, NotNull dump_task) const; std::function model_handle_; diff --git a/mindspore/ccsrc/transform/graph_ir/convert.cc b/mindspore/ccsrc/transform/graph_ir/convert.cc index e1fb6d0ee00..86f24c92e1d 100644 --- a/mindspore/ccsrc/transform/graph_ir/convert.cc +++ b/mindspore/ccsrc/transform/graph_ir/convert.cc @@ -1705,6 +1705,5 @@ void DfGraphConvertor::RegisterAdapter(const std::string &name, OpAdapterPtr adp void DfGraphConvertor::RegisterAdapter(const std::string &name, OpAdapterPtr train_adpt, OpAdapterPtr infer_adpt) { OpAdapterMap::get()[name] = std::make_shared(train_adpt, infer_adpt); } - } // namespace transform } // namespace mindspore diff --git a/mindspore/ccsrc/transform/graph_ir/op_adapter_map.h b/mindspore/ccsrc/transform/graph_ir/op_adapter_map.h index 2e5776bf4f9..f00e78ff783 100644 --- a/mindspore/ccsrc/transform/graph_ir/op_adapter_map.h +++ b/mindspore/ccsrc/transform/graph_ir/op_adapter_map.h @@ -202,7 +202,6 @@ class OpAdapterMap { private: static std::unordered_map adpt_map_; }; - } // namespace transform } // namespace mindspore #endif // MINDSPORE_CCSRC_TRANSFORM_GRAPH_IR_OP_ADAPTER_MAP_H_