提交 ebc3f12b 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!620 [Auto parallel] Fix the code-style warnings in parallel-mode

Merge pull request !620 from Xiaoda/fix-codex-bot-warnings
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
namespace mindspore { namespace mindspore {
namespace parallel { namespace parallel {
using RankList = std::vector<int32_t>; using RankList = std::vector<int32_t>;
using Shape = std::vector<int32_t>; using Shape = std::vector<int32_t>;
......
...@@ -1620,7 +1620,6 @@ CNodePtr FindLossCNode(const FuncGraphPtr &func_graph) { ...@@ -1620,7 +1620,6 @@ CNodePtr FindLossCNode(const FuncGraphPtr &func_graph) {
auto pre_cnode = pre_node->cast<CNodePtr>(); auto pre_cnode = pre_node->cast<CNodePtr>();
MS_EXCEPTION_IF_NULL(pre_cnode); MS_EXCEPTION_IF_NULL(pre_cnode);
auto current_prim = GetValueNode<PrimitivePtr>(pre_cnode->input(0)); auto current_prim = GetValueNode<PrimitivePtr>(pre_cnode->input(0));
// return -> cast // return -> cast
if (current_prim->name() == CAST && pre_cnode->operator_info() == nullptr) { if (current_prim->name() == CAST && pre_cnode->operator_info() == nullptr) {
pre_cnode = pre_cnode->input(1)->cast<CNodePtr>(); pre_cnode = pre_cnode->input(1)->cast<CNodePtr>();
......
...@@ -39,7 +39,8 @@ using OperatorList = std::vector<OperatorC>; ...@@ -39,7 +39,8 @@ using OperatorList = std::vector<OperatorC>;
class RedistributionOperatorInfer { class RedistributionOperatorInfer {
public: public:
const int NONE = -1; 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, Status Init(const TensorLayout &tensor_layout, const Map &out_tensor_map, RankList dev_list,
bool is_cost_model = false); bool is_cost_model = false);
~RedistributionOperatorInfer() = default; ~RedistributionOperatorInfer() = default;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册