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

!576 modify ReduceAll to dock ReduceAllD in GE

Merge pull request !576 from zhangbuxue/modify_ReduceAll_dock_ReduceAllD_with_ge
......@@ -269,7 +269,7 @@ std::unordered_map<std::string, OpAdapterDescPtr> &DfGraphConvertor::get_adpt_ma
{string(kNameArgMinWithValue), ADPT_DESC(ArgMinWithValue)},
{prim::kPrimReduceSum->name(), ADPT_DESC(ReduceSumD)},
{prim::kPrimReduceMean->name(), ADPT_DESC(ReduceMeanD)},
{prim::kPrimReduceAll->name(), ADPT_DESC(ReduceAll)},
{prim::kPrimReduceAll->name(), ADPT_DESC(ReduceAllD)},
{prim::kPrimReduceMin->name(), ADPT_DESC(ReduceMinD)},
{prim::kPrimReduceMax->name(), ADPT_DESC(ReduceMaxD)},
{string(kNameLARSUpdate), ADPT_DESC(LarsV2Update)},
......
......@@ -268,11 +268,6 @@ INPUT_MAP(GatherV2) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(indices)}, {3, INPUT_D
ATTR_MAP(GatherV2) = EMPTY_ATTR_MAP;
OUTPUT_MAP(GatherV2) = {{0, OUTPUT_DESC(y)}};
// ReduceSum
INPUT_MAP(ReduceSum) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(axis)}};
ATTR_MAP(ReduceSum) = {{"keep_dims", ATTR_DESC(keep_dims, AnyTraits<bool>())}};
OUTPUT_MAP(ReduceSum) = {{0, OUTPUT_DESC(y)}};
// ReduceSumD
INPUT_MAP(ReduceSumD) = {{1, INPUT_DESC(x)}};
INPUT_ATTR_MAP(ReduceSumD) = {
......@@ -653,10 +648,12 @@ ATTR_MAP(ArgMinWithValue) = {{"axis", ATTR_DESC(dimension, AnyTraits<int>())},
{"keep_dims", ATTR_DESC(keep_dims, AnyTraits<bool>())}};
OUTPUT_MAP(ArgMinWithValue) = {{0, OUTPUT_DESC(indice)}, {1, OUTPUT_DESC(values)}};
// ReduceAll
INPUT_MAP(ReduceAll) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(axis)}};
ATTR_MAP(ReduceAll) = {{"keep_dims", ATTR_DESC(keep_dims, AnyTraits<bool>())}};
OUTPUT_MAP(ReduceAll) = {{0, OUTPUT_DESC(y)}};
// ReduceAllD
INPUT_MAP(ReduceAllD) = {{1, INPUT_DESC(x)}};
INPUT_ATTR_MAP(ReduceAllD) = {
{2, ATTR_DESC(axis, AnyTraits<std::vector<int64_t>>(), AnyTraits<std::vector<int64_t>>())}};
ATTR_MAP(ReduceAllD) = {{"keep_dims", ATTR_DESC(keep_dims, AnyTraits<bool>())}};
OUTPUT_MAP(ReduceAllD) = {{0, OUTPUT_DESC(y)}};
// ReduceMeanD
INPUT_MAP(ReduceMeanD) = {{1, INPUT_DESC(x)}};
......
......@@ -346,10 +346,9 @@ DECLARE_OP_USE_OUTPUT(Sin)
DECLARE_OP_ADAPTER(Exp)
DECLARE_OP_USE_OUTPUT(Exp)
DECLARE_OP_ADAPTER(ReduceAll)
DECLARE_OP_USE_OUTPUT(ReduceAll)
DECLARE_OP_ADAPTER(ReduceSum)
DECLARE_OP_USE_OUTPUT(ReduceSum)
DECLARE_OP_ADAPTER(ReduceAllD)
DECLARE_OP_USE_INPUT_ATTR(ReduceAllD)
DECLARE_OP_USE_OUTPUT(ReduceAllD)
DECLARE_OP_ADAPTER(ReduceSumD)
DECLARE_OP_USE_INPUT_ATTR(ReduceSumD)
DECLARE_OP_USE_OUTPUT(ReduceSumD)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册