Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Data Fields | Protected Member Functions | Friends
torch::jit::Node Struct Reference
Inheritance diagram for torch::jit::Node:
torch::jit::PythonOp torch::jit::ConcretePythonOp

Public Member Functions

Node *& next ()
Node *& prev ()
Node *const & next () const
Node *const & prev () const
NodeKind kind () const
NodesetSourceLocation (std::shared_ptr< SourceLocation > sl)
std::shared_ptr< SourceLocationgetSourceLocation () const
GraphowningGraph ()
const GraphowningGraph () const
BlockowningBlock ()
const BlockowningBlock () const
ScopePtr scope ()
void setScope (ScopePtr scope)
std::string scopeName () const
at::ArrayRef< Value * > inputs ()
at::ArrayRef< const Value * > inputs () const
at::ArrayRef< Value * > outputs ()
at::ArrayRef< const Value * > outputs () const
Valueoutput (size_t i) const
bool hasUses () const
TORCH_API void replaceAllUsesWith (Node *n)
Valueinput ()
Valueoutput ()
const Valueoutput () const
const Valueinput () const
Valueinput (size_t i) const
ValuenamedInput (Symbol name) const
c10::optional< IValueget (Symbol name) const
template<typename T >
c10::optional< Tget (Symbol name) const
bool is_constant (Symbol name) const
TORCH_API bool mustBeNone () const
TORCH_API bool isNondeterministic () const
TORCH_API bool hasSideEffects () const
TORCH_API ValueaddInput (Value *value)
TORCH_API ValueinsertInput (size_t i, Value *value)
TORCH_API ValuereplaceInput (size_t i, Value *newValue)
TORCH_API void replaceInputWith (Value *from, Value *to)
TORCH_API ValueaddOutput ()
TORCH_API ValueinsertOutput (size_t i)
TORCH_API void eraseOutput (size_t i)
TORCH_API BlockaddBlock ()
TORCH_API void eraseBlock (size_t i)
at::ArrayRef< Block * > blocks ()
at::ArrayRef< const Block * > blocks () const
TORCH_API bool isBefore (const Node *n) const
TORCH_API bool isAfter (const Node *n) const
TORCH_API NodeinsertBefore (Node *n)
TORCH_API NodeinsertAfter (Node *n)
TORCH_API void moveAfter (Node *n)
TORCH_API void moveBefore (Node *n)
TORCH_API void removeInput (size_t i)
TORCH_API void removeAllInputs ()
graph_node_list_iterator iterator ()
graph_node_list_iterator reverseIterator ()
const_graph_node_list_iterator iterator () const
const_graph_node_list_iterator reverseIterator () const
TORCH_API void destroy ()
template<typename T >
Tcast ()
template<typename T >
Texpect ()
TORCH_API bool matches (const char *signature_literal, at::ArrayRef< Symbol > const_inputs={}) const
const FunctionSchemaschema () const
const FunctionSchemamaybeSchema () const
void dump () const
std::ostream & print (std::ostream &out, size_t level, std::vector< const Node * > *groups) const
void copyAttributes (const Node &rhs)
bool hasAttribute (Symbol name) const
bool hasAttributeS (const std::string &name) const
AttributeKind kindOf (Symbol name) const
AttributeKind kindOfS (const std::string &name) const
NoderemoveAttribute (Symbol name)
NoderemoveAttributeS (const std::string &name)
bool hasAttributes () const
size_t numAttributes () const
std::vector< SymbolattributeNames () const
std::vector< const char * > attributeNamesS () const
GraphAttr::ValueType & g (Symbol name)
Nodet_ (Symbol name, TensorAttr::ConstructorType v)
const TensorAttr::ValueTypet (Symbol name) const
Nodets_ (Symbol name, TensorsAttr::ConstructorType v)
const TensorsAttr::ValueType & ts (Symbol name) const

Data Fields

friend graph_node_list
friend const_graph_node_list
friend graph_node_list_iterator
friend const_graph_node_list_iterator
Nodenext_in_graph [2] = {nullptr, nullptr}

Protected Member Functions

TORCH_API Node (Graph *graph_, NodeKind kind_)
virtual NodeallocNewInstance (Graph *g)
virtual TORCH_API void cloneFrom (Node *s)


struct Graph
struct Block
struct Value

Detailed Description

Definition at line 228 of file ir.h.

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