Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::SOFIE Namespace Reference

Namespaces

namespace  BLAS
 
namespace  PyKeras
 
namespace  PyTorch
 
namespace  UTILITY
 

Classes

struct  BinaryOperatorTrait
 
struct  BinaryOperatorTrait< T, Add >
 
struct  BinaryOperatorTrait< T, Div >
 
struct  BinaryOperatorTrait< T, Mul >
 
struct  BinaryOperatorTrait< T, Pow >
 
struct  BinaryOperatorTrait< T, Sub >
 
struct  ComparisionTrait
 
struct  ComparisionTrait< T, Eq >
 
struct  ComparisionTrait< T, Greater >
 
struct  ComparisionTrait< T, GreaterEq >
 
struct  ComparisionTrait< T, Less >
 
struct  ComparisionTrait< T, LessEq >
 
struct  Dim
 
struct  DynamicTensorInfo
 
struct  ExtractDataFromTP
 
struct  ExtractDataFromTP< double >
 
struct  ExtractDataFromTP< float >
 
struct  ExtractDataFromTP< int32_t >
 
struct  ExtractDataFromTP< int64_t >
 
struct  GNN_Data
 
struct  GNN_Init
 
struct  GraphIndependent_Init
 
class  InitializedTensor
 
struct  InputTensorInfo
 
struct  NaryOperatorTraits
 
struct  NaryOperatorTraits< float, EBasicNaryOperator::Mean >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Max >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Mean >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Min >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Sum >
 
struct  RAttributes_Pool
 
class  RFunction
 
class  RFunction_Aggregate
 
class  RFunction_Mean
 
class  RFunction_MLP
 
class  RFunction_Sum
 
class  RFunction_Update
 
class  RModel
 
class  RModel_Base
 
class  RModel_GNN
 
class  RModel_GNNBase
 
class  RModel_GraphIndependent
 
class  RModelParser_ONNX
 
class  ROperator
 
class  ROperator_BasicBinary
 
class  ROperator_BasicNary
 
class  ROperator_BasicUnary
 
class  ROperator_BatchNormalization
 
class  ROperator_Cast
 
class  ROperator_Comparision
 
class  ROperator_Concat
 
class  ROperator_Constant
 
class  ROperator_Conv
 
class  ROperator_ConvTranspose
 Transposed Convolution operator. More...
 
class  ROperator_Custom
 
class  ROperator_Elu
 
class  ROperator_Erf
 
class  ROperator_Expand
 
class  ROperator_EyeLike
 
class  ROperator_Gather
 
class  ROperator_Gemm
 
class  ROperator_GRU
 Gated Recurrent Unit operator. More...
 
class  ROperator_Identity
 
class  ROperator_If
 
class  ROperator_LayerNormalization
 
class  ROperator_LeakyRelu
 
class  ROperator_LSTM
 Long Short-Term Memory operator. More...
 
class  ROperator_Pool
 
class  ROperator_Range
 
class  ROperator_Reduce
 
class  ROperator_Relu
 
class  ROperator_Reshape
 
class  ROperator_RNN
 Recurrent Neural Network operator. More...
 
class  ROperator_Selu
 
class  ROperator_Shape
 
class  ROperator_Sigmoid
 
class  ROperator_Slice
 
class  ROperator_Softmax
 
class  ROperator_Split
 
class  ROperator_Swish
 
class  ROperator_Tanh
 
class  ROperator_Tile
 
class  ROperator_TopK
 
class  ROperator_Transpose
 
struct  TensorInfo
 
struct  TensorType
 
struct  TensorType< double >
 
struct  TensorType< float >
 
struct  TensorType< int32_t >
 
struct  TensorType< int64_t >
 
struct  TensorType< uint32_t >
 
struct  TensorType< uint64_t >
 
struct  UnaryOpTraits
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kExp >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kLog >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kNeg >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kReciprocal >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kSqrt >
 

Typedefs

typedef std::int64_t int_t
 
using ParserFuncSignature = std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)>
 
using ParserFuseFuncSignature = std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &, const onnx::NodeProto &)>
 

Enumerations

enum class  Activation { RELU = 0x0 , Invalid = 0x1 }
 
enum  EBasicBinaryOperator {
  Add , Sub , Mul , Div ,
  Pow
}
 
enum class  EBasicNaryOperator { Max , Min , Mean , Sum }
 
