Skip to content

Commit 1c3a2b2

Browse files
authored
Build against TF 2.9 (#2696)
* Build with TF 2.9 * Update cuda toolchain for manylinux2014
1 parent 953d848 commit 1c3a2b2

File tree

21 files changed

+72
-1958
lines changed

21 files changed

+72
-1958
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,2 @@
11
ARG IMAGE_TYPE=latest-cpu
22
FROM tfaddons/dev_container:$IMAGE_TYPE
3-
4-
ARG USERNAME=vscode
5-
ARG USER_UID=1000
6-
ARG USER_GID=$USER_UID
7-
8-
# Options for common package install script - SHA updated on release
9-
ARG INSTALL_ZSH="false"
10-
ARG UPGRADE_PACKAGES="false"
11-
ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
12-
ARG COMMON_SCRIPT_SHA="dev-mode"
13-
14-
# Configure apt and install packages
15-
RUN apt-get update \
16-
&& export DEBIAN_FRONTEND=noninteractive \
17-
#
18-
# Verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
19-
&& apt-get -y install --no-install-recommends curl ca-certificates 2>&1 \
20-
&& curl -sSL ${COMMON_SCRIPT_SOURCE} -o /tmp/common-setup.sh \
21-
&& ([ "${COMMON_SCRIPT_SHA}" = "dev-mode" ] || (echo "${COMMON_SCRIPT_SHA} */tmp/common-setup.sh" | sha256sum -c -)) \
22-
&& /bin/bash /tmp/common-setup.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
23-
&& rm /tmp/common-setup.sh \
24-
#
25-
# *********************************************************************
26-
# * Uncomment this section to use RUN to install other dependencies. *
27-
# * See https://aka.ms/vscode-remote/containers/dockerfile-run *
28-
# *********************************************************************
29-
# && apt-get -y install --no-install-recommends <your-package-list-here>
30-
#
31-
# Clean up
32-
&& apt-get autoremove -y \
33-
&& apt-get clean -y \
34-
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@
5555
"seccomp=unconfined" ],
5656

5757
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/pytest ./tensorflow_addons/layerscontainers/non-root.
58-
"remoteUser": "vscode"
58+
//"remoteUser": "vscode"
5959
}

.github/workflows/make_wheel_Windows_x86.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
set -e -x
22

33
export TF_NEED_CUDA=0
4+
export PYTHON_BIN_PATH=$(which python)
45
export BAZEL_VC="C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/"
56

67
# Install Deps

.github/workflows/release.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ jobs:
4242
# https://github.com/bazelbuild/bazel/issues/14232#issuecomment-1011247429
4343
os: ['macos-10.15', 'windows-2019', 'ubuntu-18.04']
4444
py-version: ['3.7', '3.8', '3.9', '3.10']
45-
tf-version: ['2.6.3', '2.8.0']
45+
tf-version: ['2.7.2', '2.8.1', '2.9.0']
4646
cpu: ['x86']
4747
exclude:
4848
- py-version: '3.10'
49-
tf-version: '2.6.3'
49+
tf-version: '2.7.2'
5050
include:
5151
- os: 'macos-11'
5252
cpu: 'arm64'
53-
tf-version: '2.8.0'
53+
tf-version: '2.9.0'
5454
py-version: '3.8'
5555
- os: 'macos-11'
5656
cpu: 'arm64'
57-
tf-version: '2.8.0'
57+
tf-version: '2.9.0'
5858
py-version: '3.9'
5959
fail-fast: false
6060
steps:
@@ -76,8 +76,7 @@ jobs:
7676
name: Setup Bazel
7777
# Ubuntu bazel is run inside of the docker image
7878
run: bash tools/install_deps/install_bazelisk.sh ./
79-
- if: matrix.py-version != '3.9' || matrix.tf-version != '2.4.2'
80-
name: Build wheels
79+
- name: Build wheels
8180
env:
8281
OS: ${{ runner.os }}
8382
PY_VERSION: ${{ matrix.py-version }}
@@ -86,8 +85,7 @@ jobs:
8685
CPU: ${{ matrix.cpu }}
8786
shell: bash
8887
run: bash .github/workflows/make_wheel_${OS}_${CPU}.sh
89-
- if: matrix.py-version != '3.9' || matrix.tf-version != '2.4.2'
90-
uses: actions/upload-artifact@v1
88+
- uses: actions/upload-artifact@v1
9189
with:
9290
name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ matrix.cpu }}-wheel
9391
path: wheelhouse
@@ -99,16 +97,16 @@ jobs:
9997
matrix:
10098
os: ['macOS', 'Windows', 'Linux']
10199
py-version: ['3.7', '3.8', '3.9', '3.10']
102-
tf-version: ['2.8.0']
100+
tf-version: ['2.9.0']
103101
cpu: ['x86']
104102
include:
105103
- os: 'macOS'
106104
cpu: 'arm64'
107-
tf-version: '2.8.0'
105+
tf-version: '2.9.0'
108106
py-version: '3.8'
109107
- os: 'macOS'
110108
cpu: 'arm64'
111-
tf-version: '2.8.0'
109+
tf-version: '2.9.0'
112110
py-version: '3.9'
113111
fail-fast: false
114112
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release'

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Just run from the root:
174174

