Files
pytorch/torch/csrc/stub_with_flatbuffer.c
Han Qi 75d6cbe605 [4/5]Testing jit module in flatbuffer in Python. (#74387)
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)
2022-03-24 23:29:47 +00:00

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();
}