enum class  EBasicUnaryOperator {
  kReciprocal , kSqrt , kNeg , kExp ,
  kLog
}
 
enum  EComparisionOperator {
  Eq , Less , LessEq , Greater ,
  GreaterEq
}
 
enum  EReduceOpMode {
  ReduceMean , ReduceSum , ReduceSumSquare , ReduceProd ,
  InvalidReduceOp
}
 
enum class  ETensorType {
  UNDEFINED = 0 , FLOAT = 1 , UNINT8 = 2 , INT8 = 3 ,
  UINT16 = 4 , INT16 = 5 , INT32 = 6 , INT64 = 7 ,
  STRING = 8 , BOOL = 9 , FLOAT16 = 10 , DOUBLE = 11 ,
  UINT32 = 12 , UINT64 = 13 , COMPLEX64 = 14 , COMPLEX28 = 15 ,
  BFLOAT16 = 16
}
 
enum class  FunctionReducer { INVALID = 0 , SUM = 1 , MEAN = 2 }
 
enum class  FunctionRelation { INVALID = 0 , NODES_EDGES = 1 , NODES_GLOBALS = 2 , EDGES_GLOBALS = 3 }
 
enum class  FunctionTarget { INVALID = 0 , NODES = 1 , EDGES = 2 , GLOBALS = 3 }
 
enum class  FunctionType { UPDATE = 0 , AGGREGATE = 1 }
 
enum class  GraphType { INVALID = 0 , GNN = 1 , GraphIndependent = 2 }
 
enum class  Options {
  kDefault = 0x0 , kNoSession = 0x1 , kNoWeightFile = 0x2 , kRootBinaryWeightFile = 0x4 ,
  kGNN = 0x8 , kGNNComponent = 0x10
}
 
enum  PoolOpMode { InvalidPool , MaxPool , AveragePool , GlobalAveragePool }
 
enum  ReshapeOpMode { Reshape , Flatten , Squeeze , Unsqueeze }
 
enum class  WeightFileType { None , RootBinary , Text }
 

Functions

GNN_Data Concatenate (GNN_Data &data1, GNN_Data &data2, int axis=0)
 
template<typename T >
TMVA::Experimental::RTensor< T > Concatenate (TMVA::Experimental::RTensor< T > &t1, TMVA::Experimental::RTensor< T > &t2, int axis=0)
 
std::string ConvertDynamicShapeToLength (std::vector< Dim > shape)
 
std::string ConvertDynamicShapeToString (std::vector< Dim > shape)
 
std::vector< DimConvertShapeToDim (std::vector< size_t > shape)
 Convert shape from integer format to dynamic one (based on Dim)
 
std::vector< size_t > ConvertShapeToInt (std::vector< Dim > shape)
 Convert shape based on Dim to integer format.
 
std::size_t ConvertShapeToLength (std::vector< size_t > shape)
 
std::string ConvertShapeToString (std::vector< size_t > shape)
 
ETensorType ConvertStringToType (std::string type)
 
std::string ConvertTypeToString (ETensorType type)
 
template<class T >
std::string ConvertValuesToString (const std::vector< T > &data)
 
template<class T >
std::string ConvertValuesToString (size_t n, const T *data)
 
GNN_Data Copy (const GNN_Data &data)
 
template<typename T >
std::shared_ptr< void > GetInitializedTensorData (onnx::TensorProto *tensorproto, size_t length)
 
template<typename T >
ETensorType GetTemplatedType (T)
 
std::underlying_type_t< Optionsoperator| (Options opA, Options opB)
 
std::underlying_type_t< Optionsoperator| (std::underlying_type_t< Options > opA, Options opB)
 
