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

Build against TF 2.9 #2696

Merged
merged 39 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4e75f98
Build with TF 2.9
seanpmorgan Apr 17, 2022
95248d6
Remove exclusion
seanpmorgan Apr 18, 2022
7c871d0
Adapt to refactored test_utils namespace
bhack Apr 19, 2022
263391b
Fix condition
bhack Apr 19, 2022
54d69d0
Exclude TF 2.7.1 python 10
bhack Apr 19, 2022
55700f9
Update cuda toolchain for manylinux2014
bhack Apr 19, 2022
31540e1
Add TF workspace
bhack Apr 19, 2022
821cd3a
Fix format
bhack Apr 19, 2022
76a04e1
Debug
seanpmorgan Apr 24, 2022
025670f
Debug
seanpmorgan Apr 24, 2022
7c231fe
Debug
seanpmorgan Apr 24, 2022
228e20e
Debug
seanpmorgan Apr 24, 2022
b54cd4f
Debug
seanpmorgan Apr 25, 2022
48b7fc1
Update auditwheel plat
seanpmorgan Apr 25, 2022
11be2a5
Remove outdated toolchain
seanpmorgan Apr 25, 2022
5a57e50
Remove outdated conditions
seanpmorgan Apr 25, 2022
1f2034a
Update docs
seanpmorgan Apr 25, 2022
2f2b473
debug
seanpmorgan Apr 25, 2022
887b691
debug
seanpmorgan Apr 25, 2022
ceeb44c
debug
seanpmorgan Apr 25, 2022
f377162
Add github issue to dockerfile
seanpmorgan Apr 25, 2022
d5683c5
Rename variable
seanpmorgan Apr 25, 2022
0790390
Better diff
seanpmorgan Apr 25, 2022
24565d1
Fix compat
seanpmorgan Apr 26, 2022
0020081
Upgrate to 2.9 final
bhack May 19, 2022
791c104
Adapt to rootless container
bhack May 19, 2022
5c63418
Merge branch 'master' into build-tf29
bhack May 19, 2022
48bc03f
Update configure.py
bhack May 19, 2022
ec5607b
Update configure.py
bhack May 19, 2022
2d7c04b
Update CONTRIBUTING.md
bhack May 19, 2022
e68b863
Update configure.py
bhack May 19, 2022
8f646dc
Upgrade to 2.7.2
bhack May 20, 2022
997bb70
Add 2.8.1
bhack May 20, 2022
96be309
Fix typo
bhack May 20, 2022
68978d4
Ovveride the cxx11 abi flag for old releases
bhack May 20, 2022
ff43c84
Update configure.py
bhack May 20, 2022
f468375
Update configure.py
bhack May 20, 2022
9bc429d
Update configure.py
bhack May 20, 2022
7711a11
Update configure.py
bhack May 20, 2022
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
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ jobs:
# https://github.com/bazelbuild/bazel/issues/14232#issuecomment-1011247429
os: ['macos-10.15', 'windows-2019', 'ubuntu-18.04']
py-version: ['3.7', '3.8', '3.9', '3.10']
tf-version: ['2.6.3', '2.8.0']
tf-version: ['2.7.1', '2.9.0rc0']
cpu: ['x86']
exclude:
- py-version: '3.10'
tf-version: '2.6.3'
tf-version: '2.7.1'
include:
- os: 'macos-11'
seanpmorgan marked this conversation as resolved.
Show resolved Hide resolved
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0rc0'
py-version: '3.8'
- os: 'macos-11'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0rc0'
py-version: '3.9'
fail-fast: false
steps:
Expand Down Expand Up @@ -99,16 +99,16 @@ jobs:
matrix:
os: ['macOS', 'Windows', 'Linux']
py-version: ['3.7', '3.8', '3.9', '3.10']
tf-version: ['2.8.0']
tf-version: ['2.9.0rc0']
cpu: ['x86']
include:
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0rc0'
py-version: '3.8'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0rc0'
py-version: '3.9'
fail-fast: false
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Just run from the root:

```bash
pip install tensorflow==2.8
# you can use "pip install tensorflow-cpu==2.8.0" too if you're not testing on gpu.
# you can use "pip install tensorflow-cpu==2.9.0rc0" too if you're not testing on gpu.
pip install -e ./
```

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ what it was tested against.
#### Python Op Compatibility Matrix
| TensorFlow Addons | TensorFlow | Python |
|:----------------------- |:---|:---------- |
| tfa-nightly | 2.6, 2.7, 2.8 | 3.7, 3.8, 3.9, 3.10 |
| tfa-nightly | 2.7, 2.8, 2.9 | 3.7, 3.8, 3.9, 3.10 |
| tensorflow-addons-0.16.1 | 2.7, 2.8, 2.9 |3.7, 3.8, 3.9, 3.10 |
| tensorflow-addons-0.16.1 | 2.6, 2.7, 2.8 |3.7, 3.8, 3.9, 3.10 |
| tensorflow-addons-0.15.0 | 2.5, 2.6, 2.7 |3.7, 3.8, 3.9 |
| tensorflow-addons-0.14.0 | 2.4, 2.5, 2.6 |3.6, 3.7, 3.8, 3.9 |
Expand Down
31 changes: 31 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,34 @@ tf_configure(
)

