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

[WIP] Build tf216 (Keras3) #2870

Open
wants to merge 2 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
32 changes: 20 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions:

env:
MIN_PY_VERSION: '3.9'
MAX_PY_VERSION: '3.11'
MAX_PY_VERSION: '3.12'

jobs:
test-with-bazel:
Expand All @@ -46,22 +46,26 @@ jobs:
os: ['macos-12', 'ubuntu-20.04']
# Removing windows builds due to broken upstream package https://github.com/tensorflow/tensorflow/issues/61830
# os: ['macos-12', 'windows-2019', 'ubuntu-20.04']
py-version: ['3.9', '3.10', '3.11']
tf-version: ['2.13.1', '2.14.0', '2.15.0']
py-version: ['3.9', '3.10', '3.11', '3.12']
tf-version: ['2.14.1', '2.15.1', '2.16.1']
cpu: ['x86']
include:
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.15.0'
tf-version: '2.16.1'
py-version: '3.9'
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.15.0'
tf-version: '2.16.1'
py-version: '3.10'
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.15.0'
tf-version: '2.16.1'
py-version: '3.11'
- os: 'macos-12'
cpu: 'arm64'
tf-version: '2.16.1'
py-version: '3.12'
fail-fast: false
steps:
- uses: actions/github-script@0.3.0
Expand All @@ -71,7 +75,7 @@ jobs:
script: |
const commit_details = await github.git.getCommit({owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha});
return commit_details.data.author.date
- if: matrix.tf-version != '2.15.0'
- if: matrix.tf-version != '2.16.1'
shell: bash
run: echo "SKIP_CUSTOM_OP_TESTS=--skip-custom-ops" >> $GITHUB_ENV
- if: github.event_name == 'push'
Expand Down Expand Up @@ -107,22 +111,26 @@ jobs:
os: ['macOS', 'Linux']
# Removing windows builds due to broken upstream package https://github.com/tensorflow/tensorflow/issues/61830
# os: ['macOS', 'Windows', 'Linux']
py-version: ['3.9', '3.10', '3.11']
tf-version: ['2.15.0']
py-version: ['3.9', '3.10', '3.11', '3.12']
tf-version: ['2.16.1']
cpu: ['x86']
include:
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.15.0'
tf-version: '2.16.1'
py-version: '3.9'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.15.0'
tf-version: '2.16.1'
py-version: '3.10'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.15.0'
tf-version: '2.16.1'
py-version: '3.11'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.16.1'
py-version: '3.12'
fail-fast: false
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release'
steps:
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ conda activate my_dev_environement
Just run from the root:

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

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

```bash
python configure.py
pip install tensorflow==2.15.0 -e ./ -r tools/install_deps/pytest.txt
pip install tensorflow==2.16.1 -e ./ -r tools/install_deps/pytest.txt
bash tools/install_so_files.sh # Linux/macos/WSL2
sh tools/install_so_files.sh # PowerShell
```
Expand Down Expand Up @@ -290,7 +290,7 @@ docker run --gpus all --rm -it -v ${PWD}:/addons -w /addons gcr.io/tensorflow-te

Configure:
```bash
python3 -m pip install tensorflow==2.15.0
python3 -m pip install tensorflow==2.16.1
python3 ./configure.py # Links project with TensorFlow dependency
```

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

