ONE - On-device Neural Engine
Loading...
Searching...
No Matches
GraphBuilderRegistry.cpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
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
18
19#include "luci/Import/Nodes.h"
20
21#include <memory>
22
23namespace luci
24{
25
27{
28#define CIRCLE_NODE(OPCODE, CLASS) add(circle::BuiltinOperator_##OPCODE, std::make_unique<CLASS>());
29
36 CIRCLE_NODE(BATCH_MATMUL, CircleBatchMatMulGraphBuilder); // 126
37 CIRCLE_NODE(BATCH_TO_SPACE_ND, CircleBatchToSpaceNDGraphBuilder); // 37
38 CIRCLE_NODE(BCQ_FULLY_CONNECTED, CircleBCQFullyConnectedGraphBuilder); // 253
39 CIRCLE_NODE(BCQ_GATHER, CircleBCQGatherGraphBuilder); // 252
40 CIRCLE_NODE(BIDIRECTIONAL_SEQUENCE_LSTM, CircleBidirectionalSequenceLSTMGraphBuilder); // 52
41 CIRCLE_NODE(BROADCAST_TO, CircleBroadcastToGraphBuilder); // 130
57 CIRCLE_NODE(EXPAND_DIMS, CircleExpandDimsGraphBuilder); // 70
65 CIRCLE_NODE(GATHER_ND, CircleGatherNdGraphBuilder); // 107
68 CIRCLE_NODE(GREATER_EQUAL, CircleGreaterEqualGraphBuilder); // 62
70 CIRCLE_NODE(HARD_SWISH, CircleHardSwishGraphBuilder); // 117
72 CIRCLE_NODE(INSTANCE_NORM, CircleInstanceNormGraphBuilder); // 254
80 CIRCLE_NODE(LOGICAL_AND, CircleLogicalAndGraphBuilder); // 86
81 CIRCLE_NODE(LOGICAL_NOT, CircleLogicalNotGraphBuilder); // 87
84 CIRCLE_NODE(LOG_SOFTMAX, CircleLogSoftmaxGraphBuilder); // 50
85 CIRCLE_NODE(MATRIX_DIAG, CircleMatrixDiagGraphBuilder); // 113
86 CIRCLE_NODE(MATRIX_SET_DIAG, CircleMatrixSetDiagGraphBuilder); // 115
91 CIRCLE_NODE(MIRROR_PAD, CircleMirrorPadGraphBuilder); // 100
94 CIRCLE_NODE(NON_MAX_SUPPRESSION_V4, CircleNonMaxSuppressionV4GraphBuilder); // 120
95 CIRCLE_NODE(NON_MAX_SUPPRESSION_V5, CircleNonMaxSuppressionV5GraphBuilder); // 121
106 CIRCLE_NODE(REDUCE_ANY, CircleReduceAnyGraphBuilder); // 91
107 CIRCLE_NODE(REDUCE_MAX, CircleReduceMaxGraphBuilder); // 82
108 CIRCLE_NODE(REDUCE_MIN, CircleReduceMinGraphBuilder); // 89
109 CIRCLE_NODE(REDUCE_PROD, CircleReduceProdGraphBuilder); // 81
111 CIRCLE_NODE(RELU_0_TO_1, CircleRelu0To1GraphBuilder); // 152
116 CIRCLE_NODE(RESIZE_NEAREST_NEIGHBOR, CircleResizeNearestNeighborGraphBuilder); // 97
117 CIRCLE_NODE(REVERSE_SEQUENCE, CircleReverseSequenceGraphBuilder); // 112
118 CIRCLE_NODE(REVERSE_V2, CircleReverseV2GraphBuilder); // 105
119 CIRCLE_NODE(RMS_NORM, CircleRmsNormGraphBuilder); // 250
123 CIRCLE_NODE(SCATTER_ND, CircleScatterNdGraphBuilder); // 122
124 CIRCLE_NODE(SEGMENT_SUM, CircleSegmentSumGraphBuilder); // 125
126 CIRCLE_NODE(SELECT_V2, CircleSelectV2GraphBuilder); // 123
131 CIRCLE_NODE(SPACE_TO_BATCH_ND, CircleSpaceToBatchNDGraphBuilder); // 38
133 CIRCLE_NODE(SPARSE_TO_DENSE, CircleSparseToDenseGraphBuilder); // 68
135 CIRCLE_NODE(SPLIT_V, CircleSplitVGraphBuilder); // 102
138 CIRCLE_NODE(SQUARED_DIFFERENCE, CircleSquaredDifferenceGraphBuilder); // 99
148 CIRCLE_NODE(TRANSPOSE_CONV, CircleTransposeConvGraphBuilder); // 67
149 CIRCLE_NODE(UNIDIRECTIONAL_SEQUENCE_LSTM, CircleUnidirectionalSequenceLSTMGraphBuilder); // 44
154 CIRCLE_NODE(ZEROS_LIKE, CircleZerosLikeGraphBuilder); // 93
155
156#undef CIRCLE_NODE
157
158 // BuiltinOperator_EMBEDDING_LOOKUP = 7,
159 // BuiltinOperator_HASHTABLE_LOOKUP = 10,
160 // BuiltinOperator_LSH_PROJECTION = 15,
161 // BuiltinOperator_LSTM = 16,
162 // BuiltinOperator_RNN = 24,
163 // BuiltinOperator_CONCAT_EMBEDDINGS = 29,
164 // BuiltinOperator_SKIP_GRAM = 30,
165 // BuiltinOperator_CALL = 31,
166 // BuiltinOperator_EMBEDDING_LOOKUP_SPARSE = 33,
167 // BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_RNN = 35,
168 // BuiltinOperator_BIDIRECTIONAL_SEQUENCE_RNN = 46,
169 // BuiltinOperator_DELEGATE = 51,
170 // BuiltinOperator_ARG_MAX = 56,
171
172 // Register builders for nodes which not handles in builders registered above.
173#define CIRCLE_NODE(CLASS) add(std::make_unique<CLASS>())
174
176
177#undef CIRCLE_NODE
178}
179
180} // namespace luci
@ LOCAL_RESPONSE_NORMALIZATION
Builder creates CircleConst node from Tensor with buffer.
Definition CircleConst.h:31
#define LOG(...)
Definition Logging.h:36
#define DEQUANTIZE(input, offset, scale, type, size)
#define QUANTIZE(input, offset, scale, type, size)
CIRCLE_NODE(OPCODE, CLASS)