ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::compiler::train::LoweredTrainableGraph Class Reference

Class that contains lowering information on graph. In addition, after lowering, operands in graph will be set to "dynamic" if the shape of output of an operation cannot be decided at compilation time. More...

#include <LoweredTrainableGraph.h>

Collaboration diagram for onert::compiler::train::LoweredTrainableGraph:

Public Member Functions

 LoweredTrainableGraph (ir::train::TrainableGraph &graph, const compiler::CompilerOptions &options)
 
ir::Graphgraph () override
 
const ir::Graphgraph () const override
 
ir::train::TrainableGraphtrainable_graph ()
 
const ir::train::TrainableGraphtrainable_graph () const
 
const compiler::GraphLowerInfolower_info () const override
 
compiler::GraphLowerInfolower_info () override
 
std::shared_ptr< ir::OperationIndexMap< int64_t > > indexed_ranks ()
 
void setHasDynamicTensor (ir::OperationIndex, bool has_dynamic) override
 
bool getHasDynamicTensor (ir::OperationIndex) const override
 
- Public Member Functions inherited from onert::compiler::ILoweredGraph
virtual ~ILoweredGraph ()=default
 

Detailed Description

Class that contains lowering information on graph. In addition, after lowering, operands in graph will be set to "dynamic" if the shape of output of an operation cannot be decided at compilation time.

Definition at line 35 of file LoweredTrainableGraph.h.

Constructor & Destructor Documentation

◆ LoweredTrainableGraph()

onert::compiler::train::LoweredTrainableGraph::LoweredTrainableGraph ( ir::train::TrainableGraph graph,
const compiler::CompilerOptions options 
)

Definition at line 42 of file LoweredTrainableGraph.cc.

44 : _trainable_graph{graph}
45{
46 lowerGraph(options);
47}

Member Function Documentation

◆ getHasDynamicTensor()

bool onert::compiler::train::LoweredTrainableGraph::getHasDynamicTensor ( ir::OperationIndex  ) const
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 54 of file LoweredTrainableGraph.h.

54{ return false; }

◆ graph() [1/2]

const ir::Graph & onert::compiler::train::LoweredTrainableGraph::graph ( ) const
inlineoverridevirtual

◆ graph() [2/2]

ir::Graph & onert::compiler::train::LoweredTrainableGraph::graph ( )
inlineoverridevirtual

◆ indexed_ranks()

std::shared_ptr< ir::OperationIndexMap< int64_t > > onert::compiler::train::LoweredTrainableGraph::indexed_ranks ( )
inline

Definition at line 47 of file LoweredTrainableGraph.h.

47{ return _indexed_ranks; }

◆ lower_info() [1/2]

const compiler::GraphLowerInfo & onert::compiler::train::LoweredTrainableGraph::lower_info ( ) const
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 45 of file LoweredTrainableGraph.h.

45{ return _lower_info_map; }

◆ lower_info() [2/2]

compiler::GraphLowerInfo & onert::compiler::train::LoweredTrainableGraph::lower_info ( )
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 46 of file LoweredTrainableGraph.h.

46{ return _lower_info_map; }

◆ setHasDynamicTensor()

void onert::compiler::train::LoweredTrainableGraph::setHasDynamicTensor ( ir::OperationIndex  ,
bool  has_dynamic 
)
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 49 of file LoweredTrainableGraph.h.

50 {
51 if (has_dynamic)
52 throw std::runtime_error("LoweredTrainableGraph does not support dynamic tensors yet");
53 }

◆ trainable_graph() [1/2]

ir::train::TrainableGraph & onert::compiler::train::LoweredTrainableGraph::trainable_graph ( )
inline

Definition at line 43 of file LoweredTrainableGraph.h.

43{ return _trainable_graph; }

Referenced by onert::compiler::train::StaticBackwardShapeInferer::infer().

◆ trainable_graph() [2/2]

const ir::train::TrainableGraph & onert::compiler::train::LoweredTrainableGraph::trainable_graph ( ) const
inline

Definition at line 44 of file LoweredTrainableGraph.h.

44{ return _trainable_graph; }

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