mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: It just depends on a single `torch_python` library. C library does not depend on standard C++ library and as result it closes https://github.com/pytorch/pytorch/issues/36941 Pull Request resolved: https://github.com/pytorch/pytorch/pull/39375 Reviewed By: orionr Differential Revision: D21840645 Pulled By: malfet fbshipit-source-id: 777c189feee9d6fc686816d92cb9f109b8aac7ca
19 lines
284 B
C
19 lines
284 B
C
#include <Python.h>
|
|
|
|
#ifdef _WIN32
|
|
__declspec(dllimport)
|
|
#endif
|
|
extern PyObject* initModule(void);
|
|
|
|
#ifndef _WIN32
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
#endif
|
|
__attribute__((visibility("default"))) PyObject* PyInit__C(void);
|
|
#endif
|
|
|
|
PyMODINIT_FUNC PyInit__C(void)
|
|
{
|
|
return initModule();
|
|
}
|