mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Update generated header to use flatbuffer v1.12; Also pin flatbuffer repo to v1.12 Pull Request resolved: https://github.com/pytorch/pytorch/pull/71279 Test Plan: unittest Fixes #ISSUE_NUMBER Reviewed By: gmagogsfm Differential Revision: D33572140 Pulled By: qihqi fbshipit-source-id: 319efc70f6c491c66a3dfcd7cad1f7defe69916b
16 lines
485 B
Bash
16 lines
485 B
Bash
#!/bin/bash
|
|
ROOT=$(pwd)
|
|
FF_LOCATION="$ROOT/third_party/flatbuffers"
|
|
cd "$FF_LOCATION" || exit
|
|
mkdir build
|
|
cd build || exit
|
|
cmake ..
|
|
cmake --build . --target flatc
|
|
mkdir -p "$ROOT/build/torch/csrc/jit/serialization"
|
|
./flatc --cpp --gen-mutable --scoped-enums \
|
|
-o "$ROOT/torch/csrc/jit/serialization" \
|
|
-c "$ROOT/torch/csrc/jit/serialization/mobile_bytecode.fbs"
|
|
echo '// @generated' >> "$ROOT/torch/csrc/jit/serialization/mobile_bytecode_generated.h"
|
|
cd "$ROOT" || exit
|
|
exit
|