Skip to content

Commit

Permalink
Merge branch 'master' into fix-optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
chenmoneygithub authored May 23, 2022
2 parents 0bfa0d0 + d126b46 commit d1448ae
Show file tree
Hide file tree
Showing 21 changed files with 74 additions and 1,957 deletions.
32 changes: 0 additions & 32 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,2 @@
ARG IMAGE_TYPE=latest-cpu
FROM tfaddons/dev_container:$IMAGE_TYPE

ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Options for common package install script - SHA updated on release
ARG INSTALL_ZSH="false"
ARG UPGRADE_PACKAGES="false"
ARG COMMON_SCRIPT_SOURCE="https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
ARG COMMON_SCRIPT_SHA="dev-mode"

# Configure apt and install packages
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
#
# Verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
&& apt-get -y install --no-install-recommends curl ca-certificates 2>&1 \
&& curl -sSL ${COMMON_SCRIPT_SOURCE} -o /tmp/common-setup.sh \
&& ([ "${COMMON_SCRIPT_SHA}" = "dev-mode" ] || (echo "${COMMON_SCRIPT_SHA} */tmp/common-setup.sh" | sha256sum -c -)) \
&& /bin/bash /tmp/common-setup.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
&& rm /tmp/common-setup.sh \
#
# *********************************************************************
# * Uncomment this section to use RUN to install other dependencies. *
# * See https://aka.ms/vscode-remote/containers/dockerfile-run *
# *********************************************************************
# && apt-get -y install --no-install-recommends <your-package-list-here>
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
"seccomp=unconfined" ],

// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/pytest ./tensorflow_addons/layerscontainers/non-root.
"remoteUser": "vscode"
//"remoteUser": "vscode"
}
1 change: 1 addition & 0 deletions .github/workflows/make_wheel_Windows_x86.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set -e -x

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

# Install Deps
Expand Down
20 changes: 9 additions & 11 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.2', '2.8.1', '2.9.0']
cpu: ['x86']
exclude:
- py-version: '3.10'
tf-version: '2.6.3'
tf-version: '2.7.2'
include:
- os: 'macos-11'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0'
py-version: '3.8'
- os: 'macos-11'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0'
py-version: '3.9'
fail-fast: false
steps:
Expand All @@ -76,8 +76,7 @@ jobs:
name: Setup Bazel
# Ubuntu bazel is run inside of the docker image
run: bash tools/install_deps/install_bazelisk.sh ./
- if: matrix.py-version != '3.9' || matrix.tf-version != '2.4.2'
name: Build wheels
- name: Build wheels
env:
OS: ${{ runner.os }}
PY_VERSION: ${{ matrix.py-version }}
Expand All @@ -86,8 +85,7 @@ jobs:
CPU: ${{ matrix.cpu }}
shell: bash
run: bash .github/workflows/make_wheel_${OS}_${CPU}.sh
- if: matrix.py-version != '3.9' || matrix.tf-version != '2.4.2'
uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v1
with:
name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ matrix.cpu }}-wheel
path: wheelhouse
Expand All @@ -99,16 +97,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.0']
cpu: ['x86']
include:
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0'
py-version: '3.8'
- os: 'macOS'
cpu: 'arm64'
tf-version: '2.8.0'
tf-version: '2.9.0'
py-version: '3.9'
fail-fast: false
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release'
Expand Down
8 changes: 4 additions & 4 deletions 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.0" 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.8 -e ./ -r tools/install_deps/pytest.txt
pip install tensorflow==2.9 -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.8
python3 -m pip install tensorflow==2.9
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.8
python3 -m pip install tensorflow==2.9
python3 configure.py
python3 -m pip install -r tools/install_deps/pytest.txt
bazel test -c opt -k \
Expand Down
6 changes: 4 additions & 2 deletions 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.17.0 | 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 Expand Up @@ -111,7 +112,8 @@ is compiled differently. A typical example of this would be `conda`-installed Te
#### C++ Custom Op Compatibility Matrix
| TensorFlow Addons | TensorFlow | Compiler | cuDNN | CUDA |
|:----------------------- |:---- |:---------|:---------|:---------|
| tfa-nightly | 2.8 | GCC 7.3.1 | 8.1 | 11.2 |
| tfa-nightly | 2.9 | GCC 7.3.1 | 8.1 | 11.2 |
| tensorflow-addons-0.17.0 | 2.9 | GCC 7.3.1 | 8.1 | 11.2 |
| tensorflow-addons-0.16.1 | 2.8 | GCC 7.3.1 | 8.1 | 11.2 |
| tensorflow-addons-0.15.0 | 2.7 | GCC 7.3.1 | 8.1 | 11.2 |
| tensorflow-addons-0.14.0 | 2.6 | GCC 7.3.1 | 8.1 | 11.2 |
Expand Down
25 changes: 25 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,28 @@ tf_configure(
)

cuda_configure(name = "local_config_cuda")

http_archive(
name = "org_tensorflow",
sha256 = "8087cb0c529f04a4bfe480e49925cd64a904ad16d8ec66b98e2aacdfd53c80ff",
strip_prefix = "tensorflow-2.9.0",
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.9.0.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()
118 changes: 0 additions & 118 deletions build_deps/toolchains/gcc7_manylinux2010-nvcc-cuda11/BUILD

This file was deleted.

Loading

0 comments on commit d1448ae

Please sign in to comment.