From 82c5daa94781ae71c468cc32419a3ad5f099fbc3 Mon Sep 17 00:00:00 2001 From: geekun Date: Fri, 24 Apr 2020 18:02:16 +0800 Subject: [PATCH] fix codedex for mindspore/vm,transform,util,operator --- mindspore/ccsrc/operator/composite/composite.h | 1 - mindspore/ccsrc/operator/composite/unpack_call.cc | 1 - mindspore/ccsrc/transform/convert.h | 1 - mindspore/ccsrc/utils/any.cc | 2 +- mindspore/ccsrc/utils/callbacks.cc | 1 - mindspore/ccsrc/utils/callbacks_ge.cc | 1 - mindspore/ccsrc/utils/callbacks_ge.h | 2 -- mindspore/ccsrc/utils/convert_utils.cc | 2 +- mindspore/ccsrc/utils/log_adapter.cc | 2 +- 9 files changed, 3 insertions(+), 10 deletions(-) diff --git a/mindspore/ccsrc/operator/composite/composite.h b/mindspore/ccsrc/operator/composite/composite.h index 429cf5341..6c4bede82 100644 --- a/mindspore/ccsrc/operator/composite/composite.h +++ b/mindspore/ccsrc/operator/composite/composite.h @@ -210,7 +210,6 @@ class TensorSlice : public MetaFuncGraph { FuncGraphPtr ExpandADim(const FuncGraphPtr &ret_graph, const AnfNodePtr &tensor_node) const; }; using TensorSlicePtr = std::shared_ptr; - } // namespace prim } // namespace mindspore diff --git a/mindspore/ccsrc/operator/composite/unpack_call.cc b/mindspore/ccsrc/operator/composite/unpack_call.cc index 122f27665..6363d495c 100644 --- a/mindspore/ccsrc/operator/composite/unpack_call.cc +++ b/mindspore/ccsrc/operator/composite/unpack_call.cc @@ -89,6 +89,5 @@ REGISTER_PYBIND_DEFINE(UnpackCall_, ([](const py::module *m) { (void)py::class_>(*m, "UnpackCall_") .def(py::init()); })); - } // namespace prim } // namespace mindspore diff --git a/mindspore/ccsrc/transform/convert.h b/mindspore/ccsrc/transform/convert.h index 5596e20f1..39efd5d28 100644 --- a/mindspore/ccsrc/transform/convert.h +++ b/mindspore/ccsrc/transform/convert.h @@ -252,7 +252,6 @@ class DfGraphConvertor { bool training_ = false; bool distribute_ = false; }; - } // namespace transform } // namespace mindspore diff --git a/mindspore/ccsrc/utils/any.cc b/mindspore/ccsrc/utils/any.cc index 3cb89f5dd..80b8d8665 100644 --- a/mindspore/ccsrc/utils/any.cc +++ b/mindspore/ccsrc/utils/any.cc @@ -26,7 +26,7 @@ bool AnyIsLiteral(const Any &any) { static const std::type_index typeid_float = std::type_index(typeid(float)); static const std::type_index typeid_bool = std::type_index(typeid(bool)); - std::type_index typeid_any = std::type_index(any.type()); + auto typeid_any = std::type_index(any.type()); return typeid_int == typeid_any || typeid_float == typeid_any || typeid_bool == typeid_any; } diff --git a/mindspore/ccsrc/utils/callbacks.cc b/mindspore/ccsrc/utils/callbacks.cc index 06bf1c73a..ad9751c33 100644 --- a/mindspore/ccsrc/utils/callbacks.cc +++ b/mindspore/ccsrc/utils/callbacks.cc @@ -26,7 +26,6 @@ namespace mindspore { namespace callbacks { - const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback"; const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op"; const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op"; diff --git a/mindspore/ccsrc/utils/callbacks_ge.cc b/mindspore/ccsrc/utils/callbacks_ge.cc index b4c9fda63..da817b3f7 100644 --- a/mindspore/ccsrc/utils/callbacks_ge.cc +++ b/mindspore/ccsrc/utils/callbacks_ge.cc @@ -24,7 +24,6 @@ namespace mindspore { namespace callbacks { - const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback"; const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op"; const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op"; diff --git a/mindspore/ccsrc/utils/callbacks_ge.h b/mindspore/ccsrc/utils/callbacks_ge.h index 08f5bb59d..f9088f3f5 100644 --- a/mindspore/ccsrc/utils/callbacks_ge.h +++ b/mindspore/ccsrc/utils/callbacks_ge.h @@ -26,12 +26,10 @@ namespace mindspore { namespace callbacks { - using mindspore::tensor::TensorPtr; uint32_t CheckpointSaveCallback(uint32_t, const std::map &); uint32_t SummarySaveCallback(uint32_t, const std::map &); - } // namespace callbacks } // namespace mindspore diff --git a/mindspore/ccsrc/utils/convert_utils.cc b/mindspore/ccsrc/utils/convert_utils.cc index 049c1dcdb..df4a8656f 100644 --- a/mindspore/ccsrc/utils/convert_utils.cc +++ b/mindspore/ccsrc/utils/convert_utils.cc @@ -335,7 +335,7 @@ py::object VectorRefToPyData(const VectorRef &value_list) { py::object ret; MS_LOG(DEBUG) << "vector_ref"; size_t value_size = value_list.size(); - py::tuple ref_tuple = py::tuple(value_size); + auto ref_tuple = py::tuple(value_size); for (size_t i = 0; i < value_size; i++) { ref_tuple[i] = BaseRefToPyData(value_list[i]); } diff --git a/mindspore/ccsrc/utils/log_adapter.cc b/mindspore/ccsrc/utils/log_adapter.cc index deb4f3838..b23916b4f 100644 --- a/mindspore/ccsrc/utils/log_adapter.cc +++ b/mindspore/ccsrc/utils/log_adapter.cc @@ -35,7 +35,7 @@ static std::string GetTime() { now_time.tm_hour, now_time.tm_min, now_time.tm_sec); #else struct timeval cur_time; - (void)gettimeofday(&cur_time, NULL); + (void)gettimeofday(&cur_time, nullptr); struct tm now; (void)localtime_r(&cur_time.tv_sec, &now); -- GitLab