TVM  0.9.4
tvm::graph::CallGraph Class Reference

#include <tvm/graph/CallGraph.h>

Collaboration diagram for tvm::graph::CallGraph:

Classes

struct  Call
 
struct  CompareCall
 
struct  Plan
 

Public Member Functions

void add (std::shared_ptr< internal::Inputs > inputs)
 
void update ()
 
void execute () const
 
void clear ()
 

Protected Member Functions

std::vector< int > addOutput (abstract::Outputs *source, int output)
 
int addCall (Call c)
 

Protected Attributes

std::vector< std::shared_ptr< internal::Inputs > > inputs_
 
std::map< Call, int, CompareCallcallId_
 
std::vector< Callcalls_
 
internal::DependencyGraph dependencyGraph_
 
std::map< std::intptr_t, std::map< int, std::vector< int > > > visited_
 
Plan plan_
 

Detailed Description

A Direct Acyclic Graph representing the dependencies between update calls where an edge (from, to) means that from depends on to.

The calls present in the graph depend on the inputs of the Inputs objects added to the graph.

Member Function Documentation

◆ add()

void tvm::graph::CallGraph::add ( std::shared_ptr< internal::Inputs inputs)

Add a given Inputs object to the graph

◆ addCall()

int tvm::graph::CallGraph::addCall ( Call  c)
protected

Add a Call to the graph

It has no effect if the Call is already in the graph.

Returns
The Call id

◆ addOutput()

std::vector<int> tvm::graph::CallGraph::addOutput ( abstract::Outputs source,
int  output 
)
protected

Add a given source and its output to the graph

It has no effect if the source and its output are already in the graph.

Returns
The list of dependencies for the given source.

◆ clear()

void tvm::graph::CallGraph::clear ( )

Clear the object.

◆ execute()

void tvm::graph::CallGraph::execute ( ) const
inline

Execute the plan

◆ update()

void tvm::graph::CallGraph::update ( )

Update the plan

Member Data Documentation

◆ callId_

std::map<Call, int, CompareCall> tvm::graph::CallGraph::callId_
protected

Call ids

◆ calls_

std::vector<Call> tvm::graph::CallGraph::calls_
protected

Id to Call

◆ dependencyGraph_

internal::DependencyGraph tvm::graph::CallGraph::dependencyGraph_
protected

Dependency graph

◆ inputs_

std::vector<std::shared_ptr<internal::Inputs> > tvm::graph::CallGraph::inputs_
protected

Store inputs added to the graph

◆ plan_

Plan tvm::graph::CallGraph::plan_
protected

Store the call plan

◆ visited_

std::map<std::intptr_t, std::map<int, std::vector<int> > > tvm::graph::CallGraph::visited_
protected

Used to avoid duplicate entries in the graph


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