Files
pytorch/torch/csrc/autograd/autograd.h
Sam Gross d605058212 Replace Variable.volatile with torch.no_grad() (#3970)
This removes volatile from Variable. The functionality is mostly
replaced by a global (thread-local) flag, which is controlled by
torch.set_grad_enabled() and the context manager torch.no_grad().

In C++, the flag is exposed through GradMode::is_enabled() and GradMode::set_enabled()

Fixes #3627
2017-12-18 15:46:13 -05:00

20 lines
439 B
C++

#ifndef THP_AUTOGRAD_H
#define THP_AUTOGRAD_H
PyObject * THPAutograd_initExtension(PyObject *_unused);
bool THPAutograd_initFunctions(PyObject* module);
namespace torch { namespace autograd {
void initAutogradClosureBindings(PyObject* module);
PyMethodDef* python_functions();
}}
#include "torch/csrc/autograd/python_function.h"
#include "torch/csrc/autograd/python_variable.h"
#include "torch/csrc/autograd/python_engine.h"
#endif