Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
# ==============================================================================
import pprint
from enum import Enum
from typing import Dict, Any, Tuple, Optional

from pydantic import BaseModel, root_validator, model_validator, ConfigDict
Expand All @@ -29,8 +30,72 @@
OperatorsSetBase,
OperatorsSet,
OperatorSetGroup,
Fusing,
OperatorSetNames)
Fusing)


class OperatorSetNames(str, Enum):
CONV = "Conv"
DEPTHWISE_CONV = "DepthwiseConv2D"
CONV_TRANSPOSE = "ConvTranspose"
FULLY_CONNECTED = "FullyConnected"
CONCATENATE = "Concatenate"
STACK = "Stack"
UNSTACK = "Unstack"
GATHER = "Gather"
EXPAND = "Expend"
BATCH_NORM = "BatchNorm"
L2NORM = "L2Norm"
RELU = "ReLU"
RELU6 = "ReLU6"
LEAKY_RELU = "LeakyReLU"
ELU = "Elu"
HARD_TANH = "HardTanh"
ADD = "Add"
SUB = "Sub"
MUL = "Mul"
DIV = "Div"
MIN = "Min"
MAX = "Max"
PRELU = "PReLU"
ADD_BIAS = "AddBias"
SWISH = "Swish"
SIGMOID = "Sigmoid"
SOFTMAX = "Softmax"
LOG_SOFTMAX = "LogSoftmax"
TANH = "Tanh"
GELU = "Gelu"
HARDSIGMOID = "HardSigmoid"
HARDSWISH = "HardSwish"
FLATTEN = "Flatten"
GET_ITEM = "GetItem"
RESHAPE = "Reshape"
UNSQUEEZE = "Unsqueeze"
SQUEEZE = "Squeeze"
PERMUTE = "Permute"
TRANSPOSE = "Transpose"
DROPOUT = "Dropout"
SPLIT_CHUNK = "SplitChunk"
MAXPOOL = "MaxPool"
AVGPOOL = "AvgPool"
SIZE = "Size"
SHAPE = "Shape"
EQUAL = "Equal"
ARGMAX = "ArgMax"
TOPK = "TopK"
FAKE_QUANT = "FakeQuant"
COMBINED_NON_MAX_SUPPRESSION = "CombinedNonMaxSuppression"
ZERO_PADDING2D = "ZeroPadding2D"
CAST = "Cast"
RESIZE = "Resize"
PAD = "Pad"
FOLD = "Fold"
STRIDED_SLICE = "StridedSlice"
SSD_POST_PROCESS = "SSDPostProcess"
EXP = "Exp"

@classmethod
def get_values(cls):
return [v.value for v in cls]


class TargetPlatformCapabilities(BaseModel):
Expand Down Expand Up @@ -109,4 +174,3 @@ def show(self):
Display the TargetPlatformCapabilities.
"""
pprint.pprint(self.get_info(), sort_dicts=False)