1 /** 2 * Copyright 2023 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #ifndef MINDSPORE_CCSRC_BACKEND_COMMON_GRAPH_KERNEL_EXPANDER_BASE_META_OP_H_ 17 #define MINDSPORE_CCSRC_BACKEND_COMMON_GRAPH_KERNEL_EXPANDER_BASE_META_OP_H_ 18 #include <string> 19 namespace mindspore::graphkernel::expander { 20 enum class MetaOp : int { 21 Abs = 0, 22 Add, 23 Assign, 24 BroadcastTo, 25 Cast, 26 Concat, 27 Cosh, 28 Div, 29 Equal, 30 Exp, 31 Gather, 32 Greater, 33 GreaterEqual, 34 IsInf, 35 IsNan, 36 Less, 37 LessEqual, 38 Log, 39 LogicalAnd, 40 LogicalNot, 41 LogicalOr, 42 MatMul, 43 Mul, 44 Neg, 45 Reciprocal, 46 ReduceMax, 47 ReduceMin, 48 ReduceSum, 49 Reshape, 50 Rsqrt, 51 Select, 52 Shape, 53 Sinh, 54 Sqrt, 55 StridedSlice, 56 Sub, 57 Tanh, 58 TensorScatterAdd, 59 Transpose, 60 MetaOpNum // max id 61 }; 62 63 inline static std::string MetaOpStr[static_cast<int>(MetaOp::MetaOpNum)] = { 64 "Abs", // MetaOp::Abs 65 "Add", // MetaOp::Add 66 "Assign", // MetaOp::Assign 67 "BroadcastTo", // MetaOp::BroadcastTo 68 "Cast", // MetaOp::Cast 69 "Concat", // MetaOp::Concat 70 "Cosh", // MetaOp::Cosh 71 "Div", // MetaOp::Div 72 "Equal", // MetaOp::Equal 73 "Exp", // MetaOp::Exp 74 "Gather", // MetaOp::Gather 75 "Greater", // MetaOp::Greater 76 "GreaterEqual", // MetaOp::GreaterEqual 77 "IsInf", // MetaOp::IsInf 78 "IsNan", // MetaOp::IsNan 79 "Less", // MetaOp::Less 80 "LessEqual", // MetaOp::LessEqual 81 "Log", // MetaOp::Log 82 "LogicalAnd", // MetaOp::LogicalAnd 83 "LogicalNot", // MetaOp::LogicalNot 84 "LogicalOr", // MetaOp::LogicalOr 85 "MatMul", // MetaOp::MatMul 86 "Mul", // MetaOp::Mul 87 "Neg", // MetaOp::Neg 88 "Reciprocal", // MetaOp::Reciprocal 89 "ReduceMax", // MetaOp::ReduceMax 90 "ReduceMin", // MetaOp::ReduceMin 91 "ReduceSum", // MetaOp::ReduceSum 92 "Reshape", // MetaOp::Reshape 93 "Rsqrt", // MetaOp::Rsqrt 94 "Select", // MetaOp::Select 95 "Shape", // MetaOp::Shape 96 "Sinh", // MetaOp::Sinh 97 "Sqrt", // MetaOp::Sqrt 98 "StridedSlice", // MetaOp::StridedSlice 99 "Sub", // MetaOp::Sub 100 "Tanh", // MetaOp::Tanh 101 "TensorScatterAdd", // MetaOp::TensorScatterAdd 102 "Transpose", // MetaOp::Transpose 103 }; 104 } // namespace mindspore::graphkernel::expander 105 #endif // MINDSPORE_CCSRC_BACKEND_COMMON_GRAPH_KERNEL_EXPANDER_BASE_META_OP_H_ 106