Skip to content

Pick in XNNPACK #2

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

Draft
wants to merge 216 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
1ce5658
Merge pull request #34160 from Intel-tensorflow/eager_test_compilatio…
alextp Nov 11, 2019
f785554
Re-add the supported CUDA compute capabilities into the toolchain cre…
Nov 9, 2019
236128a
Add a missing line for compute in toolchain.
Nov 9, 2019
d29ff10
Export Keras preprocessing layers in tf.keras.layers.experimental.
tensorflower-gardener Nov 9, 2019
f8759b6
run Model.*_on_batch using tf.function where appropriate.
Nov 9, 2019
b22b9c9
Fix flaky doctest.
aaudiber Nov 8, 2019
f455bcf
Merge pull request #34170 from geetachavan1/cherrypicks_6VUBZ
goldiegadde Nov 12, 2019
0ccee2f
Merge pull request #34172 from geetachavan1/cherrypicks_5KWST
goldiegadde Nov 12, 2019
89487ef
Merge pull request #34173 from geetachavan1/cherrypicks_TK4O4
goldiegadde Nov 12, 2019
e8c1190
Fix bug in output ordering from interleave with num_parallel_calls !=…
aaudiber Nov 12, 2019
9411012
Merge pull request #34175 from geetachavan1/cherrypicks_ZLL35
goldiegadde Nov 12, 2019
1a0c306
Merge pull request #34180 from aaudiber/cherrypicks_7EUZ3
goldiegadde Nov 12, 2019
5b2a796
Add XLA context to the function cache key
rxsang Nov 12, 2019
b5d0f01
Merge pull request #34208 from tensorflow/rxsang-patch-1
alextp Nov 12, 2019
7ead42a
[tf.data] Improving detection of infinitely repeated datasets in the …
jsimsa Nov 13, 2019
664193e
Ruy: Optimize (partial) of x86 AVX-512 8-bit pack.
jalexstark Nov 13, 2019
1c52525
Ruy: Further optimization (partial) of x86 AVX2 8-bit pack.
jalexstark Nov 13, 2019
3f150ee
Insert release notes place-fill
tensorflow-jenkins Nov 13, 2019
0738369
Update version numbers to 2.1.0-rc0
tensorflow-jenkins Nov 13, 2019
0bd44b7
Label libs with alwayslink
karimnosseir Nov 8, 2019
422496e
Add more `alwayslink=1` to cc_library as a follow up on flipping the …
tensorflower-gardener Nov 11, 2019
512ccef
Merge pull request #34252 from karimnosseir/cherrypicks_R63JV
karimnosseir Nov 14, 2019
f333bd6
[tf.data] Improving detection of infinitely repeated datasets in the …
jsimsa Nov 13, 2019
a594b6b
[tf.data] Improvements to cancellation logic.
jsimsa Nov 14, 2019
8959ed1
Merge pull request #34241 from jsimsa/cherrypicks_H0PP4
goldiegadde Nov 14, 2019
4ba2df6
Merge branch 'r2.1' into cherrypicks_P96RK
jsimsa Nov 14, 2019
eb18ad3
Support LogicalDevice in MirroredStrategy config
jaingaurav Nov 13, 2019
bc75348
Update BUILD
geetachavan1 Nov 14, 2019
e16b7cc
OwnedIterators and MultiDeviceIterators get created using their compo…
rohan100jain Nov 12, 2019
a5c0ac6
Update BUILD
geetachavan1 Nov 15, 2019
30f6ae2
Update BUILD
geetachavan1 Nov 15, 2019
9477d81
Update BUILD
geetachavan1 Nov 15, 2019
25fff85
Update BUILD
geetachavan1 Nov 15, 2019
be87e45
Update BUILD
geetachavan1 Nov 15, 2019
e02eb83
Update BUILD
geetachavan1 Nov 15, 2019
e7e8e54
Update BUILD
geetachavan1 Nov 15, 2019
b6c155f
Update BUILD
geetachavan1 Nov 15, 2019
a62523d
Update BUILD
geetachavan1 Nov 15, 2019
6b9633b
Merge pull request #34294 from tensorflow/geetachavan1-patch-1
goldiegadde Nov 15, 2019
2e6e12b
Merge pull request #34279 from jsimsa/cherrypicks_P96RK
goldiegadde Nov 15, 2019
f7418ce
Merge pull request #34281 from jaingaurav/cherry-list
goldiegadde Nov 15, 2019
1aa547f
Merge pull request #34292 from jsimsa/cherrypicks_7CINS
goldiegadde Nov 15, 2019
f9929b2
Merge pull request #34245 from jdduke/cherrypicks_Z2ETP
goldiegadde Nov 15, 2019
6df657f
Merge pull request #34249 from tensorflow-jenkins/version-numbers-2.1…
goldiegadde Nov 15, 2019
da0b330
Fix the performance regression for model.predict for non-tpu strategy.
qlzh727 Nov 15, 2019
ecd62bf
Update the TF CUDA version to 10.1
tensorflower-gardener Nov 13, 2019
7e732a8
Merge pull request #34325 from qlzh727/cherrypicks_3OKXF
goldiegadde Nov 15, 2019
97332bb
Merge pull request #34327 from geetachavan1/cherrypicks_5W7XS
goldiegadde Nov 16, 2019
17c2ea1
Updating/setting xcode version to 10.3
geetachavan1 Nov 16, 2019
2a7f449
Merge pull request #34359 from tensorflow/ggadde-2-1-cp1
goldiegadde Nov 17, 2019
eb7b125
Fix for runtime error of ROCm build
sunway513 Nov 12, 2019
3bfa70b
Reduced tolerance of ExponentialOpTest.
tensorflower-gardener Nov 18, 2019
bf54ee5
Remove the assert on no new tensors.
tensorflower-gardener Nov 19, 2019
528c405
Merge pull request #34403 from tensorflow/ggadde-2-1-cp2
goldiegadde Nov 19, 2019
cd6be9f
Switch to NDK API level 21
jdduke Nov 16, 2019
ab9f302
Support /d2ReducedOptimizeHugeFunctions on Windows when TF_VC_VERSION…
angerson Nov 20, 2019
fd50373
Merge pull request #34394 from ROCmSoftwarePlatform/google_upstream_r…
goldiegadde Nov 20, 2019
dbd07b9
Merge pull request #34419 from jdduke/cherrypicks_34LDH
goldiegadde Nov 20, 2019
22b782a
Merge pull request #34465 from geetachavan1/cherrypicks_N5TDA
goldiegadde Nov 20, 2019
bc17766
Allow building two pip cpu packages on macos.
yifeif Nov 21, 2019
2d39825
Fix nested function inside XLA context.
rxsang Nov 21, 2019
46d2419
Change default CUDA version on Windows to 10.1.
hyeygit Nov 9, 2019
711c179
[tf.data] Fix OOM when tf.data map_and_batch is used with num_paralle…
Nov 21, 2019
71c2647
Merge pull request #34493 from tensorflow/rxsang-patch-3
goldiegadde Nov 21, 2019
51c88a6
Merge pull request #34472 from yifeif/cherrypicks_09NWZ
goldiegadde Nov 21, 2019
3be306c
Make docker has the same bazel version as the env that invokes it.
yifeif Nov 21, 2019
4f734a3
Merge pull request #34497 from yifeif/cherrypicks_D33SX
yifeif Nov 21, 2019
4810713
Merge pull request #34495 from rachellim/cherrypicks_I5UCH
goldiegadde Nov 21, 2019
b65cacd
Merge pull request #34494 from geetachavan1/cherrypicks_2F72J
goldiegadde Nov 21, 2019
97fbcf8
Do not use common script to install bazel the paths in docker image a…
yifeif Nov 21, 2019
73501b7
add missing "echo".
yifeif Nov 21, 2019
d2103eb
Merge pull request #34505 from yifeif/cherrypicks_0INWN
yifeif Nov 22, 2019
98e4379
[tf.data] Fix deadlock with Prefetch+ParallelMap
Nov 21, 2019
fbbf05d
Allow evaluator not in cluster_spec, to be consistent with legacy Est…
Nov 21, 2019
698e916
Merge pull request #34506 from rachellim/cherrypicks_WKNER
goldiegadde Nov 22, 2019
1a4c572
Merge pull request #34516 from yuefengz/cherrypicks_88YC0
goldiegadde Nov 22, 2019
3a72369
Override EIGEN strong inline for release builds as well.
tensorflower-gardener Nov 22, 2019
a824938
Update RELEASE.md
geetachavan1 Nov 25, 2019
710eaa7
Update RELEASE.md
martinwicke Nov 25, 2019
fee475d
Update RELEASE.md
martinwicke Nov 25, 2019
617f788
Allows Keras TensorLikeDataAdapter to handle pandas series and datafr…
tensorflower-gardener Nov 23, 2019
058f148
Update windows release build script to create the correct pip package…
yifeif Nov 25, 2019
1d03f44
Merge pull request #34596 from yifeif/cherrypicks_UUJ02
yifeif Nov 25, 2019
451387d
Merge pull request #34593 from tomerk/cherrypicks_M3RH3
goldiegadde Nov 25, 2019
60afa4e
Merge pull request #34246 from tensorflow-jenkins/relnotes-2.1.0rc0-2…
goldiegadde Nov 25, 2019
ae30c1b
Fix bug in if -v check.
yifeif Nov 26, 2019
5c43a0a
Merge pull request #34623 from yifeif/cherrypicks_ZT8OO
yifeif Nov 26, 2019
fff3b08
Move gpu script update to the correct file.
yifeif Nov 26, 2019
c6daad3
Merge pull request #34626 from yifeif/cherrypicks_J8PS0
yifeif Nov 26, 2019
b648e45
Fixing a bug in Elu
mahmoud-abuzaina Nov 27, 2019
4f165ab
Update op version map for tf 2.1 RC0.
haozha111 Nov 27, 2019
971a188
Set --incompatible_remove_legacy_whole_archive to False
tensorflower-gardener Nov 27, 2019
ddef31b
Fix TensorFlow pip API generation
lgeiger Nov 27, 2019
33340d1
Fix create_python_api_test.py
lgeiger Nov 27, 2019
03b0dcb
Merge pull request #34662 from haozha111/cherrypicks_HO5XP
goldiegadde Dec 4, 2019
dbf773d
Fix for https://github.com/tensorflow/tensorflow/issues/34117
bmzhao Nov 19, 2019
8da6f37
Merge pull request #34822 from lgeiger/r2.1-cherry-pick-pip-package-gen
goldiegadde Dec 5, 2019
eddb99a
Merge pull request #34764 from tensorflow/r2.1-cherry-pick-bazel-flags
goldiegadde Dec 5, 2019
c2adbb4
Merge pull request #34654 from Intel-tensorflow/elu-bug-fix-cherry-pick
goldiegadde Dec 5, 2019
9358b96
Add a redirection point to core/platform for build_config.bzl
nairb774 Nov 25, 2019
f395745
Merge pull request #34842 from tensorflow/cp-bazel-fix-2-on-r2.1
goldiegadde Dec 5, 2019
b8cf717
Add info about TF_DETERMINISTIC_OPS to version 2.1 release notes
duncanriach Dec 6, 2019
322e55b
Add Estimator release notes.
mihaimaruseac Dec 6, 2019
7d07b18
Merge pull request #34910 from tensorflow/estiamtor-release-notes
goldiegadde Dec 6, 2019
4717e12
Merge pull request #34883 from minglotus-6/cherrypicks_00RNR
goldiegadde Dec 6, 2019
f2833a7
Enhance description of TF_DETERMINISTIC_OPS in version 2.1 release no…
duncanriach Dec 6, 2019
544e1a1
Fix a small typo in version 2.1 release notes.
duncanriach Dec 6, 2019
ac061f0
Update version numbers to 2.1.0-rc1
tensorflow-jenkins Dec 6, 2019
6aa1762
Fix floating point golden test for sigmoid.
alextp Dec 3, 2019
c669ae5
Update Eigen to https://gitlab.com/libeigen/eigen/commit/4e696901f873…
tensorflower-gardener Dec 6, 2019
f6bd34f
Group variable initialization when calling lift_to_graph.
kenfranko Dec 6, 2019
98b1957
Override EIGEN strong inline for release builds as well.
tensorflower-gardener Dec 6, 2019
063a259
Merge pull request #34915 from tensorflow/ggadde-2-1-cp4
goldiegadde Dec 7, 2019
abe01e1
Merge pull request #34918 from geetachavan1/cherrypicks_50TU4
goldiegadde Dec 7, 2019
eb3c85e
Merge pull request #34917 from kenfranko/cherrypicks_89KN7
goldiegadde Dec 7, 2019
9b8b4c7
Update setup.py
goldiegadde Dec 7, 2019
8bdf0b9
Update setup.py
goldiegadde Dec 7, 2019
b2474d9
Merge pull request #34914 from tensorflow-jenkins/version-numbers-2.1…
goldiegadde Dec 9, 2019
9c689cb
Add release note about CUDA 10.1 and cuDNN 7.6
chsigg Dec 9, 2019
99d7cf3
Fix the estimator version.
goldiegadde Dec 9, 2019
2e01ee1
Update RELEASE.md
goldiegadde Dec 9, 2019
d38f24f
Merge pull request #34969 from tensorflow/ggadde-2-1-cp5
mihaimaruseac Dec 9, 2019
34fbff6
Update keras standardization code to error out when a namedtuple is e…
Dec 6, 2019
7fe8e2d
Correct number of output shapes written by SavedModel.
k-w-w Dec 7, 2019
b2b4c90
Merge pull request #34959 from tensorflow/chsigg-patch-1
goldiegadde Dec 9, 2019
ae387b0
Throw an explicit error if calling TPUStrategy in eager mode
rxsang Dec 9, 2019
52085a9
Merge pull request #34970 from geetachavan1/cherrypicks_42XLS
goldiegadde Dec 9, 2019
9261700
Support DistributionStrategy in LossScaleGradientTape, take 2.
reedwm Dec 6, 2019
c97e92c
Merge pull request #34971 from tensorflow/rxsang-patch-4
goldiegadde Dec 9, 2019
efdf6e5
Merge pull request #34974 from reedwm/cherrypicks_lsgt
mihaimaruseac Dec 9, 2019
7c9216d
Merge pull request #34887 from duncanriach/add-tf-deterministic-ops-t…
goldiegadde Dec 9, 2019
2b5075c
Merge 9422eb1139b3163cf65950c6e713f39344ec33e4 into the 2.1 release b…
Dec 10, 2019
6068013
include fix for test breakages by replacing functools.partial with a …
Dec 10, 2019
ca587c0
Merge pull request #34979 from robieta/cherrypicks_Q614H
goldiegadde Dec 10, 2019
01464cf
Expose ndtri and erfinv under tf.math.ndtri and tf.math.erfinv.
srvasude Nov 21, 2019
659d041
Fix small issues in the version 2.1 release note
duncanriach Dec 10, 2019
064e153
Merge pull request #35005 from geetachavan1/cherrypicks_3SVHU
goldiegadde Dec 10, 2019
6bb0194
Small enhancement to text in version 2.1 release notes
duncanriach Dec 10, 2019
688c9d1
Unexpose LossScaleGradientTape.
reedwm Dec 11, 2019
7b7db9e
Unify V1/2 layer naming in internal imports.
fchollet Dec 12, 2019
4d0c7e4
Update release notes.
fchollet Dec 12, 2019
2be6720
Add msvcp140_1.dll to list of import-time-check Windows DLLs
angerson Dec 13, 2019
43d3996
Document new Windows DLL requirements
angerson Dec 16, 2019
79d993e
Clarify installation messages
angerson Dec 16, 2019
1696086
Return to long lines
angerson Dec 16, 2019
846714e
Pass experimental_relax_shapes to instance methods...
foxik Dec 11, 2019
4f49610
Revert "[r2.1 cherry-pick] Fix pip package API generation"
mihaimaruseac Dec 18, 2019
5d28926
Pass experimental_relax_shapes to instance methods...
foxik Dec 11, 2019
c97b220
Relax shapes for Keras _on_batch functions.
foxik Dec 11, 2019
c49396c
Merge pull request #35234 from tensorflow/revert-34822-r2.1-cherry-pi…
mihaimaruseac Dec 18, 2019
2b8a565
eigen patch needed for HIP header changes
jeffdaily Dec 2, 2019
361b9fd
Move section on tf.debugging.enable_check_numerics to its own subsection
caisq Dec 19, 2019
62664e8
Fix
caisq Dec 19, 2019
a6fda7c
Grammar tweak
caisq Dec 19, 2019
82e2d5a
Revert "Revert "[r2.1 cherry-pick] Fix pip package API generation""
mihaimaruseac Dec 19, 2019
06a5209
Fixing an issue where scipy and tensorflow cannot be imported at the …
Dec 19, 2019
f141b42
Merge pull request #35265 from tensorflow/r2.1-debugging-notes
alextp Dec 19, 2019
58a9f2e
Update version numbers to 2.1.0-rc2
tensorflow-jenkins Dec 19, 2019
0d47a13
Merge pull request #35270 from tensorflow/revert-35234-revert-34822-r…
mihaimaruseac Dec 19, 2019
35a59de
Merge pull request #35271 from tensorflow/mm-cp-amit-visibility-changes
mihaimaruseac Dec 19, 2019
e981987
Pin scipy to 1.4.1.
mihaimaruseac Dec 19, 2019
ca2b3d0
Don't pin on macos either
mihaimaruseac Dec 19, 2019
d09304b
Merge pull request #35278 from tensorflow/mm-pin-scipy
goldiegadde Dec 19, 2019
96a2a11
Fix doc formatting in dataset_ops.py
aaudiber Dec 19, 2019
9f0aef4
Revert "<release 2.1>-<rc1> cherry-pick request: update tflite op ver…
mihaimaruseac Dec 19, 2019
d49810b
For python2, pin scipy to 1.2.2 (latest released).
mihaimaruseac Dec 19, 2019
fc6dd20
Merge pull request #35284 from tensorflow/revert-34662-cherrypicks_HO5XP
goldiegadde Dec 19, 2019
5d8db32
Merge pull request #35282 from aaudiber/cherrypicks_YX0HZ
goldiegadde Dec 19, 2019
6728f21
Revert "Revert "<release 2.1>-<rc1> cherry-pick request: update tflit…
mihaimaruseac Dec 20, 2019
3b9aa5b
Remove pinning of scipy on . Same reasoning
mihaimaruseac Dec 20, 2019
2967b47
Merge pull request #35235 from geetachavan1/cherrypicks_W4IZJ
alextp Dec 20, 2019
93a27b6
Revert "Set --incompatible_remove_legacy_whole_archive to False"
mihaimaruseac Dec 20, 2019
3b9a26c
Merge pull request #35313 from tensorflow/revert-34764-r2.1-cherry-pi…
goldiegadde Dec 20, 2019
4bb06ce
Revert "Revert "Set --incompatible_remove_legacy_whole_archive to Fal…
mihaimaruseac Dec 20, 2019
776c118
Merge pull request #35312 from tensorflow/revert-35284-revert-34662-c…
mihaimaruseac Dec 20, 2019
6d8cc6b
Merge pull request #35289 from tensorflow/mm-pin-scipy-for-py2
mihaimaruseac Dec 20, 2019
031c49a
Merge pull request #35315 from tensorflow/revert-35313-revert-34764-r…
mihaimaruseac Dec 20, 2019
74321d1
Merge pull request #35163 from angerson/cherrypick-windows-fix
goldiegadde Dec 20, 2019
36b67c1
Merge pull request #35006 from duncanriach/fix-v2.1-release-note
goldiegadde Dec 20, 2019
b8559e6
Merge branch 'r2.1' into edit_release_notes
goldiegadde Dec 20, 2019
c6170fb
Fix segfault when attempting to convert string to float16.
mihaimaruseac Dec 20, 2019
74d8b75
Fix conflict where `additional_deps` should have been used instead of…
mihaimaruseac Dec 21, 2019
db4d047
Attempt to fix sanity, syntax rules are different on r2.1
mihaimaruseac Dec 21, 2019
0ed90e5
Merge pull request #35217 from foxik/cherry-relax_shapes_on_instance_…
goldiegadde Dec 21, 2019
260745d
Merge pull request #35069 from tensorflow/edit_release_notes
goldiegadde Dec 21, 2019
03a3020
Merge pull request #35066 from tensorflow/layer_imports_internal
goldiegadde Dec 21, 2019
87143b5
Merge pull request #35041 from reedwm/r2.1
goldiegadde Dec 21, 2019
bd74d92
Typo from solving merge conflict
mihaimaruseac Dec 21, 2019
5dc7e36
Update RELEASE.md
goldiegadde Dec 21, 2019
3f078b7
Merge pull request #35273 from tensorflow-jenkins/version-numbers-2.1…
goldiegadde Dec 21, 2019
b8132f4
Update RELEASE.md
goldiegadde Dec 21, 2019
7391285
Merge pull request #35322 from tensorflow/mm-cp-segfault-fix
goldiegadde Dec 21, 2019
c23091d
Merge pull request #35324 from tensorflow/goldiegadde-patch-1
goldiegadde Dec 21, 2019
9837ece
Merge pull request #35238 from ROCmSoftwarePlatform/r2.1-eigen-patch
goldiegadde Dec 21, 2019
eaa4090
Fix bazelisk link
mihaimaruseac Dec 23, 2019
f61b498
Fixing .bazelversion to be the same version that CI uses for 2.1.0: h…
bmzhao Dec 29, 2019
5a3c577
Cherry-pick the release build scripts
mihaimaruseac Jan 2, 2020
32095d6
Merge pull request #35546 from tensorflow/mm-r21-presubmit-scripts
mihaimaruseac Jan 2, 2020
66191e1
Merge pull request #35470 from bmzhao/bazelversion-cherrypick
mihaimaruseac Jan 2, 2020
2d5cbf1
Provide integer variants of isnan/isfinite to work around a quirk in …
Artem-B Dec 19, 2019
4dfee0d
Remove designated initializers.
tensorflower-gardener Dec 19, 2019
4c07219
[XLA] Remove use of designated initializers in dynamic dimension infe…
yunxing Dec 19, 2019
9badef2
Define _USE_MATH_DEFINES for windows builds.
Artem-B Dec 20, 2019
a8adad9
configure.py: add `-D_USE_MATH_DEFINES` manually
compnerd Jan 3, 2020
5b7addf
Add Python3.7 testing on MacOS as we drop support for Python2.
mihaimaruseac Jan 2, 2020
3ed1f02
Cherry-picking 55e20a6 - klockwork fix
mahmoud-abuzaina Dec 26, 2019
5efe38d
Merge pull request #35566 from tensorflow/mm-r21-macos-py3
mihaimaruseac Jan 3, 2020
8427475
Merge pull request #35567 from Intel-tensorflow/tf-2.1-klocwork-cherr…
mihaimaruseac Jan 3, 2020
bd56e04
Merge pull request #35548 from compnerd/r2.1-windows-build
mihaimaruseac Jan 3, 2020
d43e3c7
Update version numbers to 2.1.0
tensorflow-jenkins Jan 6, 2020
e5bf8de
Merge pull request #35620 from tensorflow-jenkins/version-numbers-2.1…
goldiegadde Jan 7, 2020
9f67747
Update c api visibility
mralbean Apr 1, 2020
26dfffb
Silence build warnings in tflite
erikmchut Apr 2, 2020
2c4454f
Pick in XNNPACK
Apr 2, 2020
4d69df9
Pick in XNNPACK
Apr 2, 2020
edf89e3
Pick in XNNPACK
Apr 2, 2020
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
19 changes: 17 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,19 @@ build --announce_rc
# Other build flags.
build --define=grpc_no_ares=true