cuda_configure(name = "local_config_cuda")

http_archive(
name = "org_tensorflow",
sha256 = "7d736fa5ff3868516359d8370e7b57251b8080243fc38e8089ee0ceb8ee90264",
strip_prefix = "tensorflow-2.9.0-rc0",
bhack marked this conversation as resolved.
Show resolved Hide resolved
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.9.0-rc0.tar.gz",
],
)

load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")

tf_workspace3()

load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")

tf_workspace2()

load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1")

tf_workspace1()

load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0")

tf_workspace0()

load("//third_party/toolchains/tf:tf_configure.bzl", "tf_configure")

tf_configure(name = "local_config_tf")

load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
4 changes: 2 additions & 2 deletions tensorflow_addons/utils/resource_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import tensorflow as tf

INCLUSIVE_MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.8.0"
EXCLUSIVE_MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.9.0"
INCLUSIVE_MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.9.0rc0"
EXCLUSIVE_MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.10.0"
abi_warning_already_raised = False
SKIP_CUSTOM_OPS = False

Expand Down
4 changes: 3 additions & 1 deletion tensorflow_addons/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
from tensorflow_addons.utils import resource_loader

# TODO: copy the layer_test implementation in Addons.
if tf.__version__[:3] > "2.5":
if tf.__version__[:3] > "2.8":
from keras.testing_infra.test_utils import layer_test # noqa: F401
elif tf.__version__[:3] > "2.5":
seanpmorgan marked this conversation as resolved.
Show resolved Hide resolved
seanpmorgan marked this conversation as resolved.
Show resolved Hide resolved
from keras.testing_utils import layer_test # noqa: F401
else:
from tensorflow.python.keras.testing_utils import layer_test # noqa: F401
Expand Down
4 changes: 2 additions & 2 deletions tensorflow_addons/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"""Define TensorFlow Addons version information."""

# Required TensorFlow version [min, max)
INCLUSIVE_MIN_TF_VERSION = "2.6.0"
EXCLUSIVE_MAX_TF_VERSION = "2.9.0"
INCLUSIVE_MIN_TF_VERSION = "2.7.0"
EXCLUSIVE_MAX_TF_VERSION = "2.10.0"

# We follow Semantic Versioning (https://semver.org/)
_MAJOR_VERSION = "0"
Expand Down
2 changes: 1 addition & 1 deletion tools/build_dev_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -x -e

docker build \
-f tools/docker/dev_container.Dockerfile \
--build-arg TF_VERSION=2.8.0 \
--build-arg TF_VERSION=2.9.0rc0 \
--build-arg TF_PACKAGE=tensorflow \
--build-arg PY_VERSION=$PY_VERSION \
--no-cache \
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/cpu_tests.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#syntax=docker/dockerfile:1.1.5-experimental
FROM python:3.7 as build_wheel

ARG TF_VERSION=2.8.0
ARG TF_VERSION=2.9.0rc0
RUN pip install --default-timeout=1000 tensorflow-cpu==$TF_VERSION

RUN apt-get update && apt-get install -y sudo rsync
Expand Down
2 changes: 1 addition & 1 deletion tools/install_deps/tensorflow-cpu.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tensorflow-cpu~=2.8.0
tensorflow-cpu~=2.9.0rc0
2 changes: 1 addition & 1 deletion tools/install_deps/tensorflow.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tensorflow~=2.8.0
tensorflow~=2.9.0rc0
2 changes: 1 addition & 1 deletion tools/install_so_files.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -e -x

if [ "$TF_NEED_CUDA" == "1" ]; then
CUDA_FLAG="--crosstool_top=//build_deps/toolchains/gcc7_manylinux2010-nvcc-cuda11:toolchain"
CUDA_FLAG="--crosstool_top=@ubuntu20.04-gcc9_manylinux2014-cuda11.2-cudnn8.1-tensorrt7.2_config_cuda//crosstool:toolchain"
seanpmorgan marked this conversation as resolved.
Show resolved Hide resolved
fi

bazel build $CUDA_FLAG //tensorflow_addons/...
Expand Down
2 changes: 1 addition & 1 deletion tools/run_gpu_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export DOCKER_BUILDKIT=1
docker build \
-f tools/docker/build_wheel.Dockerfile \
--target tfa_gpu_tests \
--build-arg TF_VERSION=2.8.0 \
--build-arg TF_VERSION=2.9.0rc0 \
--build-arg PY_VERSION=3.7 \
-t tfa_gpu_tests ./
docker run --rm -t --gpus=all tfa_gpu_tests