template<EBasicBinaryOperator Op>
std::unique_ptr< ROperatorParseBasicBinary (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EBasicNaryOperator Op>
std::unique_ptr< ROperatorParseBasicNary (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EBasicUnaryOperator Op>
std::unique_ptr< ROperatorParseBasicUnary (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EComparisionOperator Op>
std::unique_ptr< ROperatorParseComparision (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EReduceOpMode Op>
std::unique_ptr< ROperatorParseReduce (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 

Variables

ParserFuncSignature ParseAdd
 
ParserFuncSignature ParseBatchNormalization
 
ParserFuncSignature ParseCast
 
ParserFuncSignature ParseConcat
 
ParserFuncSignature ParseConstant
 
ParserFuncSignature ParseConv
 
ParserFuncSignature ParseConvTranspose
 
ParserFuncSignature ParseDiv
 
ParserFuncSignature ParseElu
 
ParserFuncSignature ParseEq
 
ParserFuncSignature ParseErf
 
ParserFuncSignature ParseExp
 
ParserFuncSignature ParseExpand
 
ParserFuncSignature ParseEyeLike
 
ParserFuseFuncSignature ParseFuseConvAdd
 
ParserFuseFuncSignature ParseFuseConvTransposeAdd
 
ParserFuseFuncSignature ParseFuseMatMulAdd
 
ParserFuncSignature ParseGather
 
ParserFuncSignature ParseGemm
 
ParserFuncSignature ParseGreater
 
ParserFuncSignature ParseGreaterEq
 
ParserFuncSignature ParseGRU
 
ParserFuncSignature ParseIdentity
 
ParserFuncSignature ParseIf
 
ParserFuncSignature ParseLayerNormalization
 
ParserFuncSignature ParseLeakyRelu
 
ParserFuncSignature ParseLess
 
ParserFuncSignature ParseLessEq
 
ParserFuncSignature ParseLog
 
ParserFuncSignature ParseLSTM
 
ParserFuncSignature ParseMatMul
 
ParserFuncSignature ParseMax
 
ParserFuncSignature ParseMean
 
ParserFuncSignature ParseMin
 
ParserFuncSignature ParseMul
 
ParserFuncSignature ParseNeg
 
ParserFuncSignature ParsePool
 
ParserFuncSignature ParsePow
 
ParserFuncSignature ParseRange
 
ParserFuncSignature ParseReciprocal
 
ParserFuncSignature ParseReduceMean
 
ParserFuncSignature ParseReduceProd
 
ParserFuncSignature ParseReduceSum
 
ParserFuncSignature ParseReduceSumSquare
 
ParserFuncSignature ParseRelu
 
ParserFuncSignature ParseReshape
 
ParserFuncSignature ParseRNN
 
ParserFuncSignature ParseSelu
 
ParserFuncSignature ParseShape
 
ParserFuncSignature ParseSigmoid
 
ParserFuncSignature ParseSlice
 
ParserFuncSignature ParseSoftmax
 
ParserFuncSignature ParseSplit
 
ParserFuncSignature ParseSqrt
 
ParserFuncSignature ParseSub
 
ParserFuncSignature ParseSum
 
ParserFuncSignature ParseTanh
 
ParserFuncSignature ParseTile
 
ParserFuncSignature ParseTopK
 
ParserFuncSignature ParseTranspose
 

Typedef Documentation

◆ int_t

typedef std::int64_t TMVA::Experimental::SOFIE::int_t

Definition at line 30 of file SOFIE_common.hxx.

◆ ParserFuncSignature

using TMVA::Experimental::SOFIE::ParserFuncSignature = typedef std::function<std::unique_ptr<ROperator>(RModelParser_ONNX & , const onnx::NodeProto & )>

Definition at line 22 of file RModelParser_ONNX.hxx.

◆ ParserFuseFuncSignature

using TMVA::Experimental::SOFIE::ParserFuseFuncSignature = typedef std::function<std::unique_ptr<ROperator> (RModelParser_ONNX& , const onnx::NodeProto& , const onnx::NodeProto& )>

Definition at line 24 of file RModelParser_ONNX.hxx.

Enumeration Type Documentation

◆ Activation

Enumerator
RELU 
Invalid 

Definition at line 13 of file RFunction_MLP.hxx.

◆ EBasicBinaryOperator

Enumerator
Add 
Sub 
Mul 
Div 
Pow 

Definition at line 14 of file ROperator_BasicBinary.hxx.

◆ EBasicNaryOperator

Enumerator
Max 
Min 
Mean 
Sum 

Definition at line 16 of file ROperator_BasicNary.hxx.

◆ EBasicUnaryOperator

Enumerator
kReciprocal 
kSqrt 
kNeg 
kExp 
kLog 

Definition at line 12 of file ROperator_BasicUnary.hxx.

◆ EComparisionOperator

Enumerator
Eq 
Less 
LessEq 
Greater 
GreaterEq 

Definition at line 15 of file ROperator_Comparision.hxx.

◆ EReduceOpMode

Enumerator
ReduceMean 
ReduceSum 
ReduceSumSquare 
ReduceProd 
InvalidReduceOp 

Definition at line 19 of file ROperator_Reduce.hxx.

◆ ETensorType

Enumerator
UNDEFINED 
FLOAT 
UNINT8 
INT8 
UINT16 
INT16 
INT32 
INT64 
STRING 
BOOL 
FLOAT16 
DOUBLE 
UINT32 
UINT64 
COMPLEX64 
COMPLEX28 
BFLOAT16 

Definition at line 25 of file SOFIE_common.hxx.

◆ FunctionReducer

Enumerator
INVALID 
SUM 
MEAN 

Definition at line 99 of file RModel_Base.hxx.

◆ FunctionRelation

Enumerator
INVALID 
NODES_EDGES 
NODES_GLOBALS 
EDGES_GLOBALS 

Definition at line 100 of file RModel_Base.hxx.

◆ FunctionTarget

Enumerator
INVALID 
NODES 
EDGES 
GLOBALS 

Definition at line 98 of file RModel_Base.hxx.

◆ FunctionType

Enumerator
UPDATE 
AGGREGATE 

Definition at line 97 of file RModel_Base.hxx.

◆ GraphType

Enumerator
INVALID 
GNN 
GraphIndependent 

Definition at line 95 of file RModel_Base.hxx.

◆ Options

Enumerator
kDefault 
kNoSession 
kNoWeightFile 
kRootBinaryWeightFile 
kGNN 
kGNNComponent 

Definition at line 22 of file RModel_Base.hxx.

◆ PoolOpMode

Enumerator
InvalidPool 
MaxPool 
AveragePool 
GlobalAveragePool 

Definition at line 31 of file ROperator_Pool.hxx.

◆ ReshapeOpMode

Enumerator
Reshape 
Flatten 
Squeeze 
Unsqueeze 

Definition at line 15 of file ROperator_Reshape.hxx.

◆ WeightFileType

Enumerator
None 
RootBinary 
Text 

Definition at line 31 of file RModel_Base.hxx.

Function Documentation

◆ Concatenate() [1/2]

GNN_Data TMVA::Experimental::SOFIE::Concatenate ( GNN_Data data1,
GNN_Data data2,
int  axis = 0 
)
inline

Definition at line 548 of file SOFIE_common.hxx.

◆ Concatenate() [2/2]

template<typename T >
TMVA::Experimental::RTensor< T > TMVA::Experimental::SOFIE::Concatenate ( TMVA::Experimental::RTensor< T > &  t1,
TMVA::Experimental::RTensor< T > &  t2,
int  axis = 0 
)

Definition at line 511 of file SOFIE_common.hxx.

◆ ConvertDynamicShapeToLength()

std::string TMVA::Experimental::SOFIE::ConvertDynamicShapeToLength ( std::vector< Dim shape)

Definition at line 132 of file SOFIE_common.cxx.

◆ ConvertDynamicShapeToString()

std::string TMVA::Experimental::SOFIE::ConvertDynamicShapeToString ( std::vector< Dim shape)

Definition at line 121 of file SOFIE_common.cxx.

◆ ConvertShapeToDim()

std::vector< Dim > TMVA::Experimental::SOFIE::ConvertShapeToDim ( std::vector< size_t >  shape)

Convert shape from integer format to dynamic one (based on Dim)

Parameters
shape
Returns
shape based on Dim

Definition at line 13 of file SOFIE_common.cxx.

◆ ConvertShapeToInt()

std::vector< size_t > TMVA::Experimental::SOFIE::ConvertShapeToInt ( std::vector< Dim shape)

Convert shape based on Dim to integer format.

Parameters
shape
Returns
shape based on integer. Return an empty shape in case shape is dynamic (has a parameter)

Definition at line 24 of file SOFIE_common.cxx.

◆ ConvertShapeToLength()

std::size_t TMVA::Experimental::SOFIE::ConvertShapeToLength ( std::vector< size_t >  shape)

Definition at line 50 of file SOFIE_common.cxx.

◆ ConvertShapeToString()

std::string TMVA::Experimental::SOFIE::ConvertShapeToString ( std::vector< size_t >  shape)

Definition at line 110 of file SOFIE_common.cxx.

◆ ConvertStringToType()

ETensorType TMVA::Experimental::SOFIE::ConvertStringToType ( std::string  type)

Definition at line 92 of file SOFIE_common.cxx.

◆ ConvertTypeToString()

std::string TMVA::Experimental::SOFIE::ConvertTypeToString ( ETensorType  type)

Definition at line 57 of file SOFIE_common.cxx.

◆ ConvertValuesToString() [1/2]

template<class T >
std::string TMVA::Experimental::SOFIE::ConvertValuesToString ( const std::vector< T > &  data)

Definition at line 97 of file SOFIE_common.hxx.

◆ ConvertValuesToString() [2/2]

template<class T >
std::string TMVA::Experimental::SOFIE::ConvertValuesToString ( size_t  n,
const T *  data 
)

Definition at line 86 of file SOFIE_common.hxx.

◆ Copy()

GNN_Data TMVA::Experimental::SOFIE::Copy ( const GNN_Data data)
inline

Definition at line 558 of file SOFIE_common.hxx.

◆ GetInitializedTensorData()

template<typename T >
std::shared_ptr< void > TMVA::Experimental::SOFIE::GetInitializedTensorData ( onnx::TensorProto *  tensorproto,
size_t  length 
)

Definition at line 127 of file RModelParser_ONNX.cxx.

◆ GetTemplatedType()

template<typename T >
ETensorType TMVA::Experimental::SOFIE::GetTemplatedType ( )

Definition at line 179 of file SOFIE_common.hxx.

◆ operator|() [1/2]

std::underlying_type_t< Options > TMVA::Experimental::SOFIE::operator| ( Options  opA,
Options  opB 
)

Definition at line 16 of file RModel.cxx.

◆ operator|() [2/2]

std::underlying_type_t< Options > TMVA::Experimental::SOFIE::operator| ( std::underlying_type_t< Options opA,
Options  opB 
)

Definition at line 19 of file RModel.cxx.

◆ ParseBasicBinary()

template<EBasicBinaryOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseBasicBinary ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 10 of file ParseBasicBinary.cxx.

◆ ParseBasicNary()

template<EBasicNaryOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseBasicNary ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 11 of file ParseBasicNary.cxx.

◆ ParseBasicUnary()

template<EBasicUnaryOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseBasicUnary ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 10 of file ParseBasicUnary.cxx.

◆ ParseComparision()

template<EComparisionOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseComparision ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 10 of file ParseComparision.cxx.

◆ ParseReduce()

template<EReduceOpMode Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseReduce ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 11 of file ParseReduce.cxx.

Variable Documentation

◆ ParseAdd

ParserFuncSignature TMVA::Experimental::SOFIE::ParseAdd
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Add>(parser, nodeproto);
}

Definition at line 59 of file ParseBasicBinary.cxx.

◆ ParseBatchNormalization

ParserFuncSignature TMVA::Experimental::SOFIE::ParseBatchNormalization

Definition at line 9 of file ParseBatchNormalization.cxx.

◆ ParseCast

ParserFuncSignature TMVA::Experimental::SOFIE::ParseCast
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
auto input_name = nodeproto.input(0);
if (!parser.IsRegisteredTensorType(input_name)) {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Cast op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string attr_type;
for (int_t i = 0; i < nodeproto.attribute_size(); i++) {
std::string attribute_name = nodeproto.attribute(i).name();
if (attribute_name == "to")
attr_type = ConvertTypeToString(static_cast<ETensorType>(nodeproto.attribute(i).i()));
}
std::string output_name = nodeproto.output(0);
op.reset(new ROperator_Cast(attr_type, nodeproto.input(0), output_name));
if (!parser.IsRegisteredTensorType(output_name)) {
ETensorType output_type = ConvertStringToType(attr_type);
parser.RegisterTensorType(output_name, output_type);
}
return op;
}
std::string ConvertTypeToString(ETensorType type)

Definition at line 9 of file ParseCast.cxx.

◆ ParseConcat

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConcat

Definition at line 9 of file ParseConcat.cxx.

◆ ParseConstant

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConstant

Definition at line 11 of file ParseConstant.cxx.

◆ ParseConv

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConv

Definition at line 9 of file ParseConv.cxx.

◆ ParseConvTranspose

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConvTranspose

Definition at line 9 of file ParseConvTranspose.cxx.

◆ ParseDiv

ParserFuncSignature TMVA::Experimental::SOFIE::ParseDiv
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Div>(parser, nodeproto);
}

Definition at line 74 of file ParseBasicBinary.cxx.

◆ ParseElu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseElu

Definition at line 9 of file ParseElu.cxx.

◆ ParseEq

ParserFuncSignature TMVA::Experimental::SOFIE::ParseEq
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseComparision<EComparisionOperator::Eq>(parser, nodeproto);
}

Definition at line 59 of file ParseComparision.cxx.

◆ ParseErf

ParserFuncSignature TMVA::Experimental::SOFIE::ParseErf
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Erf op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Erf<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Erf does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseErf.cxx.

◆ ParseExp

ParserFuncSignature TMVA::Experimental::SOFIE::ParseExp
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kExp>(parser, nodeproto);
}

Definition at line 59 of file ParseBasicUnary.cxx.

◆ ParseExpand

ParserFuncSignature TMVA::Experimental::SOFIE::ParseExpand

Definition at line 9 of file ParseExpand.cxx.

◆ ParseEyeLike

ParserFuncSignature TMVA::Experimental::SOFIE::ParseEyeLike

Definition at line 9 of file ParseEyeLike.cxx.

◆ ParseFuseConvAdd

ParserFuseFuncSignature TMVA::Experimental::SOFIE::ParseFuseConvAdd
Initial value:
= [](RModelParser_ONNX & , const onnx::NodeProto & ,
const onnx::NodeProto & ) {
std::unique_ptr<ROperator> op;
return op;
}

Definition at line 9 of file ParseFuseConvAdd.cxx.

◆ ParseFuseConvTransposeAdd

ParserFuseFuncSignature TMVA::Experimental::SOFIE::ParseFuseConvTransposeAdd

Definition at line 9 of file ParseFuseConvTransposeAdd.cxx.

◆ ParseFuseMatMulAdd

ParserFuseFuncSignature TMVA::Experimental::SOFIE::ParseFuseMatMulAdd

Definition at line 9 of file ParseFuseMatMulAdd.cxx.

◆ ParseGather

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGather

Definition at line 10 of file ParseGather.cxx.

◆ ParseGemm

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGemm

Definition at line 9 of file ParseGemm.cxx.

◆ ParseGreater

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGreater
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseComparision<EComparisionOperator::Greater>(parser, nodeproto);
}

