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.17.0 #70

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ chmod a+w /; \
groupadd --gid $(shell id -g) $(shell id -g -n); \
useradd -m -e '' -s /bin/bash --gid $(shell id -g) --uid $(shell id -u) $(shell id -u -n); \
echo '$(shell id -u -n) ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; \
su $(shell id -u -n) $(if $(1),-c '$(1)',)
su $(if $(1),-c '$(1)',)
endef

docker-image:
Expand Down
8 changes: 4 additions & 4 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.5.0` to compile TF 2.16.1.
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.17.0.

Current version of tensorflow supported is `2.16.1`.
The current version of Tensorflow supported is `2.17.0`.

Build native binaries on Linux and macOS:
```
Expand Down Expand Up @@ -82,10 +82,10 @@ To prepare your system, you'll need the following packages (both available on De
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:
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 TF 2.17, 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 v2.16.1
git checkout v2.17.0
```

To build the library:
Expand Down
5 changes: 4 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
libedgetpu (16.0tf2.17.0-1) stable; urgency=medium
* Build against TF v2.17.0
-- Nicola Ferralis < feranick@hotmail.com> Fri, 12 Jul 2024 09:41:18 -0400
libedgetpu (16.0tf2.16.1-1) stable; urgency=medium
* Build against TF v2.16.1
-- Nicola Ferralis < feranick@hotmail.com> Thu, 07 Mar 2024 14:01:34 -0500
-- Nicola Ferralis <feranick@hotmail.com> 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 <feranick@hotmail.com> Tue, 31 Jan 2024 09:10:34 -0500
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ RUN choco install -y 7zip
RUN setx /M PATH $($Env:PATH + ';C:\Program Files\7-Zip')

# Install msys2
ARG MSYS_VERSION=20240113
ARG MSYS_VERSION=20240727
ADD http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-${MSYS_VERSION}.tar.xz c:/windows/temp
RUN 7z.exe x c:\windows\temp\msys2-base-x86_64-$env:MSYS_VERSION.tar.xz
RUN 7z.exe x c:\msys2-base-x86_64-$env:MSYS_VERSION.tar -o"c:\\"
RUN setx /M PATH $($Env:PATH + ';C:\msys64\usr\bin')

# Install patch
ARG PATCH_VERSION=2.7.6-1
ARG PATCH_VERSION=2.7.6-2
ADD http://repo.msys2.org/msys/x86_64/patch-${PATCH_VERSION}-x86_64.pkg.tar.xz c:/windows/temp
RUN 7z.exe x -y c:\windows\temp\patch-$env:PATCH_VERSION-x86_64.pkg.tar.xz
RUN 7z.exe x -y c:\patch-$env:PATCH_VERSION-x86_64.pkg.tar -o"c:\\msys64"

# Install vim (for xxd)
ARG VIM_VERSION=9.1.0000-1
ARG VIM_VERSION=9.1.0643-1
ADD http://repo.msys2.org/msys/x86_64/vim-${VIM_VERSION}-x86_64.pkg.tar.zst c:/windows/temp
RUN 7z.exe x -y c:\windows\temp\vim-$env:VIM_VERSION-x86_64.pkg.tar.zst
RUN 7z.exe x -y c:\vim-$env:VIM_VERSION-x86_64.pkg.tar -o"c:\\msys64"
Expand Down
39 changes: 39 additions & 0 deletions docker/update_sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,47 @@

sed -i "s/deb\ /deb \[arch=amd64\]\ /g" /etc/apt/sources.list

if [ ${UBUNTU_CODENAME} == "noble" ]; then

echo "NOBLE"

rm /etc/apt/sources.list.d/ubuntu.sources
cat <<EOT >> /etc/apt/sources.list.d/ubuntu.sources

Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: ${UBUNTU_CODENAME} ${UBUNTU_CODENAME}-updates ${UBUNTU_CODENAME}-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Architectures: amd64

## Ubuntu security updates. Aside from URIs and Suites,
## this should mirror your choices in the previous section.
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: ${UBUNTU_CODENAME}-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Architectures: amd64

Types: deb
URIs: http://ports.ubuntu.com/ubuntu-ports
Suites: ${UBUNTU_CODENAME} ${UBUNTU_CODENAME}-updates ${UBUNTU_CODENAME}-security
Components: main universe
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Architectures: arm64 armhf

EOT

else

cat <<EOT >> /etc/apt/sources.list
deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports ${UBUNTU_CODENAME} main universe
deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports ${UBUNTU_CODENAME}-updates main universe
deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports ${UBUNTU_CODENAME}-security main universe
EOT

fi



8 changes: 6 additions & 2 deletions workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
#TENSORFLOW_SHA256 = "bb25fa4574e42ea4d452979e1d2ba3b86b39569d6b8106a846a238b880d73652"

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

# TF release 2.17.0 as of 07/12/2024.
TENSORFLOW_COMMIT = "ad6d8cc177d0c868982e39e0823d0efbfb95f04c"
TENSORFLOW_SHA256 = "75b8dc9b33afff6f2e2d2e2dacc26dd0973bdcee94eec2af290828c1bc574bdc"

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