mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
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
19 lines
233 B
C++
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
|