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