Files
pytorch/torch/csrc/stub.cpp
Anders Papitto 2983998bb3 add torch-python target (#12742)
Summary:
This is the next minimal step towards moving _C into cmake. For now,
leave _C in setup.py, but reduce it to an empty stub file. All of its
sources are now part of the new torch-python cmake target.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12742

Reviewed By: soumith

Differential Revision: D13089691

Pulled By: anderspapitto

fbshipit-source-id: 1c746fda33cfebb26e02a7f0781fefa8b0d86385
2018-11-16 11:43:48 -08:00

19 lines
233 B
C++

#include <Python.h>
#ifdef _WIN32
__declspec(dllimport)
#endif
extern PyObject* initModule();
#if PY_MAJOR_VERSION == 2
PyMODINIT_FUNC init_C()
{
initModule();
}
#else
PyMODINIT_FUNC PyInit__C()
{
return initModule();
}
#endif