| 41 | } // namespace test_pytorch_regressions |
| 42 | |
| 43 | TEST_SUBMODULE(pybind11_pytorch_regressions, m) { |
| 44 | using namespace test_pytorch_regressions; |
| 45 | |
| 46 | py::class_<TracingState, std::shared_ptr<TracingState>>(m, "TracingState") |
| 47 | .def(py::init<>()) |
| 48 | .def_readwrite("value", &TracingState::value); |
| 49 | |
| 50 | m.def("_get_tracing_state", []() { return get_tracing_state(); }); |
| 51 | |
| 52 | py::class_<InterfaceType, InterfaceTypePtr>(m, "InterfaceType") |
| 53 | .def(py::init<>()) |
| 54 | .def_readwrite("value", &InterfaceType::value); |
| 55 | |
| 56 | py::class_<CompilationUnit, std::shared_ptr<CompilationUnit>>(m, "CompilationUnit") |
| 57 | .def(py::init<>()) |
| 58 | .def("get_interface", |
| 59 | [](const std::shared_ptr<CompilationUnit> &self, const std::string &name) { |
| 60 | return self->get_interface(name); |
| 61 | }); |
| 62 | } |
nothing calls this directly
no test coverage detected