Skip to content

Commit 2e772fd

Browse files
seanpmorganbhacklgeiger
authored
Build Against TF 2.10 (#2744)
* Build TF 2.10rc0 * Build with C++17 Co-authored-by: bhack <bhack@users.noreply.github.com> Co-authored-by: Lukas Geiger <lukas.geiger94@gmail.com>
1 parent 7a98c5f commit 2e772fd

23 files changed

+90
-60
lines changed

.github/workflows/make_wheel_Linux_x86.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ DOCKER_BUILDKIT=1 docker build \
1313
--build-arg TF_VERSION \
1414
--build-arg NIGHTLY_FLAG \
1515
--build-arg NIGHTLY_TIME \
16+
--build-arg SKIP_CUSTOM_OP_TESTS \
1617
./

.github/workflows/make_wheel_Windows_x86.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python --version
99
python -m pip install --default-timeout=1000 wheel setuptools tensorflow==$TF_VERSION
1010

1111
# Test
12-
bash ./tools/testing/build_and_run_tests.sh
12+
bash ./tools/testing/build_and_run_tests.sh $SKIP_CUSTOM_OP_TESTS
1313

1414
# Clean
1515
bazel clean

.github/workflows/make_wheel_macOS_arm64.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(python -c 'import configure; print
1212
# For dynamic linking, we want the ARM version of TensorFlow.
1313
# Since we cannot run it on x86 so we need to force pip to install it regardless
1414
python -m pip install \
15-
--platform=macosx_11_0_arm64 \
15+
--platform=macosx_12_0_arm64 \
1616
--no-deps \
1717
--target=$(python -c 'import site; print(site.getsitepackages()[0])') \
1818
--upgrade \
1919
tensorflow-macos==$TF_VERSION
2020

2121
bazel build \
2222
--cpu=darwin_arm64 \
23-
--copt -mmacosx-version-min=11.0 \
24-
--linkopt -mmacosx-version-min=11.0 \
23+
--copt -mmacosx-version-min=12.0 \
24+
--linkopt -mmacosx-version-min=12.0 \
2525
--noshow_progress \
2626
--noshow_loading_progress \
2727
--verbose_failures \

.github/workflows/make_wheel_macOS_x86.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ python --version
77
python -m pip install --default-timeout=1000 delocate==0.10.2 wheel setuptools tensorflow==$TF_VERSION
88

99
# Test
10-
bash ./tools/testing/build_and_run_tests.sh
10+
bash ./tools/testing/build_and_run_tests.sh $SKIP_CUSTOM_OP_TESTS
1111

1212
# Clean
1313
bazel clean
@@ -16,8 +16,8 @@ bazel clean
1616
python configure.py
1717

1818
bazel build \
19-
--copt -mmacosx-version-min=10.13 \
20-
--linkopt -mmacosx-version-min=10.13 \
19+
--copt=-mmacosx-version-min=10.14 \
20+
--linkopt=-mmacosx-version-min=10.14 \
2121
--noshow_progress \
2222
--noshow_loading_progress \
2323
--verbose_failures \

.github/workflows/release.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,22 @@ jobs:
4040
matrix:
4141
# To switch on windows-2022/latest, please verify the bazel version:
4242
# https://github.com/bazelbuild/bazel/issues/14232#issuecomment-1011247429
43-
os: ['macos-10.15', 'windows-2019', 'ubuntu-18.04']
43+
os: ['macos-12', 'windows-2019', 'ubuntu-18.04']
4444
py-version: ['3.7', '3.8', '3.9', '3.10']
45-
tf-version: ['2.7.3', '2.8.2', '2.9.1']
45+
tf-version: ['2.8.2', '2.9.1', '2.10.0']
4646
cpu: ['x86']
47-
exclude:
48-
- py-version: '3.10'
49-
tf-version: '2.7.3'
5047
include:
51-
- os: 'macos-11'
48+
- os: 'macos-12'
5249
cpu: 'arm64'
53-
tf-version: '2.9.1'
50+
tf-version: '2.10.0'
5451
py-version: '3.8'
55-
- os: 'macos-11'
52+
- os: 'macos-12'
5653
cpu: 'arm64'
57-
tf-version: '2.9.1'
54+
tf-version: '2.10.0'
5855
py-version: '3.9'
59-
- os: 'macos-11'
56+
- os: 'macos-12'
6057
cpu: 'arm64'
61-
tf-version: '2.9.1'
58+
tf-version: '2.10.0'
6259
py-version: '3.10'
6360
fail-fast: false
6461
steps:
@@ -69,6 +66,9 @@ jobs:
6966
script: |
7067
const commit_details = await github.git.getCommit({owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha});
7168
return commit_details.data.author.date
69+
- if: matrix.tf-version != '2.10.0'
70+
shell: bash
71+
run: echo "SKIP_CUSTOM_OP_TESTS=--skip-custom-ops" >> $GITHUB_ENV
7272
- if: github.event_name == 'push'
7373
shell: bash
7474
run: echo "NIGHTLY_FLAG=--nightly" >> $GITHUB_ENV
@@ -101,20 +101,20 @@ jobs:
101101
matrix:
102102
os: ['macOS', 'Windows', 'Linux']
103103
py-version: ['3.7', '3.8', '3.9', '3.10']
104-
tf-version: ['2.9.1']
104+
tf-version: ['2.10.0']
105105
cpu: ['x86']
106106
include:
107107
- os: 'macOS'
108108
cpu: 'arm64'
109-
tf-version: '2.9.1'
109+
tf-version: '2.10.0'
110110
py-version: '3.8'
111111
- os: 'macOS'
112112
cpu: 'arm64'
113-
tf-version: '2.9.1'
113+
tf-version: '2.10.0'
114114
py-version: '3.9'
115115
- os: 'macOS'
116116
cpu: 'arm64'
117-
tf-version: '2.9.1'
117+
tf-version: '2.10.0'
118118
py-version: '3.10'
119119
fail-fast: false
120120
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.9.1" too if you're not testing on gpu.
177+
# you can use "pip install tensorflow-cpu==2.10.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.9 -e ./ -r tools/install_deps/pytest.txt
265+
pip install tensorflow==2.10.0 -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.9
293+
python3 -m pip install tensorflow==2.10.0
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.9
332+
python3 -m pip install tensorflow==2.10.0
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,3 +323,4 @@ improve the guide!).
323323

324324
## License
325325
[Apache License 2.0](LICENSE)
326+

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ cuda_configure(name = "local_config_cuda")
2121

2222
http_archive(
2323
name = "org_tensorflow",
24-
sha256 = "8087cb0c529f04a4bfe480e49925cd64a904ad16d8ec66b98e2aacdfd53c80ff",
25-
strip_prefix = "tensorflow-2.9.0",
24+
sha256 = "b5a1bb04c84b6fe1538377e5a1f649bb5d5f0b2e3625a3c526ff3a8af88633e8",
25+
strip_prefix = "tensorflow-2.10.0",
2626
urls = [
27-
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.9.0.tar.gz",
27+
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.10.0.tar.gz",
2828
],
2929
)
3030

build_deps/build_pip_pkg.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ function main() {
7878
BUILD_CMD="setup.py bdist_wheel --platlib-patch"
7979
if is_macos; then
8080
if [[ x"$(arch)" == x"arm64" ]]; then
81-
BUILD_CMD="${BUILD_CMD} --plat-name macosx_11_0_arm64"
81+
BUILD_CMD="${BUILD_CMD} --plat-name macosx_12_0_arm64"
8282
else
83-
BUILD_CMD="${BUILD_CMD} --plat-name macosx_10_15_x86_64"
83+
BUILD_CMD="${BUILD_CMD} --plat-name macosx_10_14_x86_64"
8484
fi
8585
PYTHON=python3
8686
else
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Addons Build Definitions inherited from TensorFlow Core
22

33
D_GLIBCXX_USE_CXX11_ABI = "%{tf_cx11_abi}"
4+
CPLUSPLUS_VERSION = "%{tf_cplusplus_ver}"

0 commit comments

Comments
 (0)