|
class | Graph |
| Symbolic computation graph. This is the intermediate representation for optimization pass. More...
|
|
class | IndexedGraph |
| Auxiliary data structure to index a graph. It maps Nodes in the graph to consecutive integers node_id. It also maps IndexedGraph::NodeEntry to consecutive integer entry_id. This allows storing properties of Node and NodeEntry into compact vector and quickly access them without resorting to hashmap. More...
|
|
class | Layout |
|
class | Node |
| Node represents an operation in a computation graph. More...
|
|
struct | NodeAttrs |
| The attributes of the current operation node. Usually are additional parameters like axis,. More...
|
|
struct | NodeEntry |
| an entry that represents output data from a node More...
|
|
struct | NodeEntryEqual |
| This lets you use a NodeEntry as a key in a unordered_map of the form unordered_map<NodeEntry, ValueType, NodeEntryHash, NodeEntryEqual> More...
|
|
struct | NodeEntryHash |
| This lets you use a NodeEntry as a key in a unordered_map of the form unordered_map<NodeEntry, ValueType, NodeEntryHash, NodeEntryEqual> More...
|
|
class | Op |
| Operator structure. More...
|
|
class | OpGroup |
| auxiliary data structure used to set attributes to a group of operators More...
|
|
class | OpMap |
| A map data structure that takes Op* as key and returns ValueType. More...
|
|
struct | PassFunctionReg |
| Registry entry for pass functions. More...
|
|
class | Symbol |
| Symbol is help class used to represent the operator node in Graph. More...
|
|
class | TShape |
| A Shape class that is used to represent shape of each tensor. More...
|
|
class | Tuple |
| A dynamic sized array data structure that is optimized for storing small number of elements with same type. More...
|
|
|
using | JSONString = std::string |
| The result holder of JSON serializer. More...
|
|
using | ShapeVector = std::vector< TShape > |
| The result holder of shape of each NodeEntry in the graph. More...
|
|
using | DTypeVector = std::vector< int > |
| The result holder of type of each NodeEntry in the graph. More...
|
|
using | LayoutVector = std::vector< Layout > |
| The result holder of layout of each NodeEntry in the graph. More...
|
|
using | DeviceVector = std::vector< int > |
| The result holder of device of each operator in the graph. More...
|
|
using | DeviceAssignMap = std::unordered_map< std::string, int > |
| The result holder of device of each operator in the graph. More...
|
|
using | StorageVector = std::vector< int > |
| The result holder of storage id of each NodeEntry in the graph. More...
|
|
using | NodePtr = std::shared_ptr< Node > |
| we always used NodePtr for a reference pointer to the node, so this alias can be changed in case. More...
|
|
template<typename ValueType > |
using | NodeEntryMap = std::unordered_map< NodeEntry, ValueType, NodeEntryHash, NodeEntryEqual > |
|
using | FListInputNames = std::function< std::vector< std::string >(const NodeAttrs &attrs)> |
| Return list of input arguments names of each operator. More...
|
|
using | FNumVisibleOutputs = std::function< uint32_t(const NodeAttrs &attrs)> |
| Return number of visible outputs by the user. More...
|
|
using | FListOutputNames = std::function< std::vector< std::string >(const NodeAttrs &attrs)> |
| Return list of output arguments names of each operator. More...
|
|
using | FMutateInputs = std::function< std::vector< uint32_t >(const NodeAttrs &attrs)> |
| Check whether operator will mutate k-th input. More...
|
|
template<typename AttrType > |
using | FInferNodeEntryAttr = std::function< bool(const NodeAttrs &attrs, std::vector< AttrType > *in_attrs, std::vector< AttrType > *out_attrs)> |
| Inference function of certain type. More...
|
|
using | FGetAttrDict = std::function< std::unordered_map< std::string, std::string >(const NodeAttrs &attrs)> |
| Get attribute dictionary from node. More...
|
|
using | FInferShape = FInferNodeEntryAttr< TShape > |
| Shape inference function. Update the shapes given the input shape information. TShape.ndim() == 0 means the shape is still unknown. More...
|
|
using | FInferType = FInferNodeEntryAttr< int > |
| Type inference function. Update the type given the known type information. More...
|
|
using | TIsBackward = bool |
| Whether this op is an explicit backward operator, If TIsBackward is true: More...
|
|
using | TIsGhost = bool |
| Whether this op is a ghost node. If TIsGhost is true: More...
|
|
using | FInplaceOption = std::function< std::vector< std::pair< int, int > >(const NodeAttrs &attrs)> |
| Get possible inplace options. This function enables optimization to reuse memory of inputs in output. More...
|
|
using | FInplaceIdentity = std::function< std::vector< bool >(const NodeAttrs &attrs)> |
| Get if the inplace option is an identity This function enables inplace optimization even when input reference count is greater than one. More...
|
|
using | FIgnoreInputs = std::function< std::vector< uint32_t >(const NodeAttrs &attrs)> |
| Get list of inputs in the op whose content are actually not used by the operator These are dummy input that can be used for example in zeros_like, ones_like. More...
|
|
using | FGradient = std::function< std::vector< NodeEntry >(const NodePtr &nodeptr, const std::vector< NodeEntry > &out_grads)> |
| Get the gradient node of the op node This function generates the backward graph of the node. More...
|
|
using | FSetInputVarAttrOnCompose = std::function< void(const NodeAttrs &attrs, NodePtr var, const int index)> |
| Set the attributes of input variable. Usually used for setting initialization or weight decay. More...
|
|
using | FCorrectLayout = std::function< bool(const NodeAttrs &attrs, std::vector< Layout > *ilayouts, const std::vector< Layout > *last_ilayouts, std::vector< Layout > *olayouts)> |
| Infer & correct function of node layout. See Layout for layout convention. More...
|
|
using | FInputGraph = std::function< std::vector< uint32_t >(const NodeAttrs &attrs)> |
| Get a list of inputs that represent graphs instead of data. Normally, input symbols are considered as data to the operator. However, control flow operators and high-order functions need to interpret symbols as graphs. More...
|
|
typedef std::function< Graph(Graph src)> | PassFunction |
| A PassFunction is an "Operator on Graph". It takes a source graph and return a graph that may or may not be the same as the input one. More...
|
|
typedef int64_t | dim_t |
| data type to store dim size More...
|
|
|
template<typename FVisit > |
void | DFSVisit (const std::vector< NodeEntry > &heads, FVisit fvisit) |
| perform a Post Order DFS visit to each node in the graph. This order is deterministic and is also topoligical sorted. More...
|
|
template<typename GNode , typename HashType , typename FVisit , typename HashFunc , typename InDegree , typename GetInput > |
void | PostOrderDFSVisit (const std::vector< GNode > &heads, FVisit fvisit, HashFunc hash, InDegree indegree, GetInput getinput) |
|
NodeEntry | MakeNode (const char *op_name, std::string node_name, std::vector< NodeEntry > inputs, std::unordered_map< std::string, std::string > attrs=std::unordered_map< std::string, std::string >()) |
| Quick utilities make node. More...
|
|
Graph | ApplyPasses (Graph src, const std::vector< std::string > &passes) |
| Apply a series of pass transformations on the input graph. More...
|
|
Graph | ApplyPass (Graph src, const std::string &pass) |
| Apply one pass to the graph. More...
|
|
template<typename SrcIter , typename DstIter > |
DstIter | ShapeTypeCast (const SrcIter begin, const SrcIter end, DstIter dst_begin) |
| helper function to cast type of container elements More...
|
|
template<typename SrcIter > |
TShape | ShapeTypeCast (const SrcIter begin, const SrcIter end) |
| helper function to transform a container to TShape with type cast More...
|
|