Definition at line 74 of file ParseComparision.cxx.

◆ ParseGreaterEq

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGreaterEq
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseComparision<EComparisionOperator::GreaterEq>(parser, nodeproto);
}

Definition at line 79 of file ParseComparision.cxx.

◆ ParseGRU

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGRU

Definition at line 9 of file ParseGRU.cxx.

◆ ParseIdentity

ParserFuncSignature TMVA::Experimental::SOFIE::ParseIdentity
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type = ETensorType::UNDEFINED;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Identity op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Identity<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Identity does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseIdentity.cxx.

◆ ParseIf

ParserFuncSignature TMVA::Experimental::SOFIE::ParseIf

Definition at line 9 of file ParseIf.cxx.

◆ ParseLayerNormalization

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLayerNormalization

Definition at line 9 of file ParseLayerNormalization.cxx.

◆ ParseLeakyRelu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLeakyRelu

Definition at line 9 of file ParseLeakyRelu.cxx.

◆ ParseLess

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLess
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseComparision<EComparisionOperator::Less>(parser, nodeproto);
}

Definition at line 64 of file ParseComparision.cxx.

◆ ParseLessEq

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLessEq
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseComparision<EComparisionOperator::LessEq>(parser, nodeproto);
}

Definition at line 69 of file ParseComparision.cxx.

