Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::SOFIE::RModel Class Referencefinal

Definition at line 19 of file RModel.hxx.

Classes

struct  ROperatorDeleter
 

Public Member Functions

 RModel ()=default
 Default constructor.
 
 RModel (RModel &&)
 
 RModel (RModel const &)=delete
 
 RModel (std::string name, std::string parsedtime)
 
 ~RModel ()
 
void AddAliasTensor (const std::string &tensor_name, const std::string &orig_tensor_name)
 
void AddBlasRoutines (std::vector< std::string > routines)
 
void AddComputedShapeParam (const std::string &name)
 Declare a shape parameter as computed at run time by an operator (e.g.
 
template<class T >
void AddConstantTensor (const std::string &name, const std::vector< size_t > &shape, const std::vector< T > &data)
 
template<class T >
void AddConstantTensor (const std::string &name, const std::vector< size_t > &shape, const T *data)
 
void AddConstantTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape, std::shared_ptr< void > data)
 
void AddDynamicTensor (std::string tensor_name, ETensorType type, std::vector< Dim > shape)
 
void AddExtraCodeForDimShapes (const std::string &code)
 
void AddInitializedTensor (const std::string &tensor_name, ETensorType tensor_type, const std::vector< std::size_t > &shape, void *raw_data)
 
void AddInitializedTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape, std::shared_ptr< void > data)
 
void AddInputTensorInfo (std::string input_name, ETensorType type, std::vector< Dim > shape)
 
void AddInputTensorInfo (std::string input_name, ETensorType type, std::vector< size_t > shape)
 
void AddInputTensorName (std::string name)
 
void AddIntermediateTensor (std::string tensor_name, ETensorType type, std::vector< Dim > dim_shape)
 
void AddIntermediateTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape)
 
void AddNeededCustomHeader (std::string filename)
 
void AddNeededHelperFunction (std::string name)
 
void AddNeededStdLib (std::string libname)
 
void AddOperator (std::unique_ptr< ROperator > op, int order_execution=-1)
 
void AddOutputTensorNameList (std::vector< std::string > output_tensor_names)
 
void AddShapeParam (const std::string &name, size_t def_value=0)
 
void AddShapeTensor (const std::string &name, const std::vector< Dim > &shapeValues, bool scalar=false)
 
std::string AllocateIntermediateMemory (std::span< const std::string_view > op_output_tensors)
 
void CheckAndFlushIntermediateMemory (std::span< const std::string_view > op_output_tensors, const size_t &op_idx)
 
bool CheckIfTensorAlreadyExist (std::string tensor_name)
 
void EmitHelperFunctionsCode ()
 
void Generate (Options options=Options::kDefault, int batchSize=-1, bool verbose=false)
 
void Generate (std::underlying_type_t< Options > options, int batchSize=-1, bool verbose=false)
 
void GenerateHeaderInfo (std::string &hgname)
 
std::string GenerateInferSignature (bool isdecl=true)
 
size_t GetConstantTensorSize () const
 
const std::vector< std::string > & GetDimShapeNames () const
 
std::vector< Dim > GetDimTensorShape (const std::string &name) const
 
std::vector< Dim > GetDynamicTensorShape (const std::string &name) const
 
std::string GetFilename ()
 
std::shared_ptr< void > GetInitializedTensorData (std::string tensor_name)
 
const std::vector< std::string > & GetInputTensorNames () const
 
size_t GetIntermediateTensorSize () const
 
const std::string & GetName () const
 
const std::set< std::string > & GetNeededHelperFunctions () const
 
size_t GetOtherTensorSize () const
 
const std::vector< std::string > & GetOutputTensorNames () const
 
const std::vector< Dim > & GetShapeTensorValues (const std::string &tensor_name) const
 
template<class T >
std::vector< T > GetTensorData (const std::string &name)
 
template<>
std::vector< Dim > GetTensorData (const std::string &name)
 
std::vector< size_t > GetTensorShape (const std::string &name) const
 
ETensorType GetTensorType (std::string name) const
 
size_t GetWeightsTensorSize () const
 
void HeadInitializedTensors (std::string name, int n_print=50)
 
void Initialize (const std::map< std::string, size_t > &inputParams, bool verbose=false)
 
void Initialize (int batchSize=-1, bool verbose=false)
 
void InitializeSubGraph (std::shared_ptr< RModel > graph)
 
TClass * IsA () const
 
bool IsAliasTensor (const std::string &name) const
 check if a tensor is a alias tensor
 
bool IsComputedShapeParam (const std::string &name) const
 
bool IsConstantTensor (const std::string &name) const
 
bool IsDimInputTensor (const std::string &name) const
 
bool IsDynamicTensor (const std::string &name) const
 
bool IsInitializedTensor (const std::string &name) const
 
bool IsReadyInputTensor (const std::string &name) const
 
bool IsShapeTensor (const std::string &name) const
 check if a tensor is a shape tensor
 
RModel & operator= (RModel &&)
 