# Prevent regression of https://github.com/bazelbuild/bazel/issues/7362
build --incompatible_remove_legacy_whole_archive
# See https://github.com/bazelbuild/bazel/issues/7362 for information on what
# --incompatible_remove_legacy_whole_archive flag does.
# This flag is set to true in Bazel 1.0 and newer versions. We tried to migrate
# Tensorflow to the default, however test coverage wasn't enough to catch the
# errors.
# There is ongoing work on Bazel team's side to provide support for transitive
# shared libraries. As part of migrating to transitive shared libraries, we
# hope to provide a better mechanism for control over symbol exporting, and
# then tackle this issue again.
#
# TODO: Remove this line once TF doesn't depend on Bazel wrapping all library
# archives in -whole_archive -no_whole_archive.
build --noincompatible_remove_legacy_whole_archive

# Modular TF build options
build:dynamic_kernels --define=dynamic_loaded_kernels=true
Expand All @@ -149,6 +160,10 @@ build:c++17 --cxxopt=-std=c++1z
build:c++17 --cxxopt=-stdlib=libc++
build:c++1z --config=c++17

# Tensorflow uses M_* math constants that only get defined by MSVC headers if
# _USE_MATH_DEFINES is defined.
build:windows --copt=/D_USE_MATH_DEFINES

