[mir_onnx] Introduce NodeConverterRegistry and remove operation hash (#6241)
authorПавел Ильютченко/AI Tools Lab /SRR/Engineer/삼성전자 <p.iliutchenk@samsung.com>
Tue, 6 Aug 2019 14:28:33 +0000 (17:28 +0300)
committerAlexander Efimov/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Tue, 6 Aug 2019 14:28:33 +0000 (17:28 +0300)
* Introduce NodeConverterRegistry
* Remove operation hash
* Replace operation hash uses with NodeConverter

Signed-off-by: Pavel Iliutchenko <p.iliutchenk@samsung.com>
compiler/mir-onnx-importer/CMakeLists.txt
compiler/mir-onnx-importer/ONNXImporterImpl.cpp
compiler/mir-onnx-importer/ONNXImporterImpl.h
compiler/mir-onnx-importer/ONNXNodeConverterRegistry.h [new file with mode: 0644]
compiler/mir-onnx-importer/ONNXOpCreator.cpp
compiler/mir-onnx-importer/ONNXOpCreator.h
compiler/mir-onnx-importer/ONNXOpRegistration.h [new file with mode: 0644]
compiler/mir-onnx-importer/ONNXOpType.h [deleted file]
compiler/mir-onnx-importer/ONNXPerfect.gperf [deleted file]
compiler/mir-onnx-importer/ONNXPerfectHash.h [deleted file]

index 30af74b..1f2d03e 100644 (file)
@@ -9,10 +9,10 @@ set(MIR_ONNX_IMPORTER_SOURCES
         ONNXHelpers.h
         ONNXImporterImpl.cpp
         ONNXImporterImpl.h
+        ONNXNodeConverterRegistry.h
         ONNXOpCreator.cpp
         ONNXOpCreator.h
-        ONNXOpType.h
-        ONNXPerfectHash.h)
+        ONNXOpRegistration.h)
 
 add_library(mir_onnx_importer STATIC ${MIR_ONNX_IMPORTER_SOURCES})
 set_target_properties(mir_onnx_importer PROPERTIES POSITION_INDEPENDENT_CODE ON)
index 430bb11..a76f56e 100644 (file)
@@ -16,9 +16,7 @@
 
 #include "ONNXImporterImpl.h"
 #include "ONNXHelpers.h"
-#include "ONNXPerfectHash.h"
-#include "ONNXOpCreator.h"
-#include "ONNXOpType.h"
+#include "ONNXOpRegistration.h"
 
 #include "mir/IrDotDumper.h"
 #include "mir/ops/ConstantOp.h"
@@ -49,7 +47,7 @@ namespace mir_onnx
 ONNXImporterImpl::ONNXImporterImpl(std::string filename) : _modelFilename(std::move(filename))
 {
   _graph = stdex::make_unique<mir::Graph>();
-  _opCreator.setMirGraph(_graph.get());
+  registerSupportedOps();
 }
 
 static void loadModelFile(const std::string &filename, onnx::ModelProto *model)
@@ -90,41 +88,12 @@ void ONNXImporterImpl::collectUnsupportedOps()
 
   for (int i = 0; i < _model->graph().node_size(); i++)
   {
-    auto *onnx_node = &(_model->graph().node(i));
-    assert(onnx_node->has_op_type());
-    auto op_type = onnx_node->op_type().c_str();
-    auto *ir_op_type = ONNXPerfectHash::getONNXOpType(op_type, onnx_node->op_type().size());
-
-    switch (ir_op_type->opCode)
-    {
-      case ONNXOpCode::opAdd:
-      case ONNXOpCode::opAveragePool:
-      case ONNXOpCode::opGivenTensorFill: // experimental
-      case ONNXOpCode::opGlobalAveragePool:
-      case ONNXOpCode::opBatchNormalization:
-      case ONNXOpCode::opConcat:
-      case ONNXOpCode::opConstant:
-      case ONNXOpCode::opConv:
-      case ONNXOpCode::opDropout:
-      case ONNXOpCode::opGather:
-      case ONNXOpCode::opGemm:
-      case ONNXOpCode::opMax:
-      case ONNXOpCode::opMaxPool:
-      case ONNXOpCode::opUpsample:
-      case ONNXOpCode::opMul:
-      case ONNXOpCode::opPad:
-      case ONNXOpCode::opRelu:
-      case ONNXOpCode::opReshape:
-      case ONNXOpCode::opUnsqueeze:
-      case ONNXOpCode::opShape:
-      case ONNXOpCode::opSigmoid:
-      case ONNXOpCode::opScale:
-      case ONNXOpCode::opSoftmax:
-      case ONNXOpCode::opSum:
-        break;
-      default:
-        problems_op_set.insert(op_type);
-    }
+    const auto &onnx_node = _model->graph().node(i);
+    assert(onnx_node.has_op_type());
+    const auto &op_type = onnx_node.op_type();
+    const auto *converter = NodeConverterRegistry::getInstance().lookup(op_type);
+    if (converter == nullptr)
+      problems_op_set.insert(op_type);
   }
   if (!problems_op_set.empty())
   {
@@ -201,82 +170,9 @@ std::unique_ptr<mir::Graph> ONNXImporterImpl::createIR()
       }
     }
 