RModel & operator= (RModel const &)=delete
 
void OutputGenerated (std::string filename="", bool append=false)
 
void PrintDynamicTensors () const
 
void PrintGenerated (std::ostream &os=std::cout)
 
void PrintInitializedTensors () const
 
void PrintIntermediateTensors () const
 
void PrintOutputTensors () const
 
void PrintRequiredInputTensors () const
 
void PrintSummary () const
 
void ReadInitializedTensorsFromFile ()
 
std::string ReturnGenerated ()
 
void SetFilename (std::string filename)
 
void SetNotWritableInitializedTensor (const std::string &tensor_name)
 
void SetOptimizationLevel (OptimizationLevel optim_level)
 
void SetUseVDT (bool on)
 
void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
void UpdateInitializedTensor (std::string tensor_name, ETensorType type, std::vector< std::size_t > shape, std::shared_ptr< void > data)
 
void UpdateOutputTensorList (std::vector< std::string > curr_output_tensor, std::vector< std::string > modify_output_tensor)
 
bool UseSession () const
 
bool UseVDT () const
 
int Verbose () const
 
long WriteInitializedTensorsToFile (std::string filename="")
 

Static Public Member Functions

static TClass * Class ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Static Public Attributes

static constexpr const char * kHelperFunctionsMarker = "//@SOFIE_HELPER_FUNCTIONS@\n"
 
static constexpr const char * kHelperIncludesMarker = "//@SOFIE_HELPER_INCLUDES@\n"
 

Protected Member Functions

std::vector< std::string > CollectTensorMemberNames (const std::string &input)
 Collects all identifiers starting with "tensor_" in the input code, provided that the occurrence is not immediately preceded by a character that is valid in a C++ identifier.
 
void GenerateDynamicTensorInfo ()
 
void GenerateInitializedTensorInfo ()
 
void GenerateIntermediateMemoryPool ()
 
void GenerateIntermediateTensorInfo ()
 
void GenerateOperatorDeclarations ()
 
void GenerateOutput ()
 
void GenerateRequiredInputTensorInfo ()
 To emit the dimensions of the input tensors as a data member of a session, which is helpful when validating the inference inputs.
 
void GenerateSessionCode ()
 
bool IsInputTensorShapeParam (std::string const &name) const
 Check if a given parameter is used for the shape of an input tensor.
 

Protected Attributes

bool fBlasSgemmDeclared = false
 
std::unordered_set< std::string > fCustomOpHeaders
 
std::string fFileName
 
std::string fGC
 
std::string fName = "UnnamedModel"
 
std::unordered_set< std::string > fNeededBlasRoutines
 
std::set< std::string > fNeededHelperFunctions
 
std::unordered_set< std::string > fNeededStdLib = {"vector"}
 
std::string fParseTime
 
bool fUseSession = true
 
bool fUseWeightFile = true
 
WeightFileType fWeightFile = WeightFileType::Text
 

Private Attributes

std::unordered_map< std::string, std::string > fAliasTensors
 
int fBatchSize = -1
 
std::unordered_set< std::string > fComputedShapeParams
 ! shape parameters computed at run time by an operator
 
size_t fConstantTensorSize = 0
 
std::vector< std::string > fDimShapeNames
 
std::unordered_map< std::string, DynamicTensorInfo > fDynamicTensorInfos
 
std::string fExtraCodeForDimShapes
 
std::unordered_map< std::string, InitializedTensor > fInitializedTensors
 
std::unordered_map< std::string, InputTensorInfo > fInputTensorInfos
 
std::vector< std::string > fInputTensorNames
 
MemoryPoolInfo fIntermediateMemoryInfo
 ! intermediate memory info (transient)
 
std::unordered_map< std::string_view, size_t > fIntermediateTensorFrequencyLookup
 ! lookup table for intermediate tensor frequency (transient)
 
std::unordered_map< std::string, TensorInfo > fIntermediateTensorInfos
 
bool fIsInitialized = false
 
bool fIsSubGraph = false
 
std::vector< std::unique_ptr< ROperator, ROperatorDeleter > > fOperators
 
OptimizationLevel fOptimizationLevel = OptimizationLevel::kExtended
 
size_t fOtherTensorSize = 0
 
std::vector< std::string > fOutputTensorNames
 
RModel * fParentGraph = nullptr
 
std::unordered_map< std::string, TensorInfo > fReadyInputTensorInfos
 
std::unordered_map< std::string, std::string > fShapeParams
 
std::unordered_map< std::string, std::pair< std::vector< Dim >, bool > > fShapeTensors
 
std::vector< std::shared_ptr< RModel > > fSubGraphs
 ! sub-graph models (transient)
 
bool fUseVDT = false
 
int fVerbose = 0
 
size_t fWeightsTensorSize = 0
 

#include <TMVA/RModel.hxx>

Inheritance diagram for TMVA::Experimental::SOFIE::RModel:
[legend]

Constructor & Destructor Documentation

◆ RModel() [1/4]