◆ ParseLog

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLog
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kLog>(parser, nodeproto);
}

Definition at line 64 of file ParseBasicUnary.cxx.

◆ ParseLSTM

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLSTM

Definition at line 9 of file ParseLSTM.cxx.

◆ ParseMatMul

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMatMul

Definition at line 9 of file ParseMatMul.cxx.

◆ ParseMax

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMax
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Max>(parser, nodeproto);
}

Definition at line 47 of file ParseBasicNary.cxx.

◆ ParseMean

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMean
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Mean>(parser, nodeproto);
}

Definition at line 55 of file ParseBasicNary.cxx.

◆ ParseMin

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMin
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Min>(parser, nodeproto);
}

Definition at line 51 of file ParseBasicNary.cxx.

◆ ParseMul

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMul
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Mul>(parser, nodeproto);
}

Definition at line 69 of file ParseBasicBinary.cxx.

◆ ParseNeg

ParserFuncSignature TMVA::Experimental::SOFIE::ParseNeg
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kNeg>(parser, nodeproto);
}

Definition at line 54 of file ParseBasicUnary.cxx.

◆ ParsePool

ParserFuncSignature TMVA::Experimental::SOFIE::ParsePool

Definition at line 9 of file ParsePool.cxx.

◆ ParsePow