175175
```bash
176176
pip install tensorflow==2.8
177-
# you can use "pip install tensorflow-cpu==2.8.0" too if you're not testing on gpu.
177+
# you can use "pip install tensorflow-cpu==2.9.0" too if you're not testing on gpu.
178178
pip install -e ./
179179
```
180180

@@ -262,7 +262,7 @@ If you need a custom C++/Cuda op for your test, compile your ops with
262262

263263
```bash
264264
python configure.py
265-
pip install tensorflow==2.8 -e ./ -r tools/install_deps/pytest.txt
265+
pip install tensorflow==2.9 -e ./ -r tools/install_deps/pytest.txt
266266
bash tools/install_so_files.sh # Linux/macos/WSL2
267267
sh tools/install_so_files.sh # PowerShell
268268
```
@@ -290,7 +290,7 @@ docker run --gpus all --rm -it -v ${PWD}:/addons -w /addons gcr.io/tensorflow-te
290290

291291
Configure:
292292
```bash
293-
python3 -m pip install tensorflow==2.8
293+
python3 -m pip install tensorflow==2.9
294294
python3 ./configure.py # Links project with TensorFlow dependency
295295
```
296296

@@ -329,7 +329,7 @@ quickly, as Bazel has great support for caching and distributed testing.
329329
To test with Bazel:
330330

331331
```bash
332-
python3 -m pip install tensorflow==2.8
332+
python3 -m pip install tensorflow==2.9
333333
python3 configure.py
334334
python3 -m pip install -r tools/install_deps/pytest.txt
335335
bazel test -c opt -k \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ what it was tested against.
8080
#### Python Op Compatibility Matrix
8181
| TensorFlow Addons | TensorFlow | Python |
8282
|:----------------------- |:---|:---------- |
83-
| tfa-nightly | 2.6, 2.7, 2.8 | 3.7, 3.8, 3.9, 3.10 |
83+
| tfa-nightly | 2.7, 2.8, 2.9 | 3.7, 3.8, 3.9, 3.10 |
8484
| tensorflow-addons-0.16.1 | 2.6, 2.7, 2.8 |3.7, 3.8, 3.9, 3.10 |
8585
| tensorflow-addons-0.15.0 | 2.5, 2.6, 2.7 |3.7, 3.8, 3.9 |
8686
| tensorflow-addons-0.14.0 | 2.4, 2.5, 2.6 |3.6, 3.7, 3.8, 3.9 |

WORKSPACE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,28 @@ tf_configure(
1818
)
1919

2020
cuda_configure(name = "local_config_cuda")
21+
22+
http_archive(
23+
name = "org_tensorflow",
24+
sha256 = "8087cb0c529f04a4bfe480e49925cd64a904ad16d8ec66b98e2aacdfd53c80ff",
25+
strip_prefix = "tensorflow-2.9.0",
26+
urls = [
27+
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.9.0.tar.gz",
28+
],
29+
)
30+
31+
load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")
32+
33+
tf_workspace3()
34+
35+
load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")
36+
37+
tf_workspace2()
38+
39+
load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1")
40+
41+
tf_workspace1()
42+
43+
load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0")
44+
45+
tf_workspace0()

build_deps/toolchains/gcc7_manylinux2010-nvcc-cuda11/BUILD

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)