Caffe2 - C++ API
A deep learning, cross platform ML framework
python_engine.h
1 #pragma once
2 
3 #include <torch/csrc/python_headers.h>
4 
5 #include <torch/csrc/autograd/function.h>
6 #include <torch/csrc/autograd/engine.h>
7 #include <torch/csrc/autograd/python_anomaly_mode.h>
8 
9 bool THPEngine_initModule(PyObject *module);
10 
11 namespace torch { namespace autograd { namespace python {
12 
13 struct PythonEngine : public Engine {
14  void thread_init(int device) override;
15  void thread_on_exception(FunctionTask& task, std::exception& e) override;
16  variable_list execute(
17  const edge_list& roots,
18  const variable_list& inputs,
19  bool keep_graph,
20  bool create_graph,
21  const edge_list& outputs = {}) override;
22  std::unique_ptr<AnomalyMetadata> make_anomaly_metadata() override;
23 };
24 
25 }}} // namespace torch::autograd::python
Definition: jit_type.h:17