ParserFuncSignature TMVA::Experimental::SOFIE::ParsePow
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Pow>(parser, nodeproto);
}

Definition at line 79 of file ParseBasicBinary.cxx.

◆ ParseRange

ParserFuncSignature TMVA::Experimental::SOFIE::ParseRange

Definition at line 9 of file ParseRange.cxx.

◆ ParseReciprocal

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReciprocal
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kReciprocal>(parser, nodeproto);
}

Definition at line 49 of file ParseBasicUnary.cxx.

◆ ParseReduceMean

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceMean
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceMean>(parser, nodeproto);
}

Definition at line 76 of file ParseReduce.cxx.

◆ ParseReduceProd

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceProd
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceProd>(parser, nodeproto);
}

Definition at line 86 of file ParseReduce.cxx.

◆ ParseReduceSum

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceSum
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceSum>(parser, nodeproto);
}

Definition at line 91 of file ParseReduce.cxx.

◆ ParseReduceSumSquare

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceSumSquare
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceSumSquare>(parser, nodeproto);
}

Definition at line 81 of file ParseReduce.cxx.

◆ ParseRelu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseRelu
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser relu op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Relu<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Relu does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseRelu.cxx.

◆ ParseReshape

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReshape

Definition at line 9 of file ParseReshape.cxx.

◆ ParseRNN

ParserFuncSignature TMVA::Experimental::SOFIE::ParseRNN

Definition at line 9 of file ParseRNN.cxx.

◆ ParseSelu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSelu
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type = ETensorType::UNDEFINED;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser selu op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Selu<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Selu does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseSelu.cxx.

◆ ParseShape

ParserFuncSignature TMVA::Experimental::SOFIE::ParseShape
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
auto input_name = nodeproto.input(0);
if (!parser.IsRegisteredTensorType(input_name)) {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Shape op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
int attr_start = 0;
int attr_end = INT_MAX;
for (int_t i = 0; i < nodeproto.attribute_size(); i++) {
std::string attribute_name = nodeproto.attribute(i).name();
if (attribute_name == "start")
attr_start = nodeproto.attribute(i).i();
if (attribute_name == "end")
attr_end = nodeproto.attribute(i).i();
}
op.reset(new ROperator_Shape(attr_start, attr_end, input_name, output_name));
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, ETensorType::INT64);
}
return op;
}

Definition at line 9 of file ParseShape.cxx.

◆ ParseSigmoid

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSigmoid
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Sigmoid op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Sigmoid<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Sigmoid does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseSigmoid.cxx.

◆ ParseSlice

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSlice

Definition at line 9 of file ParseSlice.cxx.

◆ ParseSoftmax

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSoftmax
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Softmax op has input tensor " + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
int64_t attr_axis = -1;
if (nodeproto.attribute_size() == 1 && nodeproto.attribute(0).name() == "axis")
attr_axis = nodeproto.attribute(0).i();
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Softmax<float>(attr_axis, input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Softmax does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseSoftmax.cxx.

◆ ParseSplit

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSplit

Definition at line 9 of file ParseSplit.cxx.

◆ ParseSqrt

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSqrt
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kSqrt>(parser, nodeproto);
}

Definition at line 44 of file ParseBasicUnary.cxx.

◆ ParseSub

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSub
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Sub>(parser, nodeproto);
}

Definition at line 64 of file ParseBasicBinary.cxx.

◆ ParseSum

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSum
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Sum>(parser, nodeproto);
}

Definition at line 59 of file ParseBasicNary.cxx.

◆ ParseTanh

ParserFuncSignature TMVA::Experimental::SOFIE::ParseTanh
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Tanh op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Tanh<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Tanh does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseTanh.cxx.

◆ ParseTile

ParserFuncSignature TMVA::Experimental::SOFIE::ParseTile

Definition at line 9 of file ParseTile.cxx.

◆ ParseTopK

ParserFuncSignature TMVA::Experimental::SOFIE::ParseTopK

Definition at line 9 of file ParseTopK.cxx.

◆ ParseTranspose

ParserFuncSignature TMVA::Experimental::SOFIE::ParseTranspose

Definition at line 9 of file ParseTranspose.cxx.