TMVA::Experimental::SOFIE::RModel::RModel ( )
default

Default constructor.

Needed to allow serialization of ROOT objects. See https://root.cern/manual/io_custom_classes/#restrictions-on-types-root-io-can-handle

◆ RModel() [2/4]

TMVA::Experimental::SOFIE::RModel::RModel ( std::string name,
std::string parsedtime )
inline

Definition at line 71 of file RModel.hxx.

◆ ~RModel()

TMVA::Experimental::SOFIE::RModel::~RModel ( )
default

◆ RModel() [3/4]

TMVA::Experimental::SOFIE::RModel::RModel ( RModel && )
default

◆ RModel() [4/4]

TMVA::Experimental::SOFIE::RModel::RModel ( RModel const & )
delete

Member Function Documentation

◆ AddAliasTensor()

void TMVA::Experimental::SOFIE::RModel::AddAliasTensor ( const std::string & tensor_name,
const std::string & orig_tensor_name )

Definition at line 271 of file RModel.cxx.

◆ AddBlasRoutines()

void TMVA::Experimental::SOFIE::RModel_Base::AddBlasRoutines ( std::vector< std::string > routines)
inlineinherited

Definition at line 75 of file RModel_Base.hxx.

◆ AddComputedShapeParam()

void TMVA::Experimental::SOFIE::RModel::AddComputedShapeParam ( const std::string & name)

Declare a shape parameter as computed at run time by an operator (e.g.

the number of non-zero elements found by NonZero): the operator declares it itself, so it is never a Session constructor argument. A later AddShapeParam for the same name has no effect.

Definition at line 367 of file RModel.cxx.

◆ AddConstantTensor() [1/3]

template<class T >
void TMVA::Experimental::SOFIE::RModel::AddConstantTensor ( const std::string & name,
const std::vector< size_t > & shape,
const std::vector< T > & data )
inline

Definition at line 116 of file RModel.hxx.

◆ AddConstantTensor() [2/3]

template<class T >
void TMVA::Experimental::SOFIE::RModel::AddConstantTensor ( const std::string & name,
const std::vector< size_t > & shape,
const T * data )
inline

Definition at line 108 of file RModel.hxx.

◆ AddConstantTensor() [3/3]

void TMVA::Experimental::SOFIE::RModel::AddConstantTensor ( std::string tensor_name,
ETensorType type,
std::vector< std::size_t > shape,
std::shared_ptr< void > data )

Definition at line 253 of file RModel.cxx.

◆ AddDynamicTensor()

void TMVA::Experimental::SOFIE::RModel::AddDynamicTensor ( std::string tensor_name,
ETensorType type,
std::vector< Dim > shape )

Definition at line 339 of file RModel.cxx.

◆ AddExtraCodeForDimShapes()

void TMVA::Experimental::SOFIE::RModel::AddExtraCodeForDimShapes ( const std::string & code)
inline

Definition at line 126 of file RModel.hxx.

◆ AddInitializedTensor() [1/2]

void TMVA::Experimental::SOFIE::RModel::AddInitializedTensor ( const std::string & tensor_name,
ETensorType tensor_type,
const std::vector< std::size_t > & shape,
void * raw_data )

Definition at line 243 of file RModel.cxx.

◆ AddInitializedTensor() [2/2]

void TMVA::Experimental::SOFIE::RModel::AddInitializedTensor ( std::string tensor_name,
ETensorType type,
std::vector< std::size_t > shape,
std::shared_ptr< void > data )

Definition at line 233 of file RModel.cxx.

◆ AddInputTensorInfo() [1/2]

void TMVA::Experimental::SOFIE::RModel::AddInputTensorInfo ( std::string input_name,
ETensorType type,
std::vector< Dim > shape )

Definition at line 177 of file RModel.cxx.

◆ AddInputTensorInfo() [2/2]

void TMVA::Experimental::SOFIE::RModel::AddInputTensorInfo ( std::string input_name,
ETensorType type,
std::vector< size_t > shape )

Definition at line 187 of file RModel.cxx.

◆ AddInputTensorName()

void TMVA::Experimental::SOFIE::RModel::AddInputTensorName ( std::string name)

Definition at line 196 of file RModel.cxx.

◆ AddIntermediateTensor() [1/2]

void TMVA::Experimental::SOFIE::RModel::AddIntermediateTensor ( std::string tensor_name,
ETensorType type,
std::vector< Dim > dim_shape )

Definition at line 322 of file RModel.cxx.

◆ AddIntermediateTensor() [2/2]

void TMVA::Experimental::SOFIE::RModel::AddIntermediateTensor ( std::string tensor_name,
ETensorType type,
std::vector< std::size_t > shape )

Definition at line 330 of file RModel.cxx.

◆ AddNeededCustomHeader()

void TMVA::Experimental::SOFIE::RModel_Base::AddNeededCustomHeader ( std::string filename)
inlineinherited

Definition at line 86 of file RModel_Base.hxx.

