From e331f1d7ef328f2321e12706789570b680e8961f Mon Sep 17 00:00:00 2001 From: "haoran.wang" Date: Mon, 29 Nov 2021 09:48:36 +0000 Subject: [PATCH] new op type of Pangu-alpha supported in D-Rec --- .../parallel/auto_parallel/rec_core/rec_graph.h | 2 ++ .../auto_parallel/rec_core/rec_parse_graph.h | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_graph.h b/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_graph.h index 2e1a8db0423..4be22244309 100644 --- a/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_graph.h +++ b/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_graph.h @@ -51,6 +51,8 @@ enum OperatorType { kRecReduce, kRecPReLU, kRecGatherV2, + kRecExpandDims, + kRecStridedSlice, kRecArgWithValue, kRecUnsortedSegmentOp }; diff --git a/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_parse_graph.h b/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_parse_graph.h index 63926c96784..1651a88e800 100644 --- a/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_parse_graph.h +++ b/mindspore/ccsrc/frontend/parallel/auto_parallel/rec_core/rec_parse_graph.h @@ -30,11 +30,11 @@ namespace mindspore { namespace parallel { static const std::set ElementWiseOpType = { - OperatorType::kRecReLU, OperatorType::kRecLog, OperatorType::kRecExp, OperatorType::kRecAdd, - OperatorType::kRecElmWiseOp, OperatorType::kRecBiasAdd, OperatorType::kRecSub, OperatorType::kRecMul, - OperatorType::kRecDiv, OperatorType::kRecSqueeze, OperatorType::kRecReduce, OperatorType::kRecCast, - OperatorType::kRecReshape, OperatorType::kRecGatherV2, OperatorType::kRecArgWithValue, OperatorType::kRecSoftmax, - OperatorType::kRecOneHot}; + OperatorType::kRecReLU, OperatorType::kRecLog, OperatorType::kRecExp, OperatorType::kRecAdd, + OperatorType::kRecElmWiseOp, OperatorType::kRecBiasAdd, OperatorType::kRecSub, OperatorType::kRecMul, + OperatorType::kRecDiv, OperatorType::kRecSqueeze, OperatorType::kRecReduce, OperatorType::kRecCast, + OperatorType::kRecReshape, OperatorType::kRecGatherV2, OperatorType::kRecArgWithValue, OperatorType::kRecSoftmax, + OperatorType::kRecOneHot, OperatorType::kRecExpandDims, OperatorType::kRecStridedSlice}; const std::map DictOpType{ {MATMUL, OperatorType::kRecMatMul}, @@ -57,6 +57,8 @@ const std::map DictOpType{ {REDUCE_MIN, OperatorType::kRecReduce}, {REDUCE_MEAN, OperatorType::kRecReduce}, {GATHERV2, OperatorType::kRecGatherV2}, + {EXPAND_DIMS, OperatorType::kRecExpandDims}, + {STRIDEDSLICE, OperatorType::kRecStridedSlice}, {ARGMAXWITHVALUE, OperatorType::kRecArgWithValue}, {ARGMINWITHVALUE, OperatorType::kRecArgWithValue}, {UNSORTED_SEGMENT_SUM, OperatorType::kRecUnsortedSegmentOp}, @@ -145,6 +147,7 @@ const std::map DictOpType{ {ASSIGN_SUB, OperatorType::kRecElmWiseOp}, {"AssignAdd", OperatorType::kRecElmWiseOp}, {DROPOUT_DO_MASK, OperatorType::kRecElmWiseOp}, + {DROPOUT, OperatorType::kRecElmWiseOp}, {STACK, OperatorType::kRecElmWiseOp}}; const TensorParam MakeTensor(int64_t n, int64_t c, int64_t h, int64_t w);