# Default paths for TF_SYSTEM_LIBS
build --define=PREFIX=/usr
build --define=LIBDIR=$(PREFIX)/lib
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.26.1
0.29.1
108 changes: 107 additions & 1 deletion RELEASE.md

Large diffs are not rendered by default.

39 changes: 36 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from distutils.spawn import find_executable as which
# pylint: enable=g-import-not-at-top

_DEFAULT_CUDA_VERSION = '10'
_DEFAULT_CUDA_VERSION = '10.1'
_DEFAULT_CUDNN_VERSION = '7'
_DEFAULT_TENSORRT_VERSION = '6'
_DEFAULT_CUDA_COMPUTE_CAPABILITIES = '3.5,7.0'
Expand Down Expand Up @@ -817,7 +817,7 @@ def valid_api_level(api_level):
android_ndk_api_level = prompt_loop_or_load_from_env(
environ_cp,
var_name='ANDROID_NDK_API_LEVEL',
var_default='18', # 18 is required for GPU acceleration.
var_default='21', # 21 is required for ARM64 support.
ask_for_var=('Please specify the (min) Android NDK API level to use. '
'[Available levels: %s]') % api_levels,
check_success=valid_api_level,
Expand Down Expand Up @@ -1196,6 +1196,34 @@ def set_system_libs_flag(environ_cp):
write_to_bazelrc('build --define=INCLUDEDIR=%s' % environ_cp['INCLUDEDIR'])


def is_reduced_optimize_huge_functions_available(environ_cp):
"""Check to see if the system supports /d2ReducedOptimizeHugeFunctions.

The above compiler flag is a new compiler flag introduced to the Visual Studio
compiler in version 16.4 (available in Visual Studio 2019, Preview edition
only, as of 2019-11-19). TensorFlow needs this flag to massively reduce
compile times, but until 16.4 is officially released, we can't depend on it.

See also https://groups.google.com/a/tensorflow.org/g/build/c/SsW98Eo7l3o

Because it's very annoying to check this manually (to check the MSVC installed
versions, you need to use the registry, and it's not clear if Bazel will be
using that install version anyway), we expect enviroments who know they may
use this flag to export TF_VC_VERSION=16.4

TODO(angerson, gunan): Remove this function when TensorFlow's minimum VS
version is upgraded to 16.4.

Arguments:
environ_cp: Environment of the current execution

Returns:
boolean, whether or not /d2ReducedOptimizeHugeFunctions is available on this
machine.
"""
return float(environ_cp.get('TF_VC_VERSION', '0')) >= 16.4


def set_windows_build_flags(environ_cp):
"""Set Windows specific build options."""
# The non-monolithic build is not supported yet
Expand All @@ -1205,13 +1233,18 @@ def set_windows_build_flags(environ_cp):
# Fix winsock2.h conflicts
write_to_bazelrc(
'build --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN '
'--copt=-DNOGDI --host_copt=-DNOGDI')
'--copt=-DNOGDI --host_copt=-DNOGDI --copt=-D_USE_MATH_DEFINES')
# Output more verbose information when something goes wrong
write_to_bazelrc('build --verbose_failures')
# The host and target platforms are the same in Windows build. So we don't
# have to distinct them. This avoids building the same targets twice.
write_to_bazelrc('build --distinct_host_configuration=false')