◆ AddNeededHelperFunction()

void TMVA::Experimental::SOFIE::RModel_Base::AddNeededHelperFunction ( std::string name)
inlineinherited

Definition at line 92 of file RModel_Base.hxx.

◆ AddNeededStdLib()

void TMVA::Experimental::SOFIE::RModel_Base::AddNeededStdLib ( std::string libname)
inlineinherited

Definition at line 81 of file RModel_Base.hxx.

◆ AddOperator()

void TMVA::Experimental::SOFIE::RModel::AddOperator ( std::unique_ptr< ROperator > op,
int order_execution = -1 )

Definition at line 200 of file RModel.cxx.

◆ AddOutputTensorNameList()

void TMVA::Experimental::SOFIE::RModel::AddOutputTensorNameList ( std::vector< std::string > output_tensor_names)

Definition at line 376 of file RModel.cxx.

◆ AddShapeParam()

void TMVA::Experimental::SOFIE::RModel::AddShapeParam ( const std::string & name,
size_t def_value = 0 )

Definition at line 356 of file RModel.cxx.

◆ AddShapeTensor()

void TMVA::Experimental::SOFIE::RModel::AddShapeTensor ( const std::string & name,
const std::vector< Dim > & shapeValues,
bool scalar = false )

Definition at line 263 of file RModel.cxx.

◆ AllocateIntermediateMemory()

std::string TMVA::Experimental::SOFIE::RModel::AllocateIntermediateMemory ( std::span< const std::string_view > op_output_tensors)

Definition at line 416 of file RModel.cxx.

◆ CheckAndFlushIntermediateMemory()

void TMVA::Experimental::SOFIE::RModel::CheckAndFlushIntermediateMemory ( std::span< const std::string_view > op_output_tensors,
const size_t & op_idx )

Definition at line 521 of file RModel.cxx.

◆ CheckIfTensorAlreadyExist()

bool TMVA::Experimental::SOFIE::RModel::CheckIfTensorAlreadyExist ( std::string tensor_name)

Definition at line 166 of file RModel.cxx.

◆ Class()

static TClass * TMVA::Experimental::SOFIE::RModel::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TMVA::Experimental::SOFIE::RModel::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TMVA::Experimental::SOFIE::RModel::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 250 of file RModel.hxx.

◆ CollectTensorMemberNames()

std::vector< std::string > TMVA::Experimental::SOFIE::RModel::CollectTensorMemberNames ( const std::string & input)
protected

Collects all identifiers starting with "tensor_" in the input code, provided that the occurrence is not immediately preceded by a character that is valid in a C++ identifier.

Excludes input and output tensor names. Returns a deduplicated std::vector<std::string>.

Definition at line 1058 of file RModel.cxx.

◆ DeclFileName()

static const char * TMVA::Experimental::SOFIE::RModel::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 250 of file RModel.hxx.

◆ EmitHelperFunctionsCode()

void TMVA::Experimental::SOFIE::RModel_Base::EmitHelperFunctionsCode ( )
inherited

Definition at line 76 of file RModel_Base.cxx.

◆ Generate() [1/2]

void TMVA::Experimental::SOFIE::RModel::Generate ( Options options = Options::kDefault,
int batchSize = -1,
bool verbose = false )
inline

Definition at line 176 of file RModel.hxx.

◆ Generate() [2/2]

void TMVA::Experimental::SOFIE::RModel::Generate ( std::underlying_type_t< Options > options,
int batchSize = -1,
bool verbose = false )

Definition at line 1540 of file RModel.cxx.

◆ GenerateDynamicTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateDynamicTensorInfo ( )
protected

Definition at line 957 of file RModel.cxx.

◆ GenerateHeaderInfo()

void TMVA::Experimental::SOFIE::RModel_Base::GenerateHeaderInfo ( std::string & hgname)
inherited

Definition at line 17 of file RModel_Base.cxx.

◆ GenerateInferSignature()

std::string TMVA::Experimental::SOFIE::RModel::GenerateInferSignature ( bool isdecl = true)

Definition at line 1116 of file RModel.cxx.

◆ GenerateInitializedTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateInitializedTensorInfo ( )
protected

Definition at line 829 of file RModel.cxx.

◆ GenerateIntermediateMemoryPool()

void TMVA::Experimental::SOFIE::RModel::GenerateIntermediateMemoryPool ( )
protected

Definition at line 878 of file RModel.cxx.

◆ GenerateIntermediateTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateIntermediateTensorInfo ( )
protected

Definition at line 889 of file RModel.cxx.

◆ GenerateOperatorDeclarations()

void TMVA::Experimental::SOFIE::RModel::GenerateOperatorDeclarations ( )
protected

Definition at line 946 of file RModel.cxx.

◆ GenerateOutput()

void TMVA::Experimental::SOFIE::RModel::GenerateOutput ( )
protected

Definition at line 1171 of file RModel.cxx.

◆ GenerateRequiredInputTensorInfo()

