Skip to content

Commit

Permalink
[NeoOnnx] Fix compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Kirill Golikov <kirill.golikov@abbyy.com>
  • Loading branch information
favorart committed May 7, 2024
1 parent 099c513 commit 00110a3
Show file tree
Hide file tree
Showing 46 changed files with 136 additions and 46 deletions.
4 changes: 3 additions & 1 deletion NeoOnnx/src/GraphInitializer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.
#include "GraphInitializer.h"
#include "TensorUtils.h"

using namespace NeoML;

namespace NeoOnnx {

CGraphInitializer::CGraphInitializer( const onnx::TensorProto& _initializer ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/GraphOutput.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.
#include "GraphOutput.h"
#include "TensorUtils.h"

using namespace NeoML;

namespace NeoOnnx {

CGraphOutput::CGraphOutput( const onnx::ValueInfoProto& output ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/LayerOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,8 @@ limitations under the License.

#include "LayerOperator.h"

using namespace NeoML;

namespace NeoOnnx {

// Returns true if some of the inputs are CUserTensor
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/NeoOnnxImport.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2023 ABBYY
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,6 +30,8 @@ limitations under the License.
#include "GraphOutput.h"
#include "Optimization/DnnOptimizer.h"

using namespace NeoML;

namespace NeoOnnx {

// Checks if all of the operators are supported by NeoOnnx
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2023 ABBYY
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -64,6 +64,8 @@ limitations under the License.
#include "Operators/UnsqueezeOperator.h"
#include "Operators/UpsampleOperator.h"

using namespace NeoML;

namespace NeoOnnx {

// Registers the given NeoOnnx class (e.g. CConvOperator) as an onnx operator with given opType ('Conv')
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/ArgMaxOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2022 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.
#include "ArgMaxOperator.h"
#include "NeoOnnxCheck.h"

using namespace NeoML;

namespace NeoOnnx {

CArgMaxOperator::CArgMaxOperator( const onnx::NodeProto& argMax, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/BatchNormalizationOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,8 @@ limitations under the License.
#include "NeoOnnxCheck.h"
#include "TensorUtils.h"

using namespace NeoML;

namespace NeoOnnx {

// Calculates NeoML::CBatchNormalizationLayer's final params blob from onnx operator's inputs
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/CastOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2021 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,8 @@ limitations under the License.

#include <NeoML/Dnn/Layers/Onnx/OnnxCastLayer.h>

using namespace NeoML;

namespace NeoOnnx {

CCastOperator::CCastOperator( const onnx::NodeProto& cast, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/ConcatOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,8 @@ limitations under the License.

#include <NeoML/Dnn/Layers/Onnx/OnnxConcatLayer.h>

using namespace NeoML;

namespace NeoOnnx {

CConcatOperator::CConcatOperator( const onnx::NodeProto& concat, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/ConstantOfShapeOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,8 @@ limitations under the License.

#include <NeoML/Dnn/Layers/Onnx/OnnxConstantOfShapeLayer.h>

using namespace NeoML;

namespace NeoOnnx {

CConstantOfShapeOperator::CConstantOfShapeOperator( const onnx::NodeProto& constantOfShape, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/ConstantOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CConstantOperator::CConstantOperator( const onnx::NodeProto& constant, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/ConvTransposeOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2023 ABBYY
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,8 @@ limitations under the License.

#include <NeoML/Dnn/Layers/Onnx/OnnxConvTransposeLayer.h>

using namespace NeoML;

namespace NeoOnnx {

// Gets kernel shape
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/CumSumOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2022 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,8 @@ limitations under the License.

#include "CumSumOperator.h"

using namespace NeoML;

namespace NeoOnnx {

CCumSumOperator::CCumSumOperator( const onnx::NodeProto& cumSum, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/DepthToSpaceOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,8 @@ limitations under the License.

#include "DepthToSpaceOperator.h"

using namespace NeoML;

namespace NeoOnnx {

CDepthToSpaceOperator::CDepthToSpaceOperator( const onnx::NodeProto& depthToSpace, int opsetVersion ) :
Expand Down
2 changes: 1 addition & 1 deletion NeoOnnx/src/Operators/DepthToSpaceOperator.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/DropoutOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CDropoutOperator::CDropoutOperator( const onnx::NodeProto& dropout, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/ExpandOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2022 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,8 @@ limitations under the License.
#include "NeoOnnxCheck.h"
#include <NeoML/Dnn/Layers/Onnx/OnnxExpandLayer.h>

using namespace NeoML;

namespace NeoOnnx {

CExpandOperator::CExpandOperator( const onnx::NodeProto& expand, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/FlattenOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CTransformLayer* createTransformLayer( const CLayerOutput& link, const CString& name )
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/GatherOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2021 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -25,6 +25,8 @@ limitations under the License.

#include <NeoML/Dnn/Layers/Onnx/OnnxGatherLayer.h>

using namespace NeoML;

namespace NeoOnnx {

CGatherOperator::CGatherOperator( const onnx::NodeProto& gather, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/GemmOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CGemmOperator::CGemmOperator( const onnx::NodeProto& gemm, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/IdentityOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CIdentityOperator::CIdentityOperator( const onnx::NodeProto& identity, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/InstanceNormalizationOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2022 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,8 @@ limitations under the License.
#include "NeoOnnxCheck.h"
#include "TensorUtils.h"

using namespace NeoML;

namespace NeoOnnx {

// Validator for InstanceNorm operator
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/LogicalOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2022 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,8 @@ limitations under the License.

#include "LogicalOperator.h"

using namespace NeoML;

namespace NeoOnnx {

CNotOperator::CNotOperator( const onnx::NodeProto& notNode, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/LrnOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CLrnOperator::CLrnOperator( const onnx::NodeProto& lrn, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/LstmOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2023 ABBYY
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,6 +26,8 @@ limitations under the License.

#include <algorithm>

using namespace NeoML;

namespace NeoOnnx {

CLstmOperator::CLstmOperator( const onnx::NodeProto& lstm, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/MatMulOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2020 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -24,6 +24,8 @@ limitations under the License.

#include "onnx.pb.h"

using namespace NeoML;

namespace NeoOnnx {

CMatMulOperator::CMatMulOperator( const onnx::NodeProto& matMul, int opsetVersion ) :
Expand Down
4 changes: 3 additions & 1 deletion NeoOnnx/src/Operators/NonZeroOperator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright © 2017-2022 ABBYY Production LLC
/* Copyright © 2017-2024 ABBYY
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,6 +26,8 @@ limitations under the License.
#include <NeoML/Dnn/Layers/Onnx/OnnxRangeLayer.h>
#include <NeoML/Dnn/Layers/Onnx/OnnxSourceHelper.h>

using namespace NeoML;

namespace NeoOnnx {

static CPtr<const CShapeTensor> addNonZeroOpSourceHelper( const CString& name, CDnn& dnn, int value )
Expand Down
Loading

0 comments on commit 00110a3

Please sign in to comment.