TVM  0.9.4
tvm::graph::internal::Log Class Reference

#include <tvm/graph/internal/Log.h>

Classes

struct  DirectDependency
 
struct  EnumValue
 
struct  Input
 
struct  InputDependency
 
struct  InternalDependency
 
struct  Output
 
struct  OutputDependency
 
struct  Pointer
 
struct  Update
 

Public Member Functions

std::pair< std::vector< Log::Output >, std::vector< Log::Update > > subGraph (const CallGraph *const g) const
 
std::pair< std::vector< Log::Output >, std::vector< Log::Update > > subGraph (const Output out) const
 
std::string generateDot (const Pointer &p) const
 
std::string generateDot (const CallGraph *const g) const
 
std::string generateDot (const std::vector< Log::Output > &outHighlight={}, const std::vector< Log::Update > &upHighlight={}) const
 
const std::type_index & getPromotedType (const Pointer &p) const
 

Public Attributes

std::vector< Updateupdates_
 
std::vector< Inputinputs_
 
std::vector< Outputoutputs_
 
std::vector< InputDependencyinputDependencies_
 
std::vector< OutputDependencyoutputDependencies_
 
std::vector< InternalDependencyinternalDependencies_
 
std::vector< DirectDependencydirectDependencies_
 
std::map< Pointer, std::vector< Pointer > > graphOutputs_
 
std::map< std::uintptr_t, std::vector< std::type_index > > types_
 

Detailed Description

A data structure, used by Logger to log the inputs, outputs, updates and dependencies that are declared at runtime.

Member Function Documentation

◆ generateDot() [1/3]

std::string tvm::graph::internal::Log::generateDot ( const CallGraph *const  g) const

Generate the specified CallGraph.

◆ generateDot() [2/3]

std::string tvm::graph::internal::Log::generateDot ( const Pointer p) const

Generate a dot representation for node corresponding to p.

◆ generateDot() [3/3]

std::string tvm::graph::internal::Log::generateDot ( const std::vector< Log::Output > &  outHighlight = {},
const std::vector< Log::Update > &  upHighlight = {} 
) const

Generate the whole graph, highlighting the elements specified by oUtHighlight and upHightlight.

◆ getPromotedType()

const std::type_index& tvm::graph::internal::Log::getPromotedType ( const Pointer p) const

Get the most derived type corresponding to pointer p.

(This is based on the assumption that the log add the most derived type last)

◆ subGraph() [1/2]

std::pair<std::vector<Log::Output>, std::vector<Log::Update> > tvm::graph::internal::Log::subGraph ( const CallGraph *const  g) const

Build the list of updates and outputs used in the CallGraph g

◆ subGraph() [2/2]

std::pair<std::vector<Log::Output>, std::vector<Log::Update> > tvm::graph::internal::Log::subGraph ( const Output  out) const

Build the list of updates and outputs used from out

Member Data Documentation

◆ directDependencies_

std::vector<DirectDependency> tvm::graph::internal::Log::directDependencies_

◆ graphOutputs_

std::map<Pointer, std::vector<Pointer> > tvm::graph::internal::Log::graphOutputs_

Each elements of the map is the list of inputs of a CallGraph, as added in CallGraph.add

◆ inputDependencies_

std::vector<InputDependency> tvm::graph::internal::Log::inputDependencies_

◆ inputs_

std::vector<Input> tvm::graph::internal::Log::inputs_

◆ internalDependencies_

std::vector<InternalDependency> tvm::graph::internal::Log::internalDependencies_

◆ outputDependencies_

std::vector<OutputDependency> tvm::graph::internal::Log::outputDependencies_

◆ outputs_

std::vector<Output> tvm::graph::internal::Log::outputs_

◆ types_

std::map<std::uintptr_t, std::vector<std::type_index> > tvm::graph::internal::Log::types_

Maps a data address to all the type info associated with this address. For a given address, each type appears only once, and types are sorted in their order of appearance in the logging process. We assume that the last one to appear is the most derived in the inheritance hierarchy.

FIXME: can we find a more robust way to determine the real type of a data?

◆ updates_

std::vector<Update> tvm::graph::internal::Log::updates_

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