void TMVA::Experimental::SOFIE::RModel::GenerateRequiredInputTensorInfo ( )
protected

To emit the dimensions of the input tensors as a data member of a session, which is helpful when validating the inference inputs.

Definition at line 1800 of file RModel.cxx.

◆ GenerateSessionCode()

void TMVA::Experimental::SOFIE::RModel::GenerateSessionCode ( )
protected

Definition at line 1290 of file RModel.cxx.

◆ GetConstantTensorSize()

size_t TMVA::Experimental::SOFIE::RModel::GetConstantTensorSize ( ) const
inline

Definition at line 191 of file RModel.hxx.

◆ GetDimShapeNames()

const std::vector< std::string > & TMVA::Experimental::SOFIE::RModel::GetDimShapeNames ( ) const
inline

Definition at line 226 of file RModel.hxx.

◆ GetDimTensorShape()

std::vector< Dim > TMVA::Experimental::SOFIE::RModel::GetDimTensorShape ( const std::string & name) const

Definition at line 109 of file RModel.cxx.

◆ GetDynamicTensorShape()

std::vector< Dim > TMVA::Experimental::SOFIE::RModel::GetDynamicTensorShape ( const std::string & name) const

Definition at line 120 of file RModel.cxx.

◆ GetFilename()

std::string TMVA::Experimental::SOFIE::RModel_Base::GetFilename ( )
inlineinherited

Definition at line 114 of file RModel_Base.hxx.

◆ GetInitializedTensorData()

std::shared_ptr< void > TMVA::Experimental::SOFIE::RModel::GetInitializedTensorData ( std::string tensor_name)

Definition at line 399 of file RModel.cxx.

◆ GetInputTensorNames()

const std::vector< std::string > & TMVA::Experimental::SOFIE::RModel::GetInputTensorNames ( ) const
inline

Definition at line 224 of file RModel.hxx.

◆ GetIntermediateTensorSize()

size_t TMVA::Experimental::SOFIE::RModel::GetIntermediateTensorSize ( ) const
inline

Definition at line 197 of file RModel.hxx.

◆ GetName()

const std::string & TMVA::Experimental::SOFIE::RModel_Base::GetName ( ) const
inlineinherited

Definition at line 115 of file RModel_Base.hxx.

◆ GetNeededHelperFunctions()

const std::set< std::string > & TMVA::Experimental::SOFIE::RModel_Base::GetNeededHelperFunctions ( ) const
inlineinherited

Definition at line 96 of file RModel_Base.hxx.

◆ GetOtherTensorSize()

size_t TMVA::Experimental::SOFIE::RModel::GetOtherTensorSize ( ) const
inline

Definition at line 195 of file RModel.hxx.

◆ GetOutputTensorNames()

const std::vector< std::string > & TMVA::Experimental::SOFIE::RModel::GetOutputTensorNames ( ) const
inline

Definition at line 225 of file RModel.hxx.

◆ GetShapeTensorValues()

const std::vector< Dim > & TMVA::Experimental::SOFIE::RModel::GetShapeTensorValues ( const std::string & tensor_name) const

Definition at line 289 of file RModel.cxx.

◆ GetTensorData() [1/2]

template<class T >
std::vector< T > TMVA::Experimental::SOFIE::RModel::GetTensorData ( const std::string & name)
inline

Definition at line 257 of file RModel.hxx.

◆ GetTensorData() [2/2]

template<>
std::vector< Dim > TMVA::Experimental::SOFIE::RModel::GetTensorData ( const std::string & name)
inline

Definition at line 257 of file RModel.hxx.

◆ GetTensorShape()

std::vector< size_t > TMVA::Experimental::SOFIE::RModel::GetTensorShape ( const std::string & name) const

Definition at line 73 of file RModel.cxx.

◆ GetTensorType()

ETensorType TMVA::Experimental::SOFIE::RModel::GetTensorType ( std::string name) const

Definition at line 134 of file RModel.cxx.

◆ GetWeightsTensorSize()

size_t TMVA::Experimental::SOFIE::RModel::GetWeightsTensorSize ( ) const
inline

Definition at line 193 of file RModel.hxx.

◆ HeadInitializedTensors()

void TMVA::Experimental::SOFIE::RModel::HeadInitializedTensors ( std::string name,
int n_print = 50 )

Definition at line 1971 of file RModel.cxx.

◆ Initialize() [1/2]

void TMVA::Experimental::SOFIE::RModel::Initialize ( const std::map< std::string, size_t > & inputParams,
bool verbose = false )

Definition at line 610 of file RModel.cxx.

◆ Initialize() [2/2]

void TMVA::Experimental::SOFIE::RModel::Initialize ( int batchSize = -1,
bool verbose = false )

Definition at line 600 of file RModel.cxx.

◆ InitializeSubGraph()

void TMVA::Experimental::SOFIE::RModel::InitializeSubGraph ( std::shared_ptr< RModel > graph)

Definition at line 756 of file RModel.cxx.

◆ IsA()

