Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TF 2.16.1 #63

Merged
merged 4 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ build --enable_platform_specific_config

build:linux --crosstool_top=@crosstool//:toolchains
build:linux --compiler=gcc
build:linux --cxxopt=-std=c++17

build:macos --cxxopt=-std=c++14
build:macos --cxxopt=-std=c++17
build:macos --copt=-fvisibility=hidden

build:windows --incompatible_restrict_string_escapes=false
build:windows --copt=/DWIN32_LEAN_AND_MEAN
build:windows --cxxopt=/std:c++14
build:windows --cxxopt=/std:c++17
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ debuild -us -uc -tc -b -a amd64 -d
```

### Bazel
The version of `bazel` needs to be the same as that recommended for the corresponding version of tensorflow. For example, it requires `Bazel 6.1.0` to compile TF 2.15.0.
The version of `bazel` needs to be the same as that recommended for the corresponding version of tensorflow. For example, it requires `Bazel 6.5.0` to compile TF 2.16.1.

Current version of tensorflow supported is `2.15.0`.
Current version of tensorflow supported is `2.16.1`.

Build native binaries on Linux and macOS:
```
Expand Down Expand Up @@ -85,7 +85,7 @@ sudo apt install libabsl-dev libflatbuffers-dev
Next, you'll need to clone the [Tensorflow Repo](https://github.com/tensorflow/tensorflow) at the desired checkout (using TF head isn't advised). If you are planning to use libcoral or pycoral libraries, this should match the ones in those repos' WORKSPACE files. For example, if you are using TF2.15, we can check that [tag in the TF Repo](https://github.com/tensorflow/tensorflow/tree/r2.15) get the latest commit for that stable release and then checkout that address:
```
git clone https://github.com/tensorflow/tensorflow
git checkout r2.15
git checkout v2.16.1
```

To build the library:
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0")
tf_workspace0()

load("@coral_crosstool//:configure.bzl", "cc_crosstool")
cc_crosstool(name = "crosstool", cpp_version = "c++14")
cc_crosstool(name = "crosstool", cpp_version = "c++17")
3 changes: 3 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
libedgetpu (16.0tf2.16.1-1) stable; urgency=medium
* Build against TF v2.16.1
-- Nicola Ferralis < [email protected]> Thu, 07 Mar 2024 14:01:34 -0500
libedgetpu (16.0tf2.15.0-1) stable; urgency=medium
* Build against TF v2.15.0
-- Nicola Ferralis <[email protected]> Tue, 31 Jan 2024 09:10:34 -0500
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ RUN if grep 'Bionic Beaver' /etc/os-release > /dev/null; then \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y gcc-9 g++-9; \
fi

ARG BAZEL_VERSION=6.1.0
ARG BAZEL_VERSION=6.5.0
RUN wget -O /bazel https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh && \
bash /bazel && \
rm -f /bazel
2 changes: 1 addition & 1 deletion docker/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ ADD https://github.com/libusb/libusb/releases/download/v${LIBUSB_VERSION}/libusb
RUN 7z x -oc:\libusb c:\windows\temp\libusb-$env:LIBUSB_VERSION.7z

# Install Bazel
ARG BAZEL_VERSION=6.1.0
ARG BAZEL_VERSION=6.5.0
ADD https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-windows-x86_64.exe c:/windows/system32/bazel.exe
10 changes: 7 additions & 3 deletions workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
#TENSORFLOW_COMMIT = "99d80a9e254c9df7940b2902b14d15914dbbbcd9"
#TENSORFLOW_SHA256 = "bede963ce97c4badcbb3149acd7c35a6a4954fa3361b777272a58a300e7e8f1d"

# TF release 2.15.0 as of 11/10/2023. Current
TENSORFLOW_COMMIT = "6887368d6d46223f460358323c4b76d61d1558a8"
TENSORFLOW_SHA256 = "bb25fa4574e42ea4d452979e1d2ba3b86b39569d6b8106a846a238b880d73652"
# TF release 2.15.0 as of 11/10/2023.
#TENSORFLOW_COMMIT = "6887368d6d46223f460358323c4b76d61d1558a8"
#TENSORFLOW_SHA256 = "bb25fa4574e42ea4d452979e1d2ba3b86b39569d6b8106a846a238b880d73652"

# TF release 2.16.1 as of 03/07/2024. Current.
TENSORFLOW_COMMIT = "5bc9d26649cca274750ad3625bd93422617eed4b"
TENSORFLOW_SHA256 = "fe592915c85d1a89c20f3dd89db0772ee22a0fbda78e39aa46a778d638a96abc"

#CORAL_CROSSTOOL_COMMIT = "6bcc2261d9fc60dff386b557428d98917f0af491"
#CORAL_CROSSTOOL_SHA256 = "38cb4da13009d07ebc2fed4a9d055b0f914191b344dd2d1ca5803096343958b4"
Expand Down