Skip to content

Commit

Permalink
Reland "Bump TFLite commit (#293)"
Browse files Browse the repository at this point in the history
This patch relands 49e5d32, bumping the TFLite
version after that commit was mistakenly landed without waiting for some upstream
patches in Tensorflow land first.
  • Loading branch information
boomanaiden154 committed Sep 1, 2023
1 parent 0a1219c commit caf403b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
26 changes: 24 additions & 2 deletions buildbot/build_tflite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ readonly NEON_2_SSE_TAG="cef9501d1d1c47223466bf2b8cd43f3368c37773"
readonly FLATBUFFERS_REPOSITORY="https://github.com/google/flatbuffers"
readonly FLATBUFFERS_TAG="615616cb5549a34bdf288c04bc1b94bd7a65c396"

readonly GEMMLOWP_REPOSITORY="https://github.com/google/gemmlowp"
readonly GEMMLOWP_TAG="08e4bb339e34017a0835269d4a37c4ea04d15a69"

readonly ML_DTYPES_REPOSITORY="https://github.com/jax-ml/ml_dtypes"
readonly ML_DTYPES_TAG="780b6d0ee01ffbfac45f7ec5418bc08f2b166483"

readonly TENSORFLOW_REPOSITORY="https://github.com/tensorflow/tensorflow"
readonly TENSORFLOW_TAG="d74d591e8f9e42be640dd93cfa0584914e25e98e"
readonly TENSORFLOW_TAG="b276e31ff3140e1fd20900d8df01b91900a7886d"

# cpuinfo
git clone --filter=tree:0 --no-checkout ${CPUINFO_REPOSITORY} cpuinfo/src/cpuinfo
Expand Down Expand Up @@ -109,6 +115,18 @@ cmake -GNinja -S flatbuffers/src/flatbuffers -B flatbuffers/src/flatbuffers-buil
-DFLATBUFFERS_BUILD_TESTS:BOOL=OFF
ninja -C flatbuffers/src/flatbuffers-build install

# gemmlowp
git clone --filter=tree:0 --no-checkout ${GEMMLOWP_REPOSITORY} gemmlowp/src/gemmlowp
git -C gemmlowp/src/gemmlowp checkout ${GEMMLOWP_TAG}
cmake -GNinja -S gemmlowp/src/gemmlowp/contrib -B gemmlowp/src/gemmlowp-build \
-DCMAKE_INSTALL_PREFIX:PATH=${PWD}/gemmlowp \
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
ninja -C gemmlowp/src/gemmlowp-build install

# ml_dtypes
git clone --filter=tree:0 --no-checkout ${ML_DTYPES_REPOSITORY} ml_dtypes/src/ml_dtypes
git -C ml_dtypes/src/ml_dtypes checkout ${ML_DTYPES_TAG}

# tflite
git clone --filter=tree:0 --no-checkout ${TENSORFLOW_REPOSITORY} tensorflow/src/tensorflow
git -C tensorflow/src/tensorflow checkout ${TENSORFLOW_TAG}
Expand All @@ -119,12 +137,15 @@ cmake -GNinja -S tensorflow/src/tensorflow/tensorflow/lite -B tensorflow/src/ten
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=ON \
-DTFLITE_ENABLE_INSTALL:BOOL=ON \
-DTFLITE_ENABLE_XNNPACK:BOOL=OFF \
-DSYSTEM_PTHREADPOOL=ON \
-Dcpuinfo_DIR:PATH=${PWD}/cpuinfo/share/cpuinfo \
-Druy_DIR:PATH=${PWD}/ruy/lib/cmake/ruy \
-Dabsl_DIR:PATH=${PWD}/abseil-cpp/lib/cmake/absl \
-DEigen3_DIR:PATH=${PWD}/eigen/share/eigen3/cmake \
-Dgemmlowp_DIR:PATH=${PWD}/gemmlowp/lib/cmake/gemmlowp \
-DNEON_2_SSE_DIR:PATH=${PWD}/ARM_NEON_2_x86_SSE/lib/cmake/NEON_2_SSE \
-DFlatbuffers_DIR:PATH=${PWD}/flatbuffers/lib/cmake/flatbuffers
-DFlatbuffers_DIR:PATH=${PWD}/flatbuffers/lib/cmake/flatbuffers \
-DML_DTYPES_SOURCE_DIR:PATH=${PWD}/ml_dtypes/src/ml_dtypes
ninja -C tensorflow/src/tensorflow-build install

# CMake cache file
Expand All @@ -134,6 +155,7 @@ set(ruy_DIR "${PWD}/ruy/lib/cmake/ruy" CACHE PATH "")
set(absl_DIR "${PWD}/abseil-cpp/lib/cmake/absl" CACHE PATH "")
set(Eigen3_DIR "${PWD}/eigen/share/eigen3/cmake" CACHE PATH "")
set(NEON_2_SSE_DIR "${PWD}/ARM_NEON_2_x86_SSE/lib/cmake/NEON_2_SSE" CACHE PATH "")
set(gemmlowp_DIR "${PWD}/gemmlowp/lib/cmake/gemmlowp" CACHE PATH "")
set(Flatbuffers_DIR "${PWD}/flatbuffers/lib/cmake/flatbuffers" CACHE PATH "")
set(tensorflow-lite_DIR "${PWD}/tensorflow/lib/cmake/tensorflow-lite" CACHE PATH "")
set(TENSORFLOW_SRC_DIR "${PWD}/tensorflow/src/tensorflow" CACHE PATH "")
Expand Down
1 change: 1 addition & 0 deletions buildbot/buildbot_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ ADMIN_PACKAGES="tmux"
liblzma-dev \
libssl-dev \
libgss-dev \
libpthreadpool-dev \
python3-dev \
wget \
zlib1g-dev
Expand Down

0 comments on commit caf403b

Please sign in to comment.