-    auto *onnx_op_type = ONNXPerfectHash::getONNXOpType(op_type, onnx_node.op_type().size());
-
-    switch (onnx_op_type->opCode)
-    {
-      case ONNXOpCode::opConstant:
-        outputs = _opCreator.convertConstant(onnx_node, _constantTensors);
-        break;
-      case ONNXOpCode::opPad:
-        outputs = _opCreator.convertPad(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opConv:
-        outputs = _opCreator.convertConv2D(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opAdd:
-        outputs = _opCreator.convertElementwise(inputs, mir::ops::ElementwiseOp::OpType::add);
-        break;
-      case ONNXOpCode::opGather:
-        outputs = _opCreator.convertGather(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opGemm:
-        outputs = _opCreator.convertGemm(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opSum:
-        outputs = _opCreator.convertElementwise(inputs, mir::ops::ElementwiseOp::OpType::add);
-        break;
-      case ONNXOpCode::opShape:
-        outputs = _opCreator.convertShape(inputs);
-        break;
-      case ONNXOpCode::opMul:
-        outputs = _opCreator.convertElementwise(inputs, mir::ops::ElementwiseOp::OpType::mul);
-        break;
-      case ONNXOpCode::opMax:
-        outputs = _opCreator.convertElementwise(inputs, mir::ops::ElementwiseOp::OpType::max);
-        break;
-      case ONNXOpCode::opGivenTensorFill:
-        outputs = _opCreator.convertGivenTensorFill(onnx_node, _constantTensors);
-        break;
-      case ONNXOpCode::opGlobalAveragePool:
-      case ONNXOpCode::opAveragePool:
-      case ONNXOpCode::opMaxPool:
-        outputs = _opCreator.convertPool(inputs, onnx_op_type->opCode, onnx_node);
-        break;
-      case ONNXOpCode::opConcat:
-        outputs = _opCreator.convertConcat(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opReshape:
-        outputs = _opCreator.convertReshape(inputs);
-        break;
-      case ONNXOpCode::opUpsample:
-        outputs = _opCreator.convertUpsample(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opRelu:
-        outputs = _opCreator.convertRelu(inputs);
-        break;
-      case ONNXOpCode::opUnsqueeze:
-        outputs = _opCreator.convertUnsqueeze(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opSigmoid:
-        outputs = _opCreator.convertSigmoid(inputs);
-        break;
-      case ONNXOpCode::opSoftmax:
-        outputs = _opCreator.convertSoftmax(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opScale:
-        outputs = _opCreator.convertScale(inputs, onnx_node);
-        break;
-      case ONNXOpCode::opBatchNormalization:
-        outputs = _opCreator.convertBatchNorm(inputs, onnx_node, _constantTensors);
-        break;
-      case ONNXOpCode::opDropout:
-        outputs = _opCreator.convertDropout(inputs, onnx_node);
-        break;
-      default:
-        throw std::runtime_error("Invalid ONNXOpCode" +
-                                 std::to_string(static_cast<int>(onnx_op_type->opCode)));
-    }
+    const auto *node_converter = NodeConverterRegistry::getInstance().lookup(op_type);
+    outputs = node_converter->convert(onnx_node, inputs, _graph.get());
+    assert(!outputs.empty());
     // Set outputs' names
     for (int i = 0; i < outputs.size(); i++)
     {
index 9f08e42..31ba69a 100644 (file)
 #ifndef _MIR_ONNX_IMPORTER_H
 #define _MIR_ONNX_IMPORTER_H
 
-#include "ONNXOpCreator.h"
-#include "ONNXOpType.h"
-
 #include "mir/Graph.h"
+#include "mir/TensorVariant.h"
+
+#include "onnx/onnx.pb.h"
 
+#include <map>
 #include <memory>
 #include <string>
 
@@ -50,7 +51,6 @@ private:
   std::string _modelFilename;
   std::unique_ptr<onnx::ModelProto> _model;
   std::unique_ptr<mir::Graph> _graph;
-  ONNXOpCreator _opCreator;
 };
 } // namespace mir_onnx
 
diff --git a/compiler/mir-onnx-importer/ONNXNodeConverterRegistry.h b/compiler/mir-onnx-importer/ONNXNodeConverterRegistry.h
new file mode 100644 (file)
index 0000000..eb8d472
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * 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.
+ */
+
+#ifndef __ONNX_NODE_CONVERTER_REGISTRY_H__
+#define __ONNX_NODE_CONVERTER_REGISTRY_H__
+
+#include "onnx/onnx.pb.h"
+#include "mir/Graph.h"
+
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include <stdex/Memory.h>
+
+namespace mir_onnx
+{
+
+class NodeConverter
+{
+public:
+  // TODO Change input arguments for converters
+  // Maybe create graph context
+  virtual std::vector<mir::Operation::Output *>
+  convert(const onnx::NodeProto &onnx_node, const std::vector<mir::Operation::Output *> &inputs,
+          mir::Graph *graph) const = 0;
+  virtual ~NodeConverter() = default;
+};
+
+class NodeConverterRegistry
+{
+public:
+  NodeConverterRegistry() = default;
+
+  const NodeConverter *lookup(const std::string &op_type) const
+  {
+    const auto converter_iter = _converter_map.find(op_type);
+    if (converter_iter == _converter_map.end())
+      return nullptr;
+
+    return converter_iter->second.get();
+  }
+
+  static NodeConverterRegistry &getInstance()
+  {
+    static NodeConverterRegistry me;
+    return me;
+  }
+
+  void registerConverter(const std::string &op_type, std::unique_ptr<NodeConverter> &&converter)
+  {
+    const auto converter_iter = _converter_map.find(op_type);
+    if (converter_iter == _converter_map.end())
+    {
+      _converter_map.emplace(op_type, std::move(converter));
+    }
+    else
+    {
+      throw std::runtime_error("Converter registration twiсe on same node impossible!");
+    }
+  }
+
+private:
+  std::map<const std::string, std::unique_ptr<NodeConverter>> _converter_map;
+};
+
+} // namespace mir_onnx
+
+#endif // __ONNX_NODE_CONVERTER_REGISTRY_H__
index 8f7b87b..b1f6046 100644 (file)
@@ -161,34 +161,24 @@ ONNXOpCreator::convertPad(const std::vector<mir::Operation::Output *> &inputs,
 }
 
 std::vector<mir::Operation::Output *>
-ONNXOpCreator::convertPool(const std::vector<mir::Operation::Output *> &inputs, ONNXOpCode op_code,
+ONNXOpCreator::convertPool(const std::vector<mir::Operation::Output *> &inputs,
+                           mir::ops::PoolOp::PoolingType pool_type,
                            const onnx::NodeProto &onnx_node)
 {
   ops::PoolOp::BorderType border_type;
-  ops::PoolOp::PoolingType pool_type;
 
   KernelStridesPadding cdata;
   // Transpose ONNX NCHW to MIR NHWC
   auto t_input = convertONNXToMIR(_graph, inputs[0]);
 
-  switch (op_code)
+  switch (pool_type)
   {
-    case ONNXOpCode::opGlobalAveragePool:
-    {
-      border_type = ops::PoolOp::BorderType::ZEROFILLED;
-      pool_type = ops::PoolOp::PoolingType::AVG;
-      // GlobalAveragePool is equivalent to AveragePool with kernel size equal
-      // to the spatial dimension of input tensor
-      cdata.kernel_shape = {t_input->getShape().dim(1), t_input->getShape().dim(2)};
-      cdata.strides_shape = {1, 1};
-      break;
-    }
-    case ONNXOpCode::opAveragePool:
+    case mir::ops::PoolOp::PoolingType::AVG:
       border_type = ops::PoolOp::BorderType::ZEROFILLED;
       pool_type = ops::PoolOp::PoolingType::AVG;
       getKernelStridesPadding(onnx_node, cdata);
       break;
-    case ONNXOpCode::opMaxPool:
+    case mir::ops::PoolOp::PoolingType::MAX:
       border_type = ops::PoolOp::BorderType::EMPTY;
       pool_type = ops::PoolOp::PoolingType::MAX;
       getKernelStridesPadding(onnx_node, cdata);
index 9cceb8f..d6caa99 100644 (file)
 #define _MIR_ONNX_OP_CREATOR_H
 
 #include "onnx/onnx.pb.h"
-#include "ONNXOpType.h"
 
 #include "mir/ops/CommonProps.h"
 #include "mir/ops/ElementwiseOp.h"
+#include "mir/ops/PoolOp.h"
 #include "mir/Graph.h"
 #include "mir/Shape.h"
 #include "mir/TensorVariant.h"
@@ -58,8 +58,8 @@ public:
                                                         InputTensors &input_tensors);
 
   std::vector<mir::Operation::Output *>
-  convertPool(const std::vector<mir::Operation::Output *> &inputs, ONNXOpCode op_code,
-              const onnx::NodeProto &onnx_node);
+  convertPool(const std::vector<mir::Operation::Output *> &inputs,
+              mir::ops::PoolOp::PoolingType pool_type, const onnx::NodeProto &onnx_node);
 
   std::vector<mir::Operation::Output *>
   convertPad(const std::vector<mir::Operation::Output *> &inputs, const onnx::NodeProto &onnx_node);
diff --git a/compiler/mir-onnx-importer/ONNXOpRegistration.h b/compiler/mir-onnx-importer/ONNXOpRegistration.h
new file mode 100644 (file)
index 0000000..33ae841
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved
+ *
+ * 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.
+ */
+
+#include "ONNXNodeConverterRegistry.h"
+
+namespace mir_onnx
+{
+
+inline void registerSupportedOps()
+{
+  auto &registry = NodeConverterRegistry::getInstance();
+  // registry.registerConverter("Add", stdex::make_unique<AddNodeConverter>());
+}
+
+} // namespace mir_onnx
diff --git a/compiler/mir-onnx-importer/ONNXOpType.h b/compiler/mir-onnx-importer/ONNXOpType.h
deleted file mode 100644 (file)
index a63f9a5..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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.
- */
-
-#ifndef _MIR_ONNX_OP_TYPES_H
-#define _MIR_ONNX_OP_TYPES_H
-
-namespace mir_onnx
-{
-enum class ONNXOpSupportState
-{
-  unSupported,
-  fullySupported,
-  partiallySupported
-};
-
-enum class ONNXOpCode
-{
-  opAbs,
-  opAcos,
-  opAdd,
-  opAnd,
-  opArgMax,
-  opArgMin,
-  opAsin,
-  opAtan,
-  opAveragePool,
-  opBatchNormalization,
-  opCast,
-  opCeil,
-  opClip,
-  opConcat,
-  opConstant,
-  opConstantLike,
-  opConv,
-  opConvTranspose,
-  opCos,
-  opDepthToSpace,
-  opDiv,
-  opDropout,
-  opElu,
-  opEqual,
-  opExp,
-  opExpand,
-  opEyeLike,
-  opFlatten,
-  opFloor,
-  opGRU,
-  opGather,
-  opGemm,
-  opGlobalAveragePool,
-  opGlobalLpPool,
-  opGlobalMaxPool,
-  opGreater,
-  opHardSigmoid,
-  opHardmax,
-  opIdentity,
-  opIf,
-  opInstanceNormalizati,
-  opLRN,
-  opLSTM,
-  opLeakyRelu,
-  opLess,
-  opLog,
-  opLogSoftmax,
-  opLoop,
-  opLpNormalization,
-  opLpPool,
-  opMatMul,
-  opMax,
-  opMaxPool,
-  opMaxRoiPool,
-  opMean,
-  opMin,
-  opMul,
-  opMultinomial,
-  opNeg,
-  opNot,
-  opOr,
-  opPRelu,
-  opPad,
-  opPow,
-  opRNN,
-  opRandomNormal,
-  opRandomNormalLike,
-  opRandomUniform,
-  opRandomUniformLike,
-  opReciprocal,
-  opReduceL1,
-  opReduceL2,
-  opReduceLogSum,
-  opReduceLogSumExp,
-  opReduceMax,
-  opReduceMean,
-  opReduceMin,
-  opReduceProd,
-  opReduceSum,
-  opReduceSumSquare,
-  opRelu,
-  opReshape,
-  opScan,
-  opSelu,
-  opShape,
-  opSigmoid,
-  opSin,
-  opSize,
-  opSlice,
-  opSoftmax,
-  opSoftplus,
-  opSoftsign,
-  opSpaceToDepth,
-  opSplit,
-  opSqrt,
-  opSqueeze,
-  opSub,
-  opSum,
-  opTan,
-  opTanh,
-  opTile,
-  opTopK,
-  opTranspose,
-  opUnsqueeze,
-  opUpsample,
-  opXor,
-  // experimental
-  opATen,
-  opAffine,
-  opConstantFill,
-  opCrop,
-  opDynamicSlice,
-  opGRUUnit,
-  opGivenTensorFill,
-  opImageScaler,
-  opParametricSoftplus,
-  opScale,
-  opScaledTanh,
-  opThresholdedRelu
-}; // ONNXOpCode
-
-struct ONNXOpType
-{
-  const char *name;
-  ONNXOpCode opCode;
-  ONNXOpSupportState state;
-}; // ONNXOpType
-
-} // namespace mir_onnx
-#endif // _MIR_ONNX_OP_TYPES_H
diff --git a/compiler/mir-onnx-importer/ONNXPerfect.gperf b/compiler/mir-onnx-importer/ONNXPerfect.gperf
deleted file mode 100644 (file)
index 9a1ef98..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-%{
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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.
- */
-
-#include "ONNXOpType.h"
-
-using namespace mir_onnx;
-
-%}
-
-%language=C++
-%define class-name ONNXPerfectHash
-%struct-type
-%define lookup-function-name getONNXOpType
-%readonly-tables
-%enum
-%omit-struct-type
-
-struct ONNXOpType { char *name; ONNXOpType opCode; ONNXOpSupportState state};
-%%
-Abs, ONNXOpCode::opAbs, ONNXOpSupportState::unSupported
-Acos, ONNXOpCode::opAcos, ONNXOpSupportState::unSupported
-Add, ONNXOpCode::opAdd, ONNXOpSupportState::unSupported
-And, ONNXOpCode::opAnd, ONNXOpSupportState::unSupported
-ArgMax, ONNXOpCode::opArgMax, ONNXOpSupportState::unSupported
-ArgMin, ONNXOpCode::opArgMin, ONNXOpSupportState::unSupported
-Asin, ONNXOpCode::opAsin, ONNXOpSupportState::unSupported
-Atan, ONNXOpCode::opAtan, ONNXOpSupportState::unSupported
-AveragePool, ONNXOpCode::opAveragePool, ONNXOpSupportState::fullySupported
-BatchNormalization, ONNXOpCode::opBatchNormalization, ONNXOpSupportState::fullySupported
-Cast, ONNXOpCode::opCast, ONNXOpSupportState::unSupported
-Ceil, ONNXOpCode::opCeil, ONNXOpSupportState::unSupported
-Clip, ONNXOpCode::opClip, ONNXOpSupportState::unSupported
-Concat, ONNXOpCode::opConcat, ONNXOpSupportState::fullySupported
-Constant, ONNXOpCode::opConstant, ONNXOpSupportState::unSupported
-ConstantLike, ONNXOpCode::opConstantLike, ONNXOpSupportState::unSupported
-Conv, ONNXOpCode::opConv, ONNXOpSupportState::fullySupported
-ConvTranspose, ONNXOpCode::opConvTranspose, ONNXOpSupportState::unSupported
-Cos, ONNXOpCode::opCos, ONNXOpSupportState::unSupported
-DepthToSpace, ONNXOpCode::opDepthToSpace, ONNXOpSupportState::unSupported
-Div, ONNXOpCode::opDiv, ONNXOpSupportState::unSupported
-Dropout, ONNXOpCode::opDropout, ONNXOpSupportState::fullySupported
-Elu, ONNXOpCode::opElu, ONNXOpSupportState::unSupported
-Equal, ONNXOpCode::opEqual, ONNXOpSupportState::unSupported
-Exp, ONNXOpCode::opExp, ONNXOpSupportState::unSupported
-Expand, ONNXOpCode::opExpand, ONNXOpSupportState::unSupported
-EyeLike, ONNXOpCode::opEyeLike, ONNXOpSupportState::unSupported
-Flatten, ONNXOpCode::opFlatten, ONNXOpSupportState::unSupported
-Floor, ONNXOpCode::opFloor, ONNXOpSupportState::unSupported
-GRU, ONNXOpCode::opGRU, ONNXOpSupportState::unSupported
-Gather, ONNXOpCode::opGather, ONNXOpSupportState::unSupported
-Gemm, ONNXOpCode::opGemm, ONNXOpSupportState::unSupported
-GlobalAveragePool, ONNXOpCode::opGlobalAveragePool, ONNXOpSupportState::unSupported
-GlobalLpPool, ONNXOpCode::opGlobalLpPool, ONNXOpSupportState::unSupported
-GlobalMaxPool, ONNXOpCode::opGlobalMaxPool, ONNXOpSupportState::unSupported
-Greater, ONNXOpCode::opGreater, ONNXOpSupportState::unSupported
-HardSigmoid, ONNXOpCode::opHardSigmoid, ONNXOpSupportState::unSupported
-Hardmax, ONNXOpCode::opHardmax, ONNXOpSupportState::unSupported
-Identity, ONNXOpCode::opIdentity, ONNXOpSupportState::fullySupported
-If, ONNXOpCode::opIf, ONNXOpSupportState::unSupported
-InstanceNormalizati, ONNXOpCode::opInstanceNormalizati, ONNXOpSupportState::unSupported
-LRN, ONNXOpCode::opLRN, ONNXOpSupportState::unSupported
-LSTM, ONNXOpCode::opLSTM, ONNXOpSupportState::unSupported
-LeakyRelu, ONNXOpCode::opLeakyRelu, ONNXOpSupportState::unSupported
-Less, ONNXOpCode::opLess, ONNXOpSupportState::unSupported
-Log, ONNXOpCode::opLog, ONNXOpSupportState::unSupported
-LogSoftmax, ONNXOpCode::opLogSoftmax, ONNXOpSupportState::unSupported
-Loop, ONNXOpCode::opLoop, ONNXOpSupportState::unSupported
-LpNormalization, ONNXOpCode::opLpNormalization, ONNXOpSupportState::unSupported
-LpPool, ONNXOpCode::opLpPool, ONNXOpSupportState::unSupported
-MatMul, ONNXOpCode::opMatMul, ONNXOpSupportState::unSupported
-Max, ONNXOpCode::opMax, ONNXOpSupportState::unSupported
-MaxPool, ONNXOpCode::opMaxPool, ONNXOpSupportState::fullySupported
-MaxRoiPool, ONNXOpCode::opMaxRoiPool, ONNXOpSupportState::unSupported
-Mean, ONNXOpCode::opMean, ONNXOpSupportState::unSupported
-Min, ONNXOpCode::opMin, ONNXOpSupportState::unSupported
-Mul, ONNXOpCode::opMul, ONNXOpSupportState::unSupported
-Multinomial, ONNXOpCode::opMultinomial, ONNXOpSupportState::unSupported
-Neg, ONNXOpCode::opNeg, ONNXOpSupportState::unSupported
-Not, ONNXOpCode::opNot, ONNXOpSupportState::unSupported
-Or, ONNXOpCode::opOr, ONNXOpSupportState::unSupported
-PRelu, ONNXOpCode::opPRelu, ONNXOpSupportState::unSupported
-Pad, ONNXOpCode::opPad, ONNXOpSupportState::unSupported
-Pow, ONNXOpCode::opPow, ONNXOpSupportState::unSupported
-RNN, ONNXOpCode::opRNN, ONNXOpSupportState::unSupported
-RandomNormal, ONNXOpCode::opRandomNormal, ONNXOpSupportState::unSupported
-RandomNormalLike, ONNXOpCode::opRandomNormalLike, ONNXOpSupportState::unSupported
-RandomUniform, ONNXOpCode::opRandomUniform, ONNXOpSupportState::unSupported
-RandomUniformLike, ONNXOpCode::opRandomUniformLike, ONNXOpSupportState::unSupported
-Reciprocal, ONNXOpCode::opReciprocal, ONNXOpSupportState::unSupported
-ReduceL1, ONNXOpCode::opReduceL1, ONNXOpSupportState::unSupported
-ReduceL2, ONNXOpCode::opReduceL2, ONNXOpSupportState::unSupported
-ReduceLogSum, ONNXOpCode::opReduceLogSum, ONNXOpSupportState::unSupported
-ReduceLogSumExp, ONNXOpCode::opReduceLogSumExp, ONNXOpSupportState::unSupported
-ReduceMax, ONNXOpCode::opReduceMax, ONNXOpSupportState::unSupported
-ReduceMean, ONNXOpCode::opReduceMean, ONNXOpSupportState::unSupported
-ReduceMin, ONNXOpCode::opReduceMin, ONNXOpSupportState::unSupported
-ReduceProd, ONNXOpCode::opReduceProd, ONNXOpSupportState::unSupported
-ReduceSum, ONNXOpCode::opReduceSum, ONNXOpSupportState::unSupported
-ReduceSumSquare, ONNXOpCode::opReduceSumSquare, ONNXOpSupportState::unSupported
-Relu, ONNXOpCode::opRelu, ONNXOpSupportState::fullySupported
-Reshape, ONNXOpCode::opReshape, ONNXOpSupportState::fullySupported
-Scan, ONNXOpCode::opScan, ONNXOpSupportState::unSupported
-Selu, ONNXOpCode::opSelu, ONNXOpSupportState::unSupported
-Shape, ONNXOpCode::opShape, ONNXOpSupportState::unSupported
-Sigmoid, ONNXOpCode::opSigmoid, ONNXOpSupportState::unSupported
-Sin, ONNXOpCode::opSin, ONNXOpSupportState::unSupported
-Size, ONNXOpCode::opSize, ONNXOpSupportState::unSupported
-Slice, ONNXOpCode::opSlice, ONNXOpSupportState::unSupported
-Softmax, ONNXOpCode::opSoftmax, ONNXOpSupportState::fullySupported
-Softplus, ONNXOpCode::opSoftplus, ONNXOpSupportState::unSupported
-Softsign, ONNXOpCode::opSoftsign, ONNXOpSupportState::unSupported
-SpaceToDepth, ONNXOpCode::opSpaceToDepth, ONNXOpSupportState::unSupported
-Split, ONNXOpCode::opSplit, ONNXOpSupportState::fullySupported
-Sqrt, ONNXOpCode::opSqrt, ONNXOpSupportState::unSupported
-Squeeze, ONNXOpCode::opSqueeze, ONNXOpSupportState::unSupported
-Sub, ONNXOpCode::opSub, ONNXOpSupportState::unSupported
-Sum, ONNXOpCode::opSum, ONNXOpSupportState::unSupported
-Tan, ONNXOpCode::opTan, ONNXOpSupportState::unSupported
-Tanh, ONNXOpCode::opTanh, ONNXOpSupportState::unSupported
-Tile, ONNXOpCode::opTile, ONNXOpSupportState::unSupported
-TopK, ONNXOpCode::opTopK, ONNXOpSupportState::unSupported
-Transpose, ONNXOpCode::opTranspose, ONNXOpSupportState::unSupported
-Unsqueeze, ONNXOpCode::opUnsqueeze, ONNXOpSupportState::unSupported
-Upsample, ONNXOpCode::opUpsample, ONNXOpSupportState::unSupported
-Xor, ONNXOpCode::opXor, ONNXOpSupportState::unSupported
-ATen, ONNXOpCode::opATen, ONNXOpSupportState::unSupported
-Affine, ONNXOpCode::opAffine, ONNXOpSupportState::unSupported
-ConstantFill, ONNXOpCode::opConstantFill, ONNXOpSupportState::unSupported
-Crop, ONNXOpCode::opCrop, ONNXOpSupportState::unSupported
-DynamicSlice, ONNXOpCode::opDynamicSlice, ONNXOpSupportState::unSupported
-GRUUnit, ONNXOpCode::opGRUUnit, ONNXOpSupportState::unSupported
-GivenTensorFill, ONNXOpCode::opGivenTensorFill, ONNXOpSupportState::unSupported
-ImageScaler, ONNXOpCode::opImageScaler, ONNXOpSupportState::unSupported
-ParametricSoftplus, ONNXOpCode::opParametricSoftplus, ONNXOpSupportState::unSupported
-Scale, ONNXOpCode::opScale, ONNXOpSupportState::partiallySupported
-ScaledTanh, ONNXOpCode::opScaledTanh, ONNXOpSupportState::unSupported
-ThresholdedRelu, ONNXOpCode::opThresholdedRelu, ONNXOpSupportState::unSupported
diff --git a/compiler/mir-onnx-importer/ONNXPerfectHash.h b/compiler/mir-onnx-importer/ONNXPerfectHash.h
deleted file mode 100644 (file)
index e3ab70d..0000000
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
- *
- * 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.
- */
-
-/* C++ code produced by gperf version 3.1 */
-/* Command-line: gperf --output-file=ONNXPerfectHash.h ONNXPerfect.gperf  */
-/* Computed positions: -k'1-2,$' */
-
-namespace mir_onnx
-{
-
-#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) && ('%' == 37) && ('&' == 38) &&  \
-      ('\'' == 39) && ('(' == 40) && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) && \
-      ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) && ('1' == 49) && ('2' == 50) &&  \
-      ('3' == 51) && ('4' == 52) && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) &&  \
-      ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) && ('=' == 61) && ('>' == 62) &&  \
-      ('?' == 63) && ('A' == 65) && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) &&  \
-      ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) && ('J' == 74) && ('K' == 75) &&  \
-      ('L' == 76) && ('M' == 77) && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) &&  \
-      ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) && ('V' == 86) && ('W' == 87) &&  \
-      ('X' == 88) && ('Y' == 89) && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) && \
-      ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) && ('c' == 99) && ('d' == 100) && \
-      ('e' == 101) && ('f' == 102) && ('g' == 103) && ('h' == 104) && ('i' == 105) &&            \
-      ('j' == 106) && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) &&            \
-      ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) && ('s' == 115) &&            \
-      ('t' == 116) && ('u' == 117) && ('v' == 118) && ('w' == 119) && ('x' == 120) &&            \
-      ('y' == 121) && ('z' == 122) && ('{' == 123) && ('|' == 124) && ('}' == 125) &&            \
-      ('~' == 126))
-/* The character set is not based on ISO-646.  */
-#error \
-    "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
-#endif
-
-#line 1 "ONNXPerfect.gperf"
-
-#include "ONNXOpType.h"
-
-/* maximum key range = 193, duplicates = 0 */
-
-class ONNXPerfectHash
-{
-private:
-  static inline unsigned int hash(const char *str, size_t len);
-
-public:
-  static const struct ONNXOpType *getONNXOpType(const char *str, size_t len);
-};
-
-inline unsigned int ONNXPerfectHash::hash(const char *str, size_t len)
-{
-  static const unsigned char asso_values[] = {
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 22,  0,   199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 40,  75,  0,   25,  35,  50,  25,  0,   65,  199, 0,
-      5,   0,   10,  65,  90,  199, 0,   20,  110, 82,  199, 199, 0,   199, 199, 199, 199, 199, 199,
-      199, 199, 0,   25,  60,  35,  5,   25,  125, 30,  65,  199, 199, 0,   40,  5,   15,  20,  60,
-      10,  90,  35,  40,  45,  45,  65,  55,  199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
-      199, 199, 199, 199, 199, 199, 199, 199, 199};
-  return len + asso_values[static_cast<unsigned char>(str[1])] +
-         asso_values[static_cast<unsigned char>(str[0])] +
-         asso_values[static_cast<unsigned char>(str[len - 1])];
-}
-
-const struct ONNXOpType *ONNXPerfectHash::getONNXOpType(const char *str, size_t len)
-{
-  enum
-  {
-    TOTAL_KEYWORDS = 118,
-    MIN_WORD_LENGTH = 2,
-    MAX_WORD_LENGTH = 19,
-    MIN_HASH_VALUE = 6,
-    MAX_HASH_VALUE = 198
-  };
-
-  static const struct ONNXOpType wordlist[] = {
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-#line 84 "ONNXPerfect.gperf"
-      {"MatMul", ONNXOpCode::opMatMul, ONNXOpSupportState::unSupported},
-#line 86 "ONNXPerfect.gperf"
-      {"MaxPool", ONNXOpCode::opMaxPool, ONNXOpSupportState::fullySupported},
-      {""},
-#line 45 "ONNXPerfect.gperf"
-      {"Ceil", ONNXOpCode::opCeil, ONNXOpSupportState::unSupported},
-#line 87 "ONNXPerfect.gperf"
-      {"MaxRoiPool", ONNXOpCode::opMaxRoiPool, ONNXOpSupportState::unSupported},
-      {""},
-#line 99 "ONNXPerfect.gperf"
-      {"RandomNormal", ONNXOpCode::opRandomNormal, ONNXOpSupportState::unSupported},
-#line 105 "ONNXPerfect.gperf"
-      {"ReduceL2", ONNXOpCode::opReduceL2, ONNXOpSupportState::unSupported},
-#line 88 "ONNXPerfect.gperf"
-      {"Mean", ONNXOpCode::opMean, ONNXOpSupportState::unSupported},
-#line 103 "ONNXPerfect.gperf"
-      {"Reciprocal", ONNXOpCode::opReciprocal, ONNXOpSupportState::unSupported},
-      {""},
-#line 115 "ONNXPerfect.gperf"
-      {"Reshape", ONNXOpCode::opReshape, ONNXOpSupportState::fullySupported},
-#line 75 "ONNXPerfect.gperf"
-      {"LRN", ONNXOpCode::opLRN, ONNXOpSupportState::unSupported},
-#line 110 "ONNXPerfect.gperf"
-      {"ReduceMin", ONNXOpCode::opReduceMin, ONNXOpSupportState::unSupported},
-#line 109 "ONNXPerfect.gperf"
-      {"ReduceMean", ONNXOpCode::opReduceMean, ONNXOpSupportState::unSupported},
-#line 100 "ONNXPerfect.gperf"
-      {"RandomNormalLike", ONNXOpCode::opRandomNormalLike, ONNXOpSupportState::unSupported},
-#line 102 "ONNXPerfect.gperf"
-      {"RandomUniformLike", ONNXOpCode::opRandomUniformLike, ONNXOpSupportState::unSupported},
-#line 98 "ONNXPerfect.gperf"
-      {"RNN", ONNXOpCode::opRNN, ONNXOpSupportState::unSupported},
-#line 46 "ONNXPerfect.gperf"
-      {"Clip", ONNXOpCode::opClip, ONNXOpSupportState::unSupported},
-#line 113 "ONNXPerfect.gperf"
-      {"ReduceSumSquare", ONNXOpCode::opReduceSumSquare, ONNXOpSupportState::unSupported},
-      {""},
-#line 142 "ONNXPerfect.gperf"
-      {"ConstantFill", ONNXOpCode::opConstantFill, ONNXOpSupportState::unSupported},
-#line 139 "ONNXPerfect.gperf"
-      {"Xor", ONNXOpCode::opXor, ONNXOpSupportState::unSupported},
-#line 76 "ONNXPerfect.gperf"
-      {"LSTM", ONNXOpCode::opLSTM, ONNXOpSupportState::unSupported},
-#line 122 "ONNXPerfect.gperf"
-      {"Slice", ONNXOpCode::opSlice, ONNXOpSupportState::unSupported},
-#line 83 "ONNXPerfect.gperf"
-      {"LpPool", ONNXOpCode::opLpPool, ONNXOpSupportState::unSupported},
-#line 49 "ONNXPerfect.gperf"
-      {"ConstantLike", ONNXOpCode::opConstantLike, ONNXOpSupportState::unSupported},
-#line 51 "ONNXPerfect.gperf"
-      {"ConvTranspose", ONNXOpCode::opConvTranspose, ONNXOpSupportState::unSupported},
-#line 143 "ONNXPerfect.gperf"
-      {"Crop", ONNXOpCode::opCrop, ONNXOpSupportState::unSupported},
-#line 104 "ONNXPerfect.gperf"
-      {"ReduceL1", ONNXOpCode::opReduceL1, ONNXOpSupportState::unSupported},
-      {""},
-#line 67 "ONNXPerfect.gperf"
-      {"GlobalLpPool", ONNXOpCode::opGlobalLpPool, ONNXOpSupportState::unSupported},
-#line 68 "ONNXPerfect.gperf"
-      {"GlobalMaxPool", ONNXOpCode::opGlobalMaxPool, ONNXOpSupportState::unSupported},
-#line 44 "ONNXPerfect.gperf"
-      {"Cast", ONNXOpCode::opCast, ONNXOpSupportState::unSupported},
-#line 107 "ONNXPerfect.gperf"
-      {"ReduceLogSumExp", ONNXOpCode::opReduceLogSumExp, ONNXOpSupportState::unSupported},
-#line 64 "ONNXPerfect.gperf"
-      {"Gather", ONNXOpCode::opGather, ONNXOpSupportState::unSupported},
-#line 66 "ONNXPerfect.gperf"
-      {"GlobalAveragePool", ONNXOpCode::opGlobalAveragePool, ONNXOpSupportState::unSupported},
-#line 90 "ONNXPerfect.gperf"
-      {"Mul", ONNXOpCode::opMul, ONNXOpSupportState::unSupported},
-#line 81 "ONNXPerfect.gperf"
-      {"Loop", ONNXOpCode::opLoop, ONNXOpSupportState::unSupported},
-#line 82 "ONNXPerfect.gperf"
-      {"LpNormalization", ONNXOpCode::opLpNormalization, ONNXOpSupportState::unSupported},
-#line 70 "ONNXPerfect.gperf"
-      {"HardSigmoid", ONNXOpCode::opHardSigmoid, ONNXOpSupportState::unSupported},
-#line 53 "ONNXPerfect.gperf"
-      {"DepthToSpace", ONNXOpCode::opDepthToSpace, ONNXOpSupportState::unSupported},
-#line 125 "ONNXPerfect.gperf"
-      {"Softsign", ONNXOpCode::opSoftsign, ONNXOpSupportState::unSupported},
-#line 114 "ONNXPerfect.gperf"
-      {"Relu", ONNXOpCode::opRelu, ONNXOpSupportState::fullySupported},
-#line 111 "ONNXPerfect.gperf"
-      {"ReduceProd", ONNXOpCode::opReduceProd, ONNXOpSupportState::unSupported},
-#line 91 "ONNXPerfect.gperf"
-      {"Multinomial", ONNXOpCode::opMultinomial, ONNXOpSupportState::unSupported},
-#line 69 "ONNXPerfect.gperf"
-      {"Greater", ONNXOpCode::opGreater, ONNXOpSupportState::unSupported},
-#line 101 "ONNXPerfect.gperf"
-      {"RandomUniform", ONNXOpCode::opRandomUniform, ONNXOpSupportState::unSupported},
-#line 112 "ONNXPerfect.gperf"
-      {"ReduceSum", ONNXOpCode::opReduceSum, ONNXOpSupportState::unSupported},
-      {""},
-#line 47 "ONNXPerfect.gperf"
-      {"Concat", ONNXOpCode::opConcat, ONNXOpSupportState::fullySupported},
-#line 106 "ONNXPerfect.gperf"
-      {"ReduceLogSum", ONNXOpCode::opReduceLogSum, ONNXOpSupportState::unSupported},
-#line 48 "ONNXPerfect.gperf"
-      {"Constant", ONNXOpCode::opConstant, ONNXOpSupportState::unSupported},
-#line 77 "ONNXPerfect.gperf"
-      {"LeakyRelu", ONNXOpCode::opLeakyRelu, ONNXOpSupportState::unSupported},
-#line 118 "ONNXPerfect.gperf"
-      {"Shape", ONNXOpCode::opShape, ONNXOpSupportState::unSupported},
-#line 39 "ONNXPerfect.gperf"
-      {"ArgMin", ONNXOpCode::opArgMin, ONNXOpSupportState::unSupported},
-#line 61 "ONNXPerfect.gperf"
-      {"Flatten", ONNXOpCode::opFlatten, ONNXOpSupportState::unSupported},
-#line 93 "ONNXPerfect.gperf"
-      {"Not", ONNXOpCode::opNot, ONNXOpSupportState::unSupported},
-#line 50 "ONNXPerfect.gperf"
-      {"Conv", ONNXOpCode::opConv, ONNXOpSupportState::fullySupported},
-#line 62 "ONNXPerfect.gperf"
-      {"Floor", ONNXOpCode::opFloor, ONNXOpSupportState::unSupported},
-      {""},
-#line 145 "ONNXPerfect.gperf"
-      {"GRUUnit", ONNXOpCode::opGRUUnit, ONNXOpSupportState::unSupported},
-#line 85 "ONNXPerfect.gperf"
-      {"Max", ONNXOpCode::opMax, ONNXOpSupportState::unSupported},
-#line 117 "ONNXPerfect.gperf"
-      {"Selu", ONNXOpCode::opSelu, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-#line 71 "ONNXPerfect.gperf"
-      {"Hardmax", ONNXOpCode::opHardmax, ONNXOpSupportState::unSupported},
-#line 89 "ONNXPerfect.gperf"
-      {"Min", ONNXOpCode::opMin, ONNXOpSupportState::unSupported},
-#line 65 "ONNXPerfect.gperf"
-      {"Gemm", ONNXOpCode::opGemm, ONNXOpSupportState::unSupported},
-      {""},
-#line 141 "ONNXPerfect.gperf"
-      {"Affine", ONNXOpCode::opAffine, ONNXOpSupportState::unSupported},
-#line 55 "ONNXPerfect.gperf"
-      {"Dropout", ONNXOpCode::opDropout, ONNXOpSupportState::fullySupported},
-#line 56 "ONNXPerfect.gperf"
-      {"Elu", ONNXOpCode::opElu, ONNXOpSupportState::unSupported},
-#line 108 "ONNXPerfect.gperf"
-      {"ReduceMax", ONNXOpCode::opReduceMax, ONNXOpSupportState::unSupported},
-#line 127 "ONNXPerfect.gperf"
-      {"Split", ONNXOpCode::opSplit, ONNXOpSupportState::fullySupported},
-      {""},
-#line 126 "ONNXPerfect.gperf"
-      {"SpaceToDepth", ONNXOpCode::opSpaceToDepth, ONNXOpSupportState::unSupported},
-#line 37 "ONNXPerfect.gperf"
-      {"And", ONNXOpCode::opAnd, ONNXOpSupportState::unSupported},
-#line 41 "ONNXPerfect.gperf"
-      {"Atan", ONNXOpCode::opAtan, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-#line 94 "ONNXPerfect.gperf"
-      {"Or", ONNXOpCode::opOr, ONNXOpSupportState::unSupported},
-#line 130 "ONNXPerfect.gperf"
-      {"Sub", ONNXOpCode::opSub, ONNXOpSupportState::unSupported},
-#line 116 "ONNXPerfect.gperf"
-      {"Scan", ONNXOpCode::opScan, ONNXOpSupportState::unSupported},
-#line 149 "ONNXPerfect.gperf"
-      {"Scale", ONNXOpCode::opScale, ONNXOpSupportState::partiallySupported},
-      {""},
-#line 129 "ONNXPerfect.gperf"
-      {"Squeeze", ONNXOpCode::opSqueeze, ONNXOpSupportState::unSupported},
-#line 120 "ONNXPerfect.gperf"
-      {"Sin", ONNXOpCode::opSin, ONNXOpSupportState::unSupported},
-#line 121 "ONNXPerfect.gperf"
-      {"Size", ONNXOpCode::opSize, ONNXOpSupportState::unSupported},
-#line 80 "ONNXPerfect.gperf"
-      {"LogSoftmax", ONNXOpCode::opLogSoftmax, ONNXOpSupportState::unSupported},
-#line 42 "ONNXPerfect.gperf"
-      {"AveragePool", ONNXOpCode::opAveragePool, ONNXOpSupportState::fullySupported},
-#line 144 "ONNXPerfect.gperf"
-      {"DynamicSlice", ONNXOpCode::opDynamicSlice, ONNXOpSupportState::unSupported},
-#line 43 "ONNXPerfect.gperf"
-      {"BatchNormalization", ONNXOpCode::opBatchNormalization, ONNXOpSupportState::fullySupported},
-      {""},
-#line 57 "ONNXPerfect.gperf"
-      {"Equal", ONNXOpCode::opEqual, ONNXOpSupportState::unSupported},
-#line 137 "ONNXPerfect.gperf"
-      {"Unsqueeze", ONNXOpCode::opUnsqueeze, ONNXOpSupportState::unSupported},
-#line 60 "ONNXPerfect.gperf"
-      {"EyeLike", ONNXOpCode::opEyeLike, ONNXOpSupportState::unSupported},
-#line 131 "ONNXPerfect.gperf"
-      {"Sum", ONNXOpCode::opSum, ONNXOpSupportState::unSupported},
-#line 78 "ONNXPerfect.gperf"
-      {"Less", ONNXOpCode::opLess, ONNXOpSupportState::unSupported},
-#line 146 "ONNXPerfect.gperf"
-      {"GivenTensorFill", ONNXOpCode::opGivenTensorFill, ONNXOpSupportState::unSupported},
-      {""},
-#line 123 "ONNXPerfect.gperf"
-      {"Softmax", ONNXOpCode::opSoftmax, ONNXOpSupportState::fullySupported},
-#line 52 "ONNXPerfect.gperf"
-      {"Cos", ONNXOpCode::opCos, ONNXOpSupportState::unSupported},
-      {""},
-#line 63 "ONNXPerfect.gperf"
-      {"GRU", ONNXOpCode::opGRU, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-#line 36 "ONNXPerfect.gperf"
-      {"Add", ONNXOpCode::opAdd, ONNXOpSupportState::unSupported},
-      {""},
-#line 138 "ONNXPerfect.gperf"
-      {"Upsample", ONNXOpCode::opUpsample, ONNXOpSupportState::unSupported},
-      {""},
-#line 73 "ONNXPerfect.gperf"
-      {"If", ONNXOpCode::opIf, ONNXOpSupportState::unSupported},
-#line 132 "ONNXPerfect.gperf"
-      {"Tan", ONNXOpCode::opTan, ONNXOpSupportState::unSupported},
-#line 128 "ONNXPerfect.gperf"
-      {"Sqrt", ONNXOpCode::opSqrt, ONNXOpSupportState::unSupported},
-#line 150 "ONNXPerfect.gperf"
-      {"ScaledTanh", ONNXOpCode::opScaledTanh, ONNXOpSupportState::unSupported},
-#line 38 "ONNXPerfect.gperf"
-      {"ArgMax", ONNXOpCode::opArgMax, ONNXOpSupportState::unSupported},
-      {""},
-#line 58 "ONNXPerfect.gperf"
-      {"Exp", ONNXOpCode::opExp, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-#line 147 "ONNXPerfect.gperf"
-      {"ImageScaler", ONNXOpCode::opImageScaler, ONNXOpSupportState::unSupported},
-#line 119 "ONNXPerfect.gperf"
-      {"Sigmoid", ONNXOpCode::opSigmoid, ONNXOpSupportState::unSupported},
-#line 96 "ONNXPerfect.gperf"
-      {"Pad", ONNXOpCode::opPad, ONNXOpSupportState::unSupported},
-#line 135 "ONNXPerfect.gperf"
-      {"TopK", ONNXOpCode::opTopK, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-      {""},
-#line 124 "ONNXPerfect.gperf"
-      {"Softplus", ONNXOpCode::opSoftplus, ONNXOpSupportState::unSupported},
-#line 136 "ONNXPerfect.gperf"
-      {"Transpose", ONNXOpCode::opTranspose, ONNXOpSupportState::unSupported},
-#line 95 "ONNXPerfect.gperf"
-      {"PRelu", ONNXOpCode::opPRelu, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-#line 54 "ONNXPerfect.gperf"
-      {"Div", ONNXOpCode::opDiv, ONNXOpSupportState::unSupported},
-#line 40 "ONNXPerfect.gperf"
-      {"Asin", ONNXOpCode::opAsin, ONNXOpSupportState::unSupported},
-      {""},
-#line 59 "ONNXPerfect.gperf"
-      {"Expand", ONNXOpCode::opExpand, ONNXOpSupportState::unSupported},
-      {""},
-#line 92 "ONNXPerfect.gperf"
-      {"Neg", ONNXOpCode::opNeg, ONNXOpSupportState::unSupported},
-#line 133 "ONNXPerfect.gperf"
-      {"Tanh", ONNXOpCode::opTanh, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-      {""},
-#line 79 "ONNXPerfect.gperf"
-      {"Log", ONNXOpCode::opLog, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-      {""},
-      {""},
-#line 97 "ONNXPerfect.gperf"
-      {"Pow", ONNXOpCode::opPow, ONNXOpSupportState::unSupported},
-#line 74 "ONNXPerfect.gperf"
-      {"InstanceNormalizati", ONNXOpCode::opInstanceNormalizati, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-      {""},
-#line 34 "ONNXPerfect.gperf"
-      {"Abs", ONNXOpCode::opAbs, ONNXOpSupportState::unSupported},
-#line 140 "ONNXPerfect.gperf"
-      {"ATen", ONNXOpCode::opATen, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-      {""},
-#line 72 "ONNXPerfect.gperf"
-      {"Identity", ONNXOpCode::opIdentity, ONNXOpSupportState::fullySupported},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-#line 134 "ONNXPerfect.gperf"
-      {"Tile", ONNXOpCode::opTile, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-      {""},
-#line 35 "ONNXPerfect.gperf"
-      {"Acos", ONNXOpCode::opAcos, ONNXOpSupportState::unSupported},
-#line 151 "ONNXPerfect.gperf"
-      {"ThresholdedRelu", ONNXOpCode::opThresholdedRelu, ONNXOpSupportState::unSupported},
-      {""},
-      {""},
-#line 148 "ONNXPerfect.gperf"
-      {"ParametricSoftplus", ONNXOpCode::opParametricSoftplus, ONNXOpSupportState::unSupported}};
-
-  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
-  {
-    unsigned int key = hash(str, len);
-
-    if (key <= MAX_HASH_VALUE)
-    {
-      const char *s = wordlist[key].name;
-
-      if (*str == *s && !strcmp(str + 1, s + 1))
-        return &wordlist[key];
-    }
-  }
-  return nullptr;
-} // ONNXPerfectHash::getONNXOpType (const char *str, size_t len)
-
-} // namespace mir_onnx