ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::compiler::LoweredGraph 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 <LoweredGraph.h>

Collaboration diagram for onert::compiler::LoweredGraph:

Public Member Functions

 LoweredGraph (const ir::Graph &graph, const compiler::CompilerOptions &options)
 
ir::Graphgraph () override
 
const ir::Graphgraph () const override
 
const compiler::GraphLowerInfolower_info () const override
 
compiler::GraphLowerInfolower_info () override
 
std::shared_ptr< ir::OperationIndexMap< int64_t > > indexed_ranks ()
 
void setHasDynamicTensor (ir::OperationIndex ind, bool val) override
 
bool getHasDynamicTensor (ir::OperationIndex ind) 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 36 of file LoweredGraph.h.

Constructor & Destructor Documentation

◆ LoweredGraph()

onert::compiler::LoweredGraph::LoweredGraph ( const ir::Graph graph,
const compiler::CompilerOptions options 
)

Definition at line 41 of file LoweredGraph.cc.

41 : _graph{graph}
42{
43 lowerGraph(options);
44}
ir::Graph & graph() override

Member Function Documentation

◆ getHasDynamicTensor()

bool onert::compiler::LoweredGraph::getHasDynamicTensor ( ir::OperationIndex  ind) const
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 51 of file LoweredGraph.h.

52 {
53 auto itr = _has_dynamic_tensor_map.find(ind);
54 return (itr == _has_dynamic_tensor_map.end()) ? false : itr->second;
55 }

◆ graph() [1/2]

const ir::Graph & onert::compiler::LoweredGraph::graph ( ) const
inlineoverridevirtual

◆ graph() [2/2]

ir::Graph & onert::compiler::LoweredGraph::graph ( )
inlineoverridevirtual

◆ indexed_ranks()

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

Definition at line 45 of file LoweredGraph.h.

45{ return _indexed_ranks; }

◆ lower_info() [1/2]

const compiler::GraphLowerInfo & onert::compiler::LoweredGraph::lower_info ( ) const
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 43 of file LoweredGraph.h.

43{ return _lower_info_map; }

◆ lower_info() [2/2]

compiler::GraphLowerInfo & onert::compiler::LoweredGraph::lower_info ( )
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 44 of file LoweredGraph.h.

44{ return _lower_info_map; }

◆ setHasDynamicTensor()

void onert::compiler::LoweredGraph::setHasDynamicTensor ( ir::OperationIndex  ind,
bool  val 
)
inlineoverridevirtual

Implements onert::compiler::ILoweredGraph.

Definition at line 47 of file LoweredGraph.h.

48 {
49 _has_dynamic_tensor_map.emplace(ind, val);
50 }

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