TClass * TMVA::Experimental::SOFIE::RModel::IsA ( ) const
inline
Returns
TClass describing current object

Definition at line 250 of file RModel.hxx.

◆ IsAliasTensor()

bool TMVA::Experimental::SOFIE::RModel::IsAliasTensor ( const std::string & name) const

check if a tensor is a alias tensor

Definition at line 285 of file RModel.cxx.

◆ IsComputedShapeParam()

bool TMVA::Experimental::SOFIE::RModel::IsComputedShapeParam ( const std::string & name) const
inline

Definition at line 160 of file RModel.hxx.

◆ IsConstantTensor()

bool TMVA::Experimental::SOFIE::RModel::IsConstantTensor ( const std::string & name) const

Definition at line 298 of file RModel.cxx.

◆ IsDimInputTensor()

bool TMVA::Experimental::SOFIE::RModel::IsDimInputTensor ( const std::string & name) const

Definition at line 312 of file RModel.cxx.

◆ IsDynamicTensor()

bool TMVA::Experimental::SOFIE::RModel::IsDynamicTensor ( const std::string & name) const

Definition at line 307 of file RModel.cxx.

◆ IsInitializedTensor()

bool TMVA::Experimental::SOFIE::RModel::IsInitializedTensor ( const std::string & name) const

Definition at line 294 of file RModel.cxx.

◆ IsInputTensorShapeParam()

bool TMVA::Experimental::SOFIE::RModel::IsInputTensorShapeParam ( std::string const & name) const
protected

Check if a given parameter is used for the shape of an input tensor.

Definition at line 1040 of file RModel.cxx.

◆ IsReadyInputTensor()

bool TMVA::Experimental::SOFIE::RModel::IsReadyInputTensor ( const std::string & name) const

Definition at line 316 of file RModel.cxx.

◆ IsShapeTensor()

bool TMVA::Experimental::SOFIE::RModel::IsShapeTensor ( const std::string & name) const

check if a tensor is a shape tensor

Definition at line 281 of file RModel.cxx.

◆ operator=() [1/2]

RModel & TMVA::Experimental::SOFIE::RModel::operator= ( RModel && )
default

◆ operator=() [2/2]

RModel & TMVA::Experimental::SOFIE::RModel::operator= ( RModel const & )
delete

◆ OutputGenerated()

void TMVA::Experimental::SOFIE::RModel::OutputGenerated ( std::string filename = "",
bool append = false )

Definition at line 2007 of file RModel.cxx.

◆ PrintDynamicTensors()

void TMVA::Experimental::SOFIE::RModel::PrintDynamicTensors ( ) const

Definition at line 1942 of file RModel.cxx.

◆ PrintGenerated()

void TMVA::Experimental::SOFIE::RModel_Base::PrintGenerated ( std::ostream & os = std::cout)
inlineinherited

Definition at line 109 of file RModel_Base.hxx.

◆ PrintInitializedTensors()

void TMVA::Experimental::SOFIE::RModel::PrintInitializedTensors ( ) const

Definition at line 1909 of file RModel.cxx.

◆ PrintIntermediateTensors()

void TMVA::Experimental::SOFIE::RModel::PrintIntermediateTensors ( ) const

Definition at line 1927 of file RModel.cxx.

◆ PrintOutputTensors()

void TMVA::Experimental::SOFIE::RModel::PrintOutputTensors ( ) const

Definition at line 1957 of file RModel.cxx.

◆ PrintRequiredInputTensors()

void TMVA::Experimental::SOFIE::RModel::PrintRequiredInputTensors ( ) const

Definition at line 1879 of file RModel.cxx.

◆ PrintSummary()

void TMVA::Experimental::SOFIE::RModel::PrintSummary ( ) const

Definition at line 1783 of file RModel.cxx.

◆ ReadInitializedTensorsFromFile()

void TMVA::Experimental::SOFIE::RModel::ReadInitializedTensorsFromFile ( )

Definition at line 1602 of file RModel.cxx.

◆ ReturnGenerated()

std::string TMVA::Experimental::SOFIE::RModel_Base::ReturnGenerated ( )
inlineinherited

Definition at line 111 of file RModel_Base.hxx.

◆ SetFilename()

void TMVA::Experimental::SOFIE::RModel::SetFilename ( std::string filename)
inline

Definition at line 235 of file RModel.hxx.

◆ SetNotWritableInitializedTensor()

void TMVA::Experimental::SOFIE::RModel::SetNotWritableInitializedTensor ( const std::string & tensor_name)

Definition at line 408 of file RModel.cxx.

◆ SetOptimizationLevel()

void TMVA::Experimental::SOFIE::RModel::SetOptimizationLevel ( OptimizationLevel optim_level)
inline

Definition at line 188 of file RModel.hxx.

◆ SetUseVDT()

void TMVA::Experimental::SOFIE::RModel::SetUseVDT ( bool on)
inline

Definition at line 244 of file RModel.hxx.

◆ Streamer()

