| /* |
| * Copyright (C) 2019 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| syntax = "proto2"; |
| |
| package android_nn_fuzz; |
| |
| enum OperandType { |
| FLOAT32 = 0; |
| INT32 = 1; |
| UINT32 = 2; |
| TENSOR_FLOAT32 = 3; |
| TENSOR_INT32 = 4; |
| TENSOR_QUANT8_ASYMM = 5; |
| BOOL = 6; |
| TENSOR_QUANT16_SYMM = 7; |
| TENSOR_FLOAT16 = 8; |
| TENSOR_BOOL8 = 9; |
| FLOAT16 = 10; |
| TENSOR_QUANT8_SYMM_PER_CHANNEL = 11; |
| TENSOR_QUANT16_ASYMM = 12; |
| TENSOR_QUANT8_SYMM = 13; |
| TENSOR_QUANT8_ASYMM_SIGNED = 14; |
| } |
| |
| enum OperationType { |
| ADD = 0; |
| AVERAGE_POOL_2D = 1; |
| CONCATENATION = 2; |
| CONV_2D = 3; |
| DEPTHWISE_CONV_2D = 4; |
| DEPTH_TO_SPACE = 5; |
| DEQUANTIZE = 6; |
| EMBEDDING_LOOKUP = 7; |
| FLOOR = 8; |
| FULLY_CONNECTED = 9; |
| HASHTABLE_LOOKUP = 10; |
| L2_NORMALIZATION = 11; |
| L2_POOL_2D = 12; |
| LOCAL_RESPONSE_NORMALIZATION = 13; |
| LOGISTIC = 14; |
| LSH_PROJECTION = 15; |
| LSTM = 16; |
| MAX_POOL_2D = 17; |
| MUL = 18; |
| RELU = 19; |
| RELU1 = 20; |
| RELU6 = 21; |
| RESHAPE = 22; |
| RESIZE_BILINEAR = 23; |
| RNN = 24; |
| SOFTMAX = 25; |
| SPACE_TO_DEPTH = 26; |
| SVDF = 27; |
| TANH = 28; |
| BATCH_TO_SPACE_ND = 29; |
| DIV = 30; |
| MEAN = 31; |
| PAD = 32; |
| SPACE_TO_BATCH_ND = 33; |
| SQUEEZE = 34; |
| STRIDED_SLICE = 35; |
| SUB = 36; |
| TRANSPOSE = 37; |
| ABS = 38; |
| ARGMAX = 39; |
| ARGMIN = 40; |
| AXIS_ALIGNED_BBOX_TRANSFORM = 41; |
| BIDIRECTIONAL_SEQUENCE_LSTM = 42; |
| BIDIRECTIONAL_SEQUENCE_RNN = 43; |
| BOX_WITH_NMS_LIMIT = 44; |
| CAST = 45; |
| CHANNEL_SHUFFLE = 46; |
| DETECTION_POSTPROCESSING = 47; |
| EQUAL = 48; |
| EXP = 49; |
| EXPAND_DIMS = 50; |
| GATHER = 51; |
| GENERATE_PROPOSALS = 52; |
| GREATER = 53; |
| GREATER_EQUAL = 54; |
| GROUPED_CONV_2D = 55; |
| HEATMAP_MAX_KEYPOINT = 56; |
| INSTANCE_NORMALIZATION = 57; |
| LESS = 58; |
| LESS_EQUAL = 59; |
| LOG = 60; |
| LOGICAL_AND = 61; |
| LOGICAL_NOT = 62; |
| LOGICAL_OR = 63; |
| LOG_SOFTMAX = 64; |
| MAXIMUM = 65; |
| MINIMUM = 66; |
| NEG = 67; |
| NOT_EQUAL = 68; |
| PAD_V2 = 69; |
| POW = 70; |
| PRELU = 71; |
| QUANTIZE = 72; |
| QUANTIZED_16BIT_LSTM = 73; |
| RANDOM_MULTINOMIAL = 74; |
| REDUCE_ALL = 75; |
| REDUCE_ANY = 76; |
| REDUCE_MAX = 77; |
| REDUCE_MIN = 78; |
| REDUCE_PROD = 79; |
| REDUCE_SUM = 80; |
| ROI_ALIGN = 81; |
| ROI_POOLING = 82; |
| RSQRT = 83; |
| SELECT = 84; |
| SIN = 85; |
| SLICE = 86; |
| SPLIT = 87; |
| SQRT = 88; |
| TILE = 89; |
| TOPK_V2 = 90; |
| TRANSPOSE_CONV_2D = 91; |
| UNIDIRECTIONAL_SEQUENCE_LSTM = 92; |
| UNIDIRECTIONAL_SEQUENCE_RNN = 93; |
| RESIZE_NEAREST_NEIGHBOR = 94; |
| } |
| |
| enum OperandLifeTime { |
| TEMPORARY_VARIABLE = 0; |
| SUBGRAPH_INPUT = 1; |
| SUBGRAPH_OUTPUT = 2; |
| CONSTANT_COPY = 3; |
| CONSTANT_REFERENCE = 4; |
| NO_VALUE = 5; |
| } |
| |
| message Buffer { |
| required uint32 random_seed = 1; |
| } |
| |
| message Scales { |
| repeated float scale = 1; |
| } |
| |
| message SymmPerChannelQuantParams { |
| required Scales scales = 1; |
| required uint32 channel_dim = 2; |
| } |
| |
| message Dimensions { |
| repeated uint32 dimension = 1; |
| } |
| |
| message Operand { |
| required OperandType type = 1; |
| required Dimensions dimensions = 2; |
| required float scale = 4; |
| required int32 zero_point = 5; |
| required OperandLifeTime lifetime = 6; |
| required SymmPerChannelQuantParams channel_quant = 7; |
| required Buffer data = 8; |
| } |
| |
| message Operands { |
| repeated Operand operand = 1; |
| } |
| |
| message Indexes { |
| repeated uint32 index = 1; |
| } |
| |
| message Operation { |
| required OperationType type = 1; |
| required Indexes inputs = 2; |
| required Indexes outputs = 3; |
| } |
| |
| message Operations { |
| repeated Operation operation = 1; |
| } |
| |
| message Model { |
| required Operands operands = 1; |
| required Operations operations = 2; |
| required Indexes input_indexes = 3; |
| required Indexes output_indexes = 4; |
| required bool is_relaxed = 5; |
| } |
| |
| message Test { |
| required Model model = 1; |
| } |