1 #include <torch/csrc/autograd/python_enum_tag.h> 2 #include <torch/csrc/utils/pybind.h> 3 #include <pybind11/pybind11.h> 4 #include <ATen/core/enum_tag.h> 5 6 namespace py = pybind11; 7 namespace torch { 8 namespace autograd { initEnumTag(PyObject * module)9 void initEnumTag(PyObject* module) { 10 auto m = py::handle(module).cast<py::module>(); 11 py::enum_<at::Tag>(m, "Tag") 12 ${enum_of_valid_tags}; 13 m.doc() = "An Enum that contains tags that can be assigned to an operator registered in C++."; 14 } 15 }} 16