Template Struct CppNode

Inheritance Relationships

Base Type

Struct Documentation

template<class T>
struct CppNode : public torch::autograd::Node

Public Functions

virtual variable_list apply(variable_list &&inputs) override

Performs the Node’s actual operation.

virtual void release_variables() override

Releases saved variables if the operation won’t be reused.

void set_ctx_grad_fn(const std::shared_ptr<Node> &node)
void save_variables_to_ctx()
inline virtual void compiled_args(CompiledNodeArgs &args) override
inline virtual variable_list apply_with_saved(const variable_list &inputs, SwapSavedVariables &saved) override

Public Members

AutogradContext ctx_
std::vector<bool> is_variable_input_
std::vector<VariableInfo> input_info_
std::vector<VariableInfo> output_info_


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources