mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary:
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
Fixes #{issue number}
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67351
Reviewed By: iseeyuan
Differential Revision: D32010095
Pulled By: qihqi
fbshipit-source-id: d763b0557780f7c2661b6485105b045e41a5e8f1
16 lines
428 B
Bash
Executable File
16 lines
428 B
Bash
Executable File
#!/bin/bash
|
|
ROOT=$(pwd)
|
|
FF_LOCATION="$ROOT/third_party/flatbuffers"
|
|
cd "$FF_LOCATION" || exit
|
|
mkdir build
|
|
cd build || exit
|
|
py() { command python "$@"; }
|
|
cmake ..
|
|
cmake --build . --target flatc
|
|
mkdir -p "$ROOT/build/torch/csrc/jit/serialization"
|
|
./flatc --cpp --gen-mutable --scoped-enums \
|
|
-o "$ROOT/build/torch/csrc/jit/serialization" \
|
|
-c "$ROOT/torch/csrc/jit/serialization/mobile_bytecode.fbs"
|
|
cd "$ROOT" || exit
|
|
exit
|