#pragma once #include #include #include bool THPEngine_initModule(PyObject *module); namespace torch { namespace autograd { namespace python { struct PythonEngine : public Engine { void thread_init(int device) override; void thread_on_exception(NodeTask& task, std::exception& e) override; variable_list execute( const edge_list& roots, const variable_list& inputs, bool keep_graph, bool create_graph, const edge_list& outputs = {}) override; std::unique_ptr make_anomaly_metadata() override; }; }}} // namespace torch::autograd::python