```bash
python3 -m pip install tensorflow==2.15.0
python3 -m pip install tensorflow==2.16.1
python3 configure.py
python3 -m pip install -r tools/install_deps/pytest.txt
bazel test -c opt -k \
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ http_archive(
patches = [
"//build_deps/tf_dependency:tf.patch",
],
sha256 = "9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220",
strip_prefix = "tensorflow-2.15.0",
sha256 = "c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d",
strip_prefix = "tensorflow-2.16.1",
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.tar.gz",
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.tar.gz",
],
)

Expand Down
28 changes: 14 additions & 14 deletions build_deps/tf_dependency/tf.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
diff --git tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl
index a2bdd6a7eed..ec25c23d8d4 100644
index 9261a652f9c..0557e345ab1 100644
--- tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl
+++ tensorflow/tools/toolchains/cpus/aarch64/aarch64_compiler_configure.bzl
@@ -2,7 +2,7 @@

load("//tensorflow/tools/toolchains:cpus/aarch64/aarch64.bzl", "remote_aarch64_configure")
load("//third_party/remote_config:remote_platform_configure.bzl", "remote_platform_configure")
-load("//third_party/py:python_configure.bzl", "remote_python_configure")
+load("//third_party/py/non_hermetic:python_configure.bzl", "remote_python_configure")

def ml2014_tf_aarch64_configs(name_container_map, env):
for name, container in name_container_map.items():
diff --git tensorflow/tools/toolchains/remote_config/rbe_config.bzl tensorflow/tools/toolchains/remote_config/rbe_config.bzl
Expand All @@ -17,36 +17,36 @@ index 9f71a414bf7..57f70752323 100644
+++ tensorflow/tools/toolchains/remote_config/rbe_config.bzl
@@ -1,6 +1,6 @@
"""Macro that creates external repositories for remote config."""

-load("//third_party/py:python_configure.bzl", "local_python_configure", "remote_python_configure")
+load("//third_party/py/non_hermetic:python_configure.bzl", "local_python_configure", "remote_python_configure")
load("//third_party/gpus:cuda_configure.bzl", "remote_cuda_configure")
load("//third_party/nccl:nccl_configure.bzl", "remote_nccl_configure")
load("//third_party/gpus:rocm_configure.bzl", "remote_rocm_configure")
diff --git tensorflow/workspace2.bzl tensorflow/workspace2.bzl
index 7e9faa558a4..5b18cb0969a 100644
index 9e15c75c183..facc1de3d73 100644
--- tensorflow/workspace2.bzl
+++ tensorflow/workspace2.bzl
@@ -8,7 +8,7 @@ load("//third_party/gpus:rocm_configure.bzl", "rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
@@ -37,7 +37,7 @@ load("//third_party/nasm:workspace.bzl", nasm = "repo")
load("//third_party/nccl:nccl_configure.bzl", "nccl_configure")
load("//third_party/git:git_configure.bzl", "git_configure")
load("//third_party/opencl_headers:workspace.bzl", opencl_headers = "repo")
load("//third_party/pasta:workspace.bzl", pasta = "repo")
-load("//third_party/py:python_configure.bzl", "python_configure")
+load("//third_party/py/non_hermetic:python_configure.bzl", "python_configure")
load("//third_party/systemlibs:syslibs_configure.bzl", "syslibs_configure")
load("//tensorflow/tools/toolchains:cpus/aarch64/aarch64_compiler_configure.bzl", "aarch64_compiler_configure")
load("//tensorflow/tools/toolchains:cpus/arm/arm_compiler_configure.bzl", "arm_compiler_configure")
load("//third_party/py/ml_dtypes:workspace.bzl", ml_dtypes = "repo")
load("//third_party/pybind11_abseil:workspace.bzl", pybind11_abseil = "repo")
load("//third_party/pybind11_bazel:workspace.bzl", pybind11_bazel = "repo")
diff --git third_party/py/non_hermetic/python_configure.bzl third_party/py/non_hermetic/python_configure.bzl
index 300cbfb6c71..09d98505dd9 100644
index 89732c3e33d..4ac1c8f5c04 100644
--- third_party/py/non_hermetic/python_configure.bzl
+++ third_party/py/non_hermetic/python_configure.bzl
@@ -206,7 +206,7 @@ def _create_local_python_repository(repository_ctx):
@@ -203,7 +203,7 @@ def _create_local_python_repository(repository_ctx):
# Resolve all labels before doing any real work. Resolving causes the
# function to be restarted with all previous state being lost. This
# can easily lead to a O(n^2) runtime in the number of labels.
- build_tpl = repository_ctx.path(Label("//third_party/py:BUILD.tpl"))
+ build_tpl = repository_ctx.path(Label("//third_party/py/non_hermetic:BUILD.tpl"))

python_bin = get_python_bin(repository_ctx)
_check_python_bin(repository_ctx, python_bin)
diff --git third_party/py/numpy/BUILD third_party/py/numpy/BUILD
Expand Down
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.15.0"
EXCLUSIVE_MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.16.0"
INCLUSIVE_MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.16.0"
EXCLUSIVE_MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.17.0"
abi_warning_already_raised = False
SKIP_CUSTOM_OPS = False

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.13.0"
EXCLUSIVE_MAX_TF_VERSION = "2.16.0"
INCLUSIVE_MIN_TF_VERSION = "2.14.0"
EXCLUSIVE_MAX_TF_VERSION = "2.17.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.15.0 \
--build-arg TF_VERSION=2.16.1 \
--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.9 as build_wheel

ARG TF_VERSION=2.15.0
ARG TF_VERSION=2.16.1
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.15.0
tensorflow-cpu~=2.16.1
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.15.0
tensorflow~=2.16.1
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.15.0 \
--build-arg TF_VERSION=2.16.1 \
--build-arg PY_VERSION=3.9 \
-t tfa_gpu_tests ./
docker run --rm -t --gpus=all --shm-size=512m tfa_gpu_tests
Loading