mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
This reverts commit ace6decc99.
Reverted https://github.com/pytorch/pytorch/pull/130341 on behalf of https://github.com/clee2000 due to unfortunately the internal pybind update got reverted cc @malfet ([comment](https://github.com/pytorch/pytorch/pull/130341#issuecomment-2253147079))
27 lines
635 B
C++
27 lines
635 B
C++
#include <torch/csrc/utils/python_symnode.h>
|
|
|
|
namespace torch {
|
|
|
|
py::handle get_symint_class() {
|
|
// NB: leak
|
|
static py::handle symint_class =
|
|
py::object(py::module::import("torch").attr("SymInt")).release();
|
|
return symint_class;
|
|
}
|
|
|
|
py::handle get_symfloat_class() {
|
|
// NB: leak
|
|
static py::handle symfloat_class =
|
|
py::object(py::module::import("torch").attr("SymFloat")).release();
|
|
return symfloat_class;
|
|
}
|
|
|
|
py::handle get_symbool_class() {
|
|
// NB: leak
|
|
static py::handle symbool_class =
|
|
py::object(py::module::import("torch").attr("SymBool")).release();
|
|
return symbool_class;
|
|
}
|
|
|
|
} // namespace torch
|