!37463 replace obsolete SliceD with Slice

Merge pull request !37463 from xiaoyao/master
This commit is contained in:
i-robot 2022-07-11 07:04:15 +00:00 committed by Gitee
commit 36ee01794d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 9 deletions

View File

@ -39,12 +39,10 @@ ATTR_MAP(CumprodD) = {{"exclusive", ATTR_DESC(exclusive, AnyTraits<bool>())},
OUTPUT_MAP(CumprodD) = {{0, OUTPUT_DESC(y)}};
REG_ADPT_DESC(CumprodD, kNameCumProd, ADPT_DESC(CumprodD))
INPUT_MAP(SliceD) = {{1, INPUT_DESC(x)}};
INPUT_ATTR_MAP(SliceD) = {{2, ATTR_DESC(offsets, AnyTraits<int64_t>(), AnyTraits<std::vector<int64_t>>())},
{3, ATTR_DESC(size, AnyTraits<int64_t>(), AnyTraits<std::vector<int64_t>>())}};
ATTR_MAP(SliceD) = EMPTY_ATTR_MAP;
OUTPUT_MAP(SliceD) = {{0, OUTPUT_DESC(y)}};
REG_ADPT_DESC(SliceD, kNameSlice, ADPT_DESC(SliceD))
INPUT_MAP(Slice) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(offsets)}, {3, INPUT_DESC(size)}};
ATTR_MAP(Slice) = EMPTY_ATTR_MAP;
OUTPUT_MAP(Slice) = {{0, OUTPUT_DESC(y)}};
REG_ADPT_DESC(Slice, kNameSlice, ADPT_DESC(Slice))
// TopK
INPUT_MAP(TopK) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(k)}};

View File

@ -23,9 +23,8 @@
#include "ops/selection_ops.h"
namespace mindspore::transform {
DECLARE_OP_ADAPTER(SliceD)
DECLARE_OP_USE_INPUT_ATTR(SliceD)
DECLARE_OP_USE_OUTPUT(SliceD)
DECLARE_OP_ADAPTER(Slice)
DECLARE_OP_USE_OUTPUT(Slice)
DECLARE_OP_ADAPTER(ScatterNd)
DECLARE_OP_USE_OUTPUT(ScatterNd)