if is_reduced_optimize_huge_functions_available(environ_cp):
write_to_bazelrc(
'build --copt=/d2ReducedOptimizeHugeFunctions --host_copt=/d2ReducedOptimizeHugeFunctions'
)

if get_var(
environ_cp, 'TF_OVERRIDE_EIGEN_STRONG_INLINE', 'Eigen strong inline',
True, ('Would you like to override eigen strong inline for some C++ '
Expand Down
12 changes: 12 additions & 0 deletions tensorflow/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,18 @@ tf_cc_shared_object(
] + tf_additional_binary_deps(),
)

# This is intended to be the same as tf_binary_additional_srcs:
# https://github.com/tensorflow/tensorflow/blob/cd67f4f3723f9165aabedd0171aaadc6290636e5/tensorflow/tensorflow.bzl#L396-L425
# And is usable in the "deps" attribute instead of the "srcs" attribute
# as a workaround for https://github.com/tensorflow/tensorflow/issues/34117
cc_import(
name = "libtensorflow_framework_import_lib",
shared_library = select({
"//tensorflow:macos": ":libtensorflow_framework.dylib",
"//conditions:default": ":libtensorflow_framework.so",
}),
)

# -------------------------------------------
# New rules should be added above this target.
# -------------------------------------------
Expand Down
10 changes: 6 additions & 4 deletions tensorflow/api_template.__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ def _running_from_pip_package():
_current_file_location.startswith(dir_) for dir_ in _site_packages_dirs)

if _running_from_pip_package():
for s in _site_packages_dirs:
for _s in _site_packages_dirs:
# TODO(gunan): Add sanity checks to loaded modules here.
plugin_dir = _os.path.join(s, 'tensorflow-plugins')
if _fi.file_exists(plugin_dir):
_ll.load_library(plugin_dir)
_plugin_dir = _os.path.join(_s, 'tensorflow-plugins')
if _fi.file_exists(_plugin_dir):
_ll.load_library(_plugin_dir)

# Add module aliases
if hasattr(_current_module, 'keras'):
Expand All @@ -136,3 +136,5 @@ def _running_from_pip_package():
setattr(_current_module, "optimizers", optimizers)
setattr(_current_module, "initializers", initializers)
# pylint: enable=undefined-variable

# __all__ PLACEHOLDER
9 changes: 5 additions & 4 deletions tensorflow/api_template_v1.__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ def _running_from_pip_package():
_current_file_location.startswith(dir_) for dir_ in _site_packages_dirs)

if _running_from_pip_package():
for s in _site_packages_dirs:
for _s in _site_packages_dirs:
# TODO(gunan): Add sanity checks to loaded modules here.
plugin_dir = _os.path.join(s, 'tensorflow-plugins')
if _fi.file_exists(plugin_dir):
_ll.load_library(plugin_dir)
_plugin_dir = _os.path.join(_s, 'tensorflow-plugins')
if _fi.file_exists(_plugin_dir):
_ll.load_library(_plugin_dir)

# __all__ PLACEHOLDER
2 changes: 1 addition & 1 deletion tensorflow/c/kernels/BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load(
"//tensorflow:tensorflow.bzl",
"tf_cc_test",
"tf_kernel_library",
"tf_gen_op_libs",
"tf_kernel_library",
)

package(
Expand Down
1 change: 0 additions & 1 deletion tensorflow/cc/gradients/math_grad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#define _USE_MATH_DEFINES
#include <cmath>

#include "tensorflow/cc/ops/array_ops_internal.h"
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/jit/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tensorflow:tensorflow.bzl", "if_mlir", "tf_cc_test", "cc_header_only_library")
load("//tensorflow:tensorflow.bzl", "cc_header_only_library", "if_mlir", "tf_cc_test")
load("//tensorflow/stream_executor:build_defs.bzl", "if_cuda_or_rocm")
load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library", "tf_jit_compilation_passes_extra_deps")
load("//tensorflow/core/platform:default/build_config.bzl", "tf_additional_all_protos", "tf_proto_library")
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/compiler/xla/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tensorflow:tensorflow.bzl", "tf_cc_test", "cc_header_only_library")
load("//tensorflow:tensorflow.bzl", "cc_header_only_library", "tf_cc_test")
load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library")
load(
"//tensorflow/core/platform:default/build_config.bzl",
Expand Down
4 changes: 1 addition & 3 deletions tensorflow/compiler/xla/client/lib/math.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ limitations under the License.

#include "tensorflow/compiler/xla/client/lib/math.h"

// This macro is required to make MSVC defines math constants in math.h
#define _USE_MATH_DEFINES
#include <math.h>
#include <cmath>

#include "tensorflow/compiler/xla/client/lib/arithmetic.h"
#include "tensorflow/compiler/xla/client/lib/constants.h"
Expand Down
6 changes: 3 additions & 3 deletions tensorflow/compiler/xla/client/lib/tridiagonal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ namespace {
struct TridiagonalSystemShape {
const int64 rank;
const int64 num_equations;
TridiagonalSystemShape(int64 rk, int64 num_eqs)
: rank(rk), num_equations(num_eqs) {}
};

Status CheckSecondToLastDimension(const Shape& op_shape, int64 rank,
Expand Down Expand Up @@ -109,9 +111,7 @@ StatusOr<TridiagonalSystemShape> CheckSystemAndReturnShape(XlaOp lower_diagonal,
TF_RETURN_IF_ERROR(CheckSecondToLastDimension(upper_diagonal_shape, rank, 1,
"upper diagonal"));

TridiagonalSystemShape result = {.rank = rank,
.num_equations = num_equations};
return result;
return TridiagonalSystemShape(rank, num_equations);
}

XlaOp Coefficient(XlaOp operand, int64 i) {
Expand Down
14 changes: 7 additions & 7 deletions tensorflow/compiler/xla/service/dynamic_dimension_inference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ Status DynamicDimensionInferenceVisitor::HandleSetDimensionSize(
// Propagate dynamic dimension indicated by this set dimension size
// instruction.
parent_->SetDynamicSize(hlo, {}, hlo->dimension(), hlo->mutable_operand(1),
{.stride = 1, .multiple_of = 1});
DimensionConstraint(1, 1));
}

// Also Propagate dynamic dimension already set by operands.
Expand Down Expand Up @@ -813,7 +813,7 @@ Status DynamicDimensionInferenceVisitor::HandleReshape(HloInstruction* hlo) {

parent_->SetDynamicSize(
reshape, {}, output_dynamic_dimension, new_dynamic_size,
{.stride = 1, .multiple_of = constraint.multiple_of / divisor});
DimensionConstraint(1, constraint.multiple_of / divisor));
}

if (input_dim_size < output_dim_size) {
Expand Down Expand Up @@ -850,12 +850,12 @@ Status DynamicDimensionInferenceVisitor::HandleReshape(HloInstruction* hlo) {
hlo->parent()->AddInstruction(HloInstruction::CreateBinary(
output_dynamic_size->shape(), HloOpcode::kMultiply,
new_dynamic_size, operand_dynamic_size));
int64 new_multiple_of_constraint =
constraint.multiple_of * output_dim_size /
operand->shape().dimensions(input_dynamic_dimension);
parent_->SetDynamicSize(
reshape, {}, output_dynamic_dimension, new_dynamic_size,
{.stride = 1,
.multiple_of =
constraint.multiple_of * output_dim_size /
operand->shape().dimensions(input_dynamic_dimension)});
DimensionConstraint(1, new_multiple_of_constraint));
}

return Status::OK();
Expand Down Expand Up @@ -1227,7 +1227,7 @@ Status DynamicDimensionInferenceVisitor::HandleParameter(HloInstruction* hlo) {
parent_->SetDynamicSize(target_parameter,
dynamic_dimension.parameter_index,
dynamic_dimension.dimension, dynamic_size,
{.stride = 1, .multiple_of = 1});
DimensionConstraint(1, 1));
return Status::OK();
});
}
Expand Down
3 changes: 3 additions & 0 deletions tensorflow/compiler/xla/service/dynamic_dimension_inference.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ class DynamicDimensionInference {
//
//
struct DimensionConstraint {
explicit DimensionConstraint(int64 s, int64 m)
: stride(s), multiple_of(m) {}
DimensionConstraint() : stride(1), multiple_of(1) {}
// Stride represents the distance of a newly placed element and the previous
// placed element on this dynamic dimension.
int64 stride;
Expand Down
23 changes: 21 additions & 2 deletions tensorflow/compiler/xla/service/hlo_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2611,18 +2611,37 @@ struct MinMaxFiniteValue<bfloat16> {
static double min() { return -max(); }
};

// MSVC's standard C++ library does not define isnan/isfinite for integer types.
// To work around that we will need to provide our own.
template <typename T>
std::enable_if_t<std::is_floating_point<T>::value, bool> IsFinite(T val) {
return std::isfinite(val);
}
template <typename T>
std::enable_if_t<std::is_floating_point<T>::value, bool> IsNaN(T val) {
return std::isnan(val);
}
template <typename T>
std::enable_if_t<std::is_integral<T>::value, bool> IsFinite(T val) {
return std::isfinite(static_cast<double>(val));
}
template <typename T>
std::enable_if_t<std::is_integral<T>::value, bool> IsNaN(T val) {
return std::isnan(static_cast<double>(val));
}

template <typename LiteralNativeT, typename ParsedElemT>
bool HloParserImpl::CheckParsedValueIsInRange(LocTy loc, ParsedElemT value) {
if (std::is_floating_point<ParsedElemT>::value) {
auto value_as_native_t = static_cast<LiteralNativeT>(value);
auto value_double_converted = static_cast<ParsedElemT>(value_as_native_t);
if (!std::isfinite(value) || std::isfinite(value_double_converted)) {
if (!IsFinite(value) || IsFinite(value_double_converted)) {
value = value_double_converted;
}
}
PrimitiveType literal_ty =
primitive_util::NativeToPrimitiveType<LiteralNativeT>();
if (std::isnan(value) ||
if (IsNaN(value) ||
(std::numeric_limits<ParsedElemT>::has_infinity &&
(std::numeric_limits<ParsedElemT>::infinity() == value ||
-std::numeric_limits<ParsedElemT>::infinity() == value))) {
Expand Down
4 changes: 4 additions & 0 deletions tensorflow/core/api_def/python_api/api_def_Erfinv.pbtxt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
op {
graph_op_name: "Erfinv"
visibility: HIDDEN
}
4 changes: 4 additions & 0 deletions tensorflow/core/api_def/python_api/api_def_Ndtri.pbtxt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
op {
graph_op_name: "Ndtri"
visibility: HIDDEN
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ REGISTER_REWRITE(EagerOpRewriteRegistry::PRE_EXECUTION, MklEagerOpRewrite);

// Constructor
MklEagerOpRewrite::MklEagerOpRewrite(string name, string file, string line)
: EagerOpRewrite(name, file, line) {
: EagerOpRewrite(name, file, line), registered_kernels_map_() {
InsertMKLEagerOps({"BatchMatMul", AlwaysRewrite, CreateGenericMklOp});
InsertMKLEagerOps({"BatchMatMulV2", AlwaysRewrite, CreateGenericMklOp});
InsertMKLEagerOps({"Conv2D", RewriteConv2D, CreateMklConv2DOp});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ class EagerOpRewriteTest {
absl::make_unique<StaticDeviceMgr>(DeviceFactory::NewDevice(
"CPU", {}, "/job:localhost/replica:0/task:0/device:CPU:0"));
bool async = false;
bool lazy_remote_tensor_copy = false;
tensorflow::Rendezvous* rendezvous =
new tensorflow::IntraProcessRendezvous(device_mgr.get());
std::unique_ptr<tensorflow::EagerContext> eager_ctx =
std::unique_ptr<tensorflow::EagerContext>(new tensorflow::EagerContext(
SessionOptions(),
tensorflow::ContextDevicePlacementPolicy::DEVICE_PLACEMENT_SILENT,
tensorflow::ContextMirroringPolicy::MIRRORING_NONE, async,
device_mgr.get(), false, rendezvous,
lazy_remote_tensor_copy, device_mgr.get(), false, rendezvous,
GetDefaultCustomKernelCreator()));

EagerExecutor executor_(false);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/debug/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
load(
"//tensorflow:tensorflow.bzl",
"check_deps",
"tf_cc_binary",
"tf_cc_test",
"tf_copts",
"tf_cuda_library",
"tf_cc_binary",
)

# For platform specific build config
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/core/framework/dataset.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ Status DatasetBaseIterator::GetNext(IteratorContext* ctx,
bool* end_of_sequence) {
profiler::TraceMe activity([&] { return BuildTraceMeName(); },
profiler::TraceMeLevel::kInfo);
DVLOG(3) << prefix() << " GetNext enter";
RecordStart(ctx, /*stop_output=*/true);
Status s = GetNextInternal(ctx, out_tensors, end_of_sequence);
if (s.ok() && !*end_of_sequence) RecordElement(ctx);
Expand All @@ -415,6 +416,7 @@ Status DatasetBaseIterator::GetNext(IteratorContext* ctx,
s.error_message());
LOG(ERROR) << s;
}
DVLOG(3) << prefix() << " GetNext exit";
return s;
}

Expand Down
6 changes: 5 additions & 1 deletion tensorflow/core/framework/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,13 @@ class DatasetBaseIterator : public IteratorBase {

explicit DatasetBaseIterator(const BaseParams& params) : params_(params) {
params_.dataset->Ref();
VLOG(2) << prefix() << " constructor";
}

~DatasetBaseIterator() override { params_.dataset->Unref(); }
~DatasetBaseIterator() override {
VLOG(2) << prefix() << " destructor";
params_.dataset->Unref();
}

const DataTypeVector& output_dtypes() const override {
return params_.dataset->output_dtypes();
Expand Down
Loading