mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/74387 Make temporary python bindings for flatbuffer to test ScriptModule save / load. (Note: this ignores all push blocking failures!) Test Plan: unittest Reviewed By: iseeyuan Differential Revision: D34968080 fbshipit-source-id: d23b16abda6e4b7ecf6b1198ed6e00908a3db903 (cherry picked from commit 5cbbc390c5f54146a1c469106ab4a6286c754325)
19 lines
337 B
C
19 lines
337 B
C
#include <Python.h> // NOLINT
|
|
|
|
#ifdef _WIN32
|
|
__declspec(dllimport)
|
|
#endif
|
|
extern PyObject* initModuleFlatbuffer(void);
|
|
|
|
#ifndef _WIN32
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
#endif
|
|
__attribute__((visibility("default"))) PyObject* PyInit__C_flatbuffer(void);
|
|
#endif
|
|
|
|
PyMODINIT_FUNC PyInit__C_flatbuffer(void)
|
|
{
|
|
return initModuleFlatbuffer();
|
|
}
|