xref: /aosp_15_r20/external/pytorch/torch/csrc/PyInterpreter.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <c10/core/impl/PyInterpreter.h>
4 #include <torch/csrc/Export.h>
5 #include <torch/csrc/utils/pybind.h>
6 
7 namespace torch::detail {
8 TORCH_PYTHON_API py::handle getTorchApiFunction(const c10::OperatorHandle& op);
9 }
10 
11 // TODO: Move these to a proper namespace
12 TORCH_PYTHON_API c10::impl::PyInterpreter* getPyInterpreter();
13 TORCH_PYTHON_API bool isMainPyInterpreter();
14