void TMVA::Experimental::SOFIE::RModel::Streamer ( TBuffer & )

◆ StreamerNVirtual()

void TMVA::Experimental::SOFIE::RModel::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 250 of file RModel.hxx.

◆ UpdateInitializedTensor()

void TMVA::Experimental::SOFIE::RModel::UpdateInitializedTensor ( std::string tensor_name,
ETensorType type,
std::vector< std::size_t > shape,
std::shared_ptr< void > data )

Definition at line 390 of file RModel.cxx.

◆ UpdateOutputTensorList()

void TMVA::Experimental::SOFIE::RModel::UpdateOutputTensorList ( std::vector< std::string > curr_output_tensor,
std::vector< std::string > modify_output_tensor )

Definition at line 383 of file RModel.cxx.

◆ UseSession()

bool TMVA::Experimental::SOFIE::RModel::UseSession ( ) const
inline

Definition at line 242 of file RModel.hxx.

◆ UseVDT()

bool TMVA::Experimental::SOFIE::RModel::UseVDT ( ) const
inline

Definition at line 247 of file RModel.hxx.

◆ Verbose()

int TMVA::Experimental::SOFIE::RModel::Verbose ( ) const
inline

Definition at line 81 of file RModel.hxx.

◆ WriteInitializedTensorsToFile()

long TMVA::Experimental::SOFIE::RModel::WriteInitializedTensorsToFile ( std::string filename = "")

Definition at line 1673 of file RModel.cxx.

Member Data Documentation

◆ fAliasTensors

std::unordered_map<std::string, std::string> TMVA::Experimental::SOFIE::RModel::fAliasTensors
private

Definition at line 41 of file RModel.hxx.

◆ fBatchSize

int TMVA::Experimental::SOFIE::RModel::fBatchSize = -1
private

Definition at line 26 of file RModel.hxx.

◆ fBlasSgemmDeclared

bool TMVA::Experimental::SOFIE::RModel_Base::fBlasSgemmDeclared = false
protectedinherited

Definition at line 51 of file RModel_Base.hxx.

◆ fComputedShapeParams

std::unordered_set<std::string> TMVA::Experimental::SOFIE::RModel::fComputedShapeParams
private

! shape parameters computed at run time by an operator

Definition at line 40 of file RModel.hxx.

◆ fConstantTensorSize

size_t TMVA::Experimental::SOFIE::RModel::fConstantTensorSize = 0
private

Definition at line 27 of file RModel.hxx.

◆ fCustomOpHeaders

std::unordered_set<std::string> TMVA::Experimental::SOFIE::RModel_Base::fCustomOpHeaders
protectedinherited

Definition at line 54 of file RModel_Base.hxx.

◆ fDimShapeNames

std::vector<std::string> TMVA::Experimental::SOFIE::RModel::fDimShapeNames
private

Definition at line 42 of file RModel.hxx.

◆ fDynamicTensorInfos

std::unordered_map<std::string, DynamicTensorInfo> TMVA::Experimental::SOFIE::RModel::fDynamicTensorInfos
private

Definition at line 37 of file RModel.hxx.

◆ fExtraCodeForDimShapes

std::string TMVA::Experimental::SOFIE::RModel::fExtraCodeForDimShapes
private

Definition at line 63 of file RModel.hxx.

◆ fFileName

std::string TMVA::Experimental::SOFIE::RModel_Base::fFileName
protectedinherited

Definition at line 42 of file RModel_Base.hxx.

◆ fGC

std::string TMVA::Experimental::SOFIE::RModel_Base::fGC
protectedinherited

Definition at line 62 of file RModel_Base.hxx.

◆ fInitializedTensors

std::unordered_map<std::string, InitializedTensor> TMVA::Experimental::SOFIE::RModel::fInitializedTensors
private

Definition at line 35 of file RModel.hxx.

◆ fInputTensorInfos

std::unordered_map<std::string, InputTensorInfo> TMVA::Experimental::SOFIE::RModel::fInputTensorInfos
private

Definition at line 33 of file RModel.hxx.

◆ fInputTensorNames

std::vector<std::string> TMVA::Experimental::SOFIE::RModel::fInputTensorNames
private

Definition at line 44 of file RModel.hxx.

◆ fIntermediateMemoryInfo

MemoryPoolInfo TMVA::Experimental::SOFIE::RModel::fIntermediateMemoryInfo
private

! intermediate memory info (transient)

Definition at line 60 of file RModel.hxx.

◆ fIntermediateTensorFrequencyLookup

std::unordered_map<std::string_view, size_t> TMVA::Experimental::SOFIE::RModel::fIntermediateTensorFrequencyLookup
private

! lookup table for intermediate tensor frequency (transient)

Definition at line 61 of file RModel.hxx.

◆ fIntermediateTensorInfos

std::unordered_map<std::string, TensorInfo> TMVA::Experimental::SOFIE::RModel::fIntermediateTensorInfos
private

Definition at line 36 of file RModel.hxx.

◆ fIsInitialized

bool TMVA::Experimental::SOFIE::RModel::fIsInitialized = false
private

Definition at line 22 of file RModel.hxx.

◆ fIsSubGraph

bool TMVA::Experimental::SOFIE::RModel::fIsSubGraph = false
private

Definition at line 23 of file RModel.hxx.

◆ fName

std::string TMVA::Experimental::SOFIE::RModel_Base::fName = "UnnamedModel"
protectedinherited

Definition at line 61 of file RModel_Base.hxx.

◆ fNeededBlasRoutines

std::unordered_set<std::string> TMVA::Experimental::SOFIE::RModel_Base::fNeededBlasRoutines
protectedinherited

Definition at line 47 of file RModel_Base.hxx.

◆ fNeededHelperFunctions

std::set<std::string> TMVA::Experimental::SOFIE::RModel_Base::fNeededHelperFunctions
protectedinherited

Definition at line 59 of file RModel_Base.hxx.

◆ fNeededStdLib

std::unordered_set<std::string> TMVA::Experimental::SOFIE::RModel_Base::fNeededStdLib = {"vector"}
protectedinherited

Definition at line 53 of file RModel_Base.hxx.

◆ fOperators

std::vector<std::unique_ptr<ROperator, ROperatorDeleter> > TMVA::Experimental::SOFIE::RModel::fOperators
private

Definition at line 54 of file RModel.hxx.

◆ fOptimizationLevel

OptimizationLevel TMVA::Experimental::SOFIE::RModel::fOptimizationLevel = OptimizationLevel::kExtended
private

Definition at line 31 of file RModel.hxx.

◆ fOtherTensorSize

size_t TMVA::Experimental::SOFIE::RModel::fOtherTensorSize = 0
private

Definition at line 29 of file RModel.hxx.

◆ fOutputTensorNames

std::vector<std::string> TMVA::Experimental::SOFIE::RModel::fOutputTensorNames
private

Definition at line 43 of file RModel.hxx.

◆ fParentGraph

RModel* TMVA::Experimental::SOFIE::RModel::fParentGraph = nullptr
private

Definition at line 57 of file RModel.hxx.

◆ fParseTime

std::string TMVA::Experimental::SOFIE::RModel_Base::fParseTime
protectedinherited

Definition at line 43 of file RModel_Base.hxx.

◆ fReadyInputTensorInfos

std::unordered_map<std::string, TensorInfo> TMVA::Experimental::SOFIE::RModel::fReadyInputTensorInfos
private

Definition at line 34 of file RModel.hxx.

◆ fShapeParams

std::unordered_map<std::string, std::string> TMVA::Experimental::SOFIE::RModel::fShapeParams
private

Definition at line 39 of file RModel.hxx.

◆ fShapeTensors

std::unordered_map<std::string, std::pair<std::vector<Dim>, bool> > TMVA::Experimental::SOFIE::RModel::fShapeTensors
private

Definition at line 38 of file RModel.hxx.

◆ fSubGraphs

std::vector<std::shared_ptr<RModel> > TMVA::Experimental::SOFIE::RModel::fSubGraphs
private

! sub-graph models (transient)

Definition at line 56 of file RModel.hxx.

◆ fUseSession

bool TMVA::Experimental::SOFIE::RModel_Base::fUseSession = true
protectedinherited

Definition at line 64 of file RModel_Base.hxx.

◆ fUseVDT

bool TMVA::Experimental::SOFIE::RModel::fUseVDT = false
private

Definition at line 24 of file RModel.hxx.

◆ fUseWeightFile

bool TMVA::Experimental::SOFIE::RModel_Base::fUseWeightFile = true
protectedinherited

Definition at line 63 of file RModel_Base.hxx.

◆ fVerbose

int TMVA::Experimental::SOFIE::RModel::fVerbose = 0
private

Definition at line 25 of file RModel.hxx.

◆ fWeightFile

WeightFileType TMVA::Experimental::SOFIE::RModel_Base::fWeightFile = WeightFileType::Text
protectedinherited

Definition at line 45 of file RModel_Base.hxx.

◆ fWeightsTensorSize

size_t TMVA::Experimental::SOFIE::RModel::fWeightsTensorSize = 0
private

Definition at line 28 of file RModel.hxx.

◆ kHelperFunctionsMarker

constexpr const char* TMVA::Experimental::SOFIE::RModel_Base::kHelperFunctionsMarker = "//@SOFIE_HELPER_FUNCTIONS@\n"
staticconstexprinherited

Definition at line 103 of file RModel_Base.hxx.

◆ kHelperIncludesMarker

constexpr const char* TMVA::Experimental::SOFIE::RModel_Base::kHelperIncludesMarker = "//@SOFIE_HELPER_INCLUDES@\n"
staticconstexprinherited

Definition at line 102 of file RModel_Base.hxx.

Libraries for TMVA::Experimental::SOFIE::RModel:

The documentation for this class was generated from the following files: