From ec043fcd5643396fed4d61e6290e1be0336aebf6 Mon Sep 17 00:00:00 2001 From: Xiaoda Zhang Date: Thu, 23 Apr 2020 19:12:47 +0800 Subject: [PATCH] fix the codex and bot warnings --- mindspore/ccsrc/parallel/device_matrix.h | 1 - mindspore/ccsrc/parallel/step_parallel.cc | 1 - .../parallel/tensor_layout/redistribution_operator_infer.h | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mindspore/ccsrc/parallel/device_matrix.h b/mindspore/ccsrc/parallel/device_matrix.h index 236a7fad08..295bf33836 100644 --- a/mindspore/ccsrc/parallel/device_matrix.h +++ b/mindspore/ccsrc/parallel/device_matrix.h @@ -26,7 +26,6 @@ namespace mindspore { namespace parallel { - using RankList = std::vector; using Shape = std::vector; diff --git a/mindspore/ccsrc/parallel/step_parallel.cc b/mindspore/ccsrc/parallel/step_parallel.cc index c24c14abf6..7731c68ca5 100644 --- a/mindspore/ccsrc/parallel/step_parallel.cc +++ b/mindspore/ccsrc/parallel/step_parallel.cc @@ -1620,7 +1620,6 @@ CNodePtr FindLossCNode(const FuncGraphPtr &func_graph) { auto pre_cnode = pre_node->cast(); MS_EXCEPTION_IF_NULL(pre_cnode); auto current_prim = GetValueNode(pre_cnode->input(0)); - // return -> cast if (current_prim->name() == CAST && pre_cnode->operator_info() == nullptr) { pre_cnode = pre_cnode->input(1)->cast(); diff --git a/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h b/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h index a96097a1d3..37a8ac3d9e 100644 --- a/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h +++ b/mindspore/ccsrc/parallel/tensor_layout/redistribution_operator_infer.h @@ -39,7 +39,8 @@ using OperatorList = std::vector; class RedistributionOperatorInfer { public: const int NONE = -1; - explicit RedistributionOperatorInfer(bool construct_op_flag = true) : construct_op_flag_(construct_op_flag) {} + explicit RedistributionOperatorInfer(bool construct_op_flag = true) + : construct_op_flag_(construct_op_flag), is_cost_model_(false) {} Status Init(const TensorLayout &tensor_layout, const Map &out_tensor_map, RankList dev_list, bool is_cost_model = false); ~RedistributionOperatorInfer() = default;