diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_scatter_nd_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_scatter_nd_parser.cc new file mode 100644 index 00000000000..348cb0bcede --- /dev/null +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_scatter_nd_parser.cc @@ -0,0 +1,30 @@ +/** + * Copyright 2021 Huawei Technologies Co., Ltd + * + * 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 "tools/converter/parser/onnx/onnx_scatter_nd_parser.h" +#include +#include "ops/scatter_nd.h" + +namespace mindspore { +namespace lite { +ops::PrimitiveC *OnnxScatterNdParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::NodeProto &onnx_node) { + auto prim = std::make_unique(); + return prim.release(); +} + +OnnxNodeRegistrar g_onnxScatterNdParser("ScatterND", new OnnxScatterNdParser()); +} // namespace lite +} // namespace mindspore diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_scatter_nd_parser.h b/mindspore/lite/tools/converter/parser/onnx/onnx_scatter_nd_parser.h new file mode 100644 index 00000000000..d21f67e476f --- /dev/null +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_scatter_nd_parser.h @@ -0,0 +1,34 @@ +/** + * Copyright 2021 Huawei Technologies Co., Ltd + * + * 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 MINDSPORE_LITE_TOOLS_CONVERTER_PARSER_ONNX_SCATTER_ND_PARSER_H +#define MINDSPORE_LITE_TOOLS_CONVERTER_PARSER_ONNX_SCATTER_ND_PARSER_H + +#include "tools/converter/parser/onnx/onnx_node_parser.h" +#include "tools/converter/parser/onnx/onnx_node_parser_registry.h" + +namespace mindspore { +namespace lite { +class OnnxScatterNdParser : public OnnxNodeParser { + public: + OnnxScatterNdParser() : OnnxNodeParser("ScatterNd") {} + ~OnnxScatterNdParser() override = default; + + ops::PrimitiveC *Parse(const onnx::GraphProto &onnx_graph, const onnx::NodeProto &onnx_node) override; +}; +} // namespace lite +} // namespace mindspore +#endif // MINDSPORE_LITE_TOOLS_CONVERTER_PARSER_ONNX_WHERE_PARSER_H