!7860 Add ReverseV2 op for old backend.

Merge pull request !7860 from liangchenghui/add_reversev2
pull/7860/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 4b5ed8dc86

@ -199,6 +199,7 @@ constexpr const char kNameEditDistance[] = "EditDistance";
constexpr const char kNameCase[] = "Case";
constexpr const char kNameAssert[] = "Assert";
constexpr const char kNameCTCGreedyDecoder[] = "CTCGreedyDecoder";
constexpr const char kNameReverseV2[] = "ReverseV2";
class OpAdapterMap {
public:

@ -14,8 +14,8 @@
* limitations under the License.
*/
#include "transform/graph_ir/op_declare/selection_ops_declare.h"
#include <vector>
#include "transform/graph_ir/op_declare/selection_ops_declare.h"
namespace mindspore::transform {
// CumsumD
@ -133,4 +133,10 @@ INPUT_MAP(UnsortedSegmentMin) = {{1, INPUT_DESC(x)}, {2, INPUT_DESC(segment_ids)
ATTR_MAP(UnsortedSegmentMin) = EMPTY_ATTR_MAP;
OUTPUT_MAP(UnsortedSegmentMin) = {{0, OUTPUT_DESC(y)}};
REG_ADPT_DESC(UnsortedSegmentMin, prim::kPrimUnsortedSegmentMin->name(), ADPT_DESC(UnsortedSegmentMin))
// ReverseV2
INPUT_MAP(ReverseV2D) = {{1, INPUT_DESC(x)}};
ATTR_MAP(ReverseV2D) = {{"axis", ATTR_DESC(axis, AnyTraits<int>(), AnyTraits<std::vector<int64_t>>())}};
OUTPUT_MAP(ReverseV2D) = {{0, OUTPUT_DESC(y)}};
REG_ADPT_DESC(ReverseV2D, kNameReverseV2, ADPT_DESC(ReverseV2D))
} // namespace mindspore::transform

@ -77,5 +77,8 @@ DECLARE_OP_USE_OUTPUT(CumsumD)
DECLARE_OP_ADAPTER(GatherV2)
DECLARE_OP_USE_OUTPUT(GatherV2)
DECLARE_OP_ADAPTER(ReverseV2D)
DECLARE_OP_USE_OUTPUT(ReverseV2D)
} // namespace mindspore::transform
#endif // MINDSPORE_CCSRC_TRANSFORM_GRAPH_IR_OP_DECLARE_SELECTION_OPS_DECLARE_H_

Loading…
Cancel
Save