mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/70201 Included functions: save_mobile_module -> saves a mobile::Module to flatbuffer load_mobile_module_from_file -> loads a flatbuffer into mobile::Module parse_mobile_module -> parses from bytes or deserialized flatbuffer module object Compared to previous attempts, this diff only adds flatbuffer to cmake target and leaves fbcode/xplat ones unchanged. Test Plan: unittest Reviewed By: malfet, gmagogsfm Differential Revision: D33239362 fbshipit-source-id: b9ca36b83d6af2d78cc50b9eb9e2a6fa7fce0763
11 lines
337 B
CMake
11 lines
337 B
CMake
set(FlatBuffers_Include ${PROJECT_SOURCE_DIR}/third_party/flatbuffers/include)
|
|
file(GLOB FlatBuffers_Library_SRCS
|
|
${FlatBuffers_Include}/flatbuffers/*.h
|
|
)
|
|
add_library(flatbuffers INTERFACE)
|
|
target_sources(
|
|
flatbuffers
|
|
INTERFACE ${FlatBuffers_Library_SRCS}
|
|
)
|
|
target_include_directories(flatbuffers INTERFACE ${FlatBuffers_Include})
|