Skip to content

Commit d221e82

Browse files
Merge pull request #5 from tensorflow/master
Sync master with tensorflow
2 parents 05ff887 + 463c305 commit d221e82

File tree

1,169 files changed

+86338
-35843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,169 files changed

+86338
-35843
lines changed

.bazelrc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ build:mkl --define=tensorflow_mkldnn_contraction_kernel=0
143143
build:mkl --define=build_with_mkl_dnn_v1_only=true
144144
build:mkl -c opt
145145

146+
# config to build OneDNN backend with a user specified threadpool.
147+
build:mkl_threadpool --define=build_with_mkl=true --define=enable_mkl=true
148+
build:mkl_threadpool --define=tensorflow_mkldnn_contraction_kernel=0
149+
build:mkl_threadpool --define=build_with_mkldnn_threadpool=true
150+
build:mkl_threadpool -c opt
146151
# This config refers to building with CUDA available. It does not necessarily
147152
# mean that we build CUDA op kernels.
148153
build:using_cuda --define=using_cuda=true
@@ -235,10 +240,15 @@ build:c++17 --cxxopt=-std=c++1z
235240
build:c++17 --cxxopt=-stdlib=libc++
236241
build:c++1z --config=c++17
237242

238-
# Enable using platform specific build settings
243+
# Enable using platform specific build settings, except when cross-compiling for
244+
# mobile platforms.
239245
build --enable_platform_specific_config
246+
build:android --noenable_platform_specific_config
247+
build:ios --noenable_platform_specific_config
240248

241249
# Suppress C++ compiler warnings, otherwise build logs become 10s of MBs.
250+
build:android --copt=-w
251+
build:ios --copt=-w
242252
build:linux --copt=-w
243253
build:macos --copt=-w
244254
build:windows --copt=/w
@@ -258,6 +268,10 @@ build:macos --define=INCLUDEDIR=$(PREFIX)/include
258268
# TF_SYSTEM_LIBS do not work on windows.
259269

260270
# By default, build TF in C++ 14 mode.
271+
build:android --cxxopt=-std=c++14
272+
build:android --host_cxxopt=-std=c++14
273+
build:ios --cxxopt=-std=c++14
274+
build:ios --host_cxxopt=-std=c++14
261275
build:linux --cxxopt=-std=c++14
262276
build:linux --host_cxxopt=-std=c++14
263277
build:macos --cxxopt=-std=c++14

.github/bot_config.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# ============================================================================
15+
#
16+
# THIS IS A GENERATED DOCKERFILE.
17+
#
18+
# This file was assembled from multiple pieces, whose use is documented
19+
# throughout. Please refer to the TensorFlow dockerfiles documentation
20+
# for more information.
21+
22+
# A list of assignees
23+
assignees:
24+
- amahendrakar
25+
- ravikyram
26+
- Saduf2019
27+
# A list of assignees for compiler folder
28+
compiler_assignees:
29+
- joker-eph
30+
# Cuda Comment
31+
cuda_comment: >
32+
From the template it looks like you are installing **TensorFlow** (TF) prebuilt binaries:
33+
* For TF-GPU - See point 1
34+
* For TF-CPU - See point 2
35+
-----------------------------------------------------------------------------------------------
36+
37+
**1. Installing **TensorFlow-GPU** (TF) prebuilt binaries**
38+
39+
40+
Make sure you are using compatible TF and CUDA versions.
41+
Please refer following TF version and CUDA version compatibility table.
42+
43+
| TF | CUDA |
44+
45+
| :-------------: | :-------------: |
46+
47+
| 2.1.0 - 2.2.0 | 10.1 |
48+
49+
| 1.13.1 - 2.0 | 10.0 |
50+
51+
| 1.5.0 - 1.12.0 | 9.0 |
52+
53+
* If you have above configuration and using _**Windows**_ platform -
54+
* Try adding the CUDA, CUPTI, and cuDNN installation directories to the %PATH% environment variable.
55+
* Refer [windows setup guide](https://www.tensorflow.org/install/gpu#windows_setup).
56+
* If you have above configuration and using _**Ubuntu/Linux**_ platform -
57+
* Try adding the CUDA, CUPTI, and cuDNN installation directories to the $LD_LIBRARY_PATH environment variable.
58+
* Refer [linux setup guide](https://www.tensorflow.org/install/gpu#linux_setup).
59+
* If error still persists then, apparently your CPU model does not support AVX instruction sets.
60+
* Refer [hardware requirements](https://www.tensorflow.org/install/pip#hardware-requirements).
61+
62+
-----------------------------------------------------------------------------------------------
63+
64+
**2. Installing **TensorFlow** (TF) CPU prebuilt binaries**
65+
66+
67+
*TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets.*
68+
69+
70+
Therefore on any CPU that does not have these instruction sets, either CPU or GPU version of TF will fail to load.
71+
72+
Apparently, your CPU model does not support AVX instruction sets. You can still use TensorFlow with the alternatives given below:
73+
74+
* Try Google Colab to use TensorFlow.
75+
* The easiest way to use TF will be to switch to [google colab](https://colab.sandbox.google.com/notebooks/welcome.ipynb#recent=true). You get pre-installed latest stable TF version. Also you can use ```pip install``` to install any other preferred TF version.
76+
* It has an added advantage since you can you easily switch to different hardware accelerators (cpu, gpu, tpu) as per the task.
77+
* All you need is a good internet connection and you are all set.
78+
* Try to build TF from sources by changing CPU optimization flags.
79+
80+
*Please let us know if this helps.*
81+
82+
windows_comment: >
83+
From the stack trace it looks like you are hitting windows path length limit.
84+
* Try to disable path length limit on Windows 10.
85+
* Refer [disable path length limit instructions guide.](https://mspoweruser.com/ntfs-260-character-windows-10/)
86+
87+
Please let us know if this helps.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Build Type | Status
142142
* [Getting Started with TensorFlow 2 from Coursera](https://www.coursera.org/learn/getting-started-with-tensor-flow2)
143143
* [Intro to TensorFlow for Deep Learning from Udacity](https://www.udacity.com/course/intro-to-tensorflow-for-deep-learning--ud187)
144144
* [Introduction to TensorFlow Lite from Udacity](https://www.udacity.com/course/intro-to-tensorflow-lite--ud190)
145+
* [Machine Learning with TensorFlow on GCP](https://www.coursera.org/specializations/machine-learning-tensorflow-gcp)
145146
* [TensorFlow Blog](https://blog.tensorflow.org)
146147
* [Learn ML with TensorFlow](https://www.tensorflow.org/resources/learn-ml)
147148
* [TensorFlow Twitter](https://twitter.com/tensorflow)

RELEASE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
# Release 2.3.0
2+
3+
## Breaking Changes
4+
5+
* `tf.image.extract_glimpse` has been updated to correctly process the case
6+
where `centered=False` and `normalized=False`. This is a breaking change as
7+
the output is different from (incorrect) previous versions. Note this
8+
breaking change only impacts `tf.image.extract_glimpse` and
9+
`tf.compat.v2.image.extract_glimpse` API endpoints. The behavior of
10+
`tf.compat.v1.image.extract_glimpse` does not change. The behavior of
11+
exsiting C++ kernel `ExtractGlimpse` does not change as well, so saved
12+
models will not be impacted.
13+
14+
# Release 2.1.1
15+
16+
## Bug Fixes and Other Changes
17+
* Updates `sqlite3` to `3.31.01` to handle [CVE-2019-19880](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19880), [CVE-2019-19244](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19244) and [CVE-2019-19645](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19645)
18+
* Updates `curl` to `7.69.1` to handle [CVE-2019-15601](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15601)
19+
* Updates `libjpeg-turbo` to `2.0.4` to handle [CVE-2018-19664](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19664), [CVE-2018-20330](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20330) and [CVE-2019-13960](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13960)
20+
* Updates Apache Spark to `2.4.5` to handle [CVE-2019-10099](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10099), [CVE-2018-17190](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-17190) and [CVE-2018-11770](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-11770)
21+
* Fixes a versioning bug which causes Keras layers from TF 1.x to be used instead of those from TF 2.x
22+
23+
# Release 2.0.2
24+
25+
## Bug Fixes and Other Changes
26+
* Updates `sqlite3` to `3.31.01` to handle [CVE-2019-19880](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19880), [CVE-2019-19244](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19244) and [CVE-2019-19645](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19645)
27+
* Updates `curl` to `7.69.1` to handle [CVE-2019-15601](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15601)
28+
* Updates `libjpeg-turbo` to `2.0.4` to handle [CVE-2018-19664](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19664), [CVE-2018-20330](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20330) and [CVE-2019-13960](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13960)
29+
* Updates Apache Spark to `2.4.5` to handle [CVE-2019-10099](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10099), [CVE-2018-17190](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-17190) and [CVE-2018-11770](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-11770)
30+
31+
# Release 1.15.3
32+
33+
## Bug Fixes and Other Changes
34+
* Updates `sqlite3` to `3.31.01` to handle [CVE-2019-19880](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19880), [CVE-2019-19244](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19244) and [CVE-2019-19645](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19645)
35+
* Updates `curl` to `7.69.1` to handle [CVE-2019-15601](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15601)
36+
* Updates `libjpeg-turbo` to `2.0.4` to handle [CVE-2018-19664](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-19664), [CVE-2018-20330](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20330) and [CVE-2019-13960](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13960)
37+
* Updates Apache Spark to `2.4.5` to handle [CVE-2019-10099](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10099), [CVE-2018-17190](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-17190) and [CVE-2018-11770](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-11770)
38+
139
# Release 2.2.0
240

341
TensorFlow 2.2 discontinues support for Python 2, [previously announced](https://groups.google.com/a/tensorflow.org/d/msg/announce/gVwS5RC8mds/dCt1ka2XAAAJ) as following [Python 2's EOL on January 1, 2020](https://www.python.org/dev/peps/pep-0373/#update).

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ your model, and we recommend you run the TensorFlow process in a sandbox.
6464

6565
It is possible to write models that are secure in a sense that they can safely
6666
process untrusted inputs assuming there are no bugs. There are two main reasons
67-
to not rely on this: first, it is easy to write models which must not be exposed
67+
to not rely on this: First, it is easy to write models which must not be exposed
6868
to untrusted inputs, and second, there are bugs in any software system of
6969
sufficient complexity. Letting users control inputs could allow them to trigger
7070
bugs either in TensorFlow or in dependent libraries.
@@ -149,7 +149,7 @@ attack (or worse). Because TensorFlow behaves correctly, this is not a
149149
vulnerability in TensorFlow (although it would be a vulnerability of this
150150
hypothetical system).
151151

152-
As a general rule, it is incorrect behavior for Tensorflow to access memory it
152+
As a general rule, it is incorrect behavior for TensorFlow to access memory it
153153
does not own, or to terminate in an unclean way. Bugs in TensorFlow that lead to
154154
such behaviors constitute a vulnerability.
155155

WORKSPACE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ http_archive(
114114
],
115115
)
116116

117+
http_archive(
118+
name = "person_detect_data",
119+
sha256 = "170542270da256994ce24d1e357f6e84a54fdaf7d28ff2b74725a40b70b082cf",
120+
urls = [
121+
"https://storage.googleapis.com/download.tensorflow.org/data/tf_lite_micro_person_data_grayscale_2020_05_24.zip",
122+
],
123+
)
124+
117125
# Required for dependency @com_github_grpc_grpc
118126

119127
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

configure.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,8 +1368,13 @@ def main():
13681368
# environment variables.
13691369
environ_cp = dict(os.environ)
13701370

1371-
current_bazel_version = check_bazel_version(_TF_MIN_BAZEL_VERSION,
1372-
_TF_MAX_BAZEL_VERSION)
1371+
try:
1372+
current_bazel_version = check_bazel_version(_TF_MIN_BAZEL_VERSION,
1373+
_TF_MAX_BAZEL_VERSION)
1374+
except subprocess.CalledProcessError as e:
1375+
print("Error checking bazel version: ", e.output.decode('UTF-8').strip())
1376+
raise e
1377+
13731378
_TF_CURRENT_BAZEL_VERSION = convert_version_to_int(current_bazel_version)
13741379

13751380
reset_tf_configure_bazelrc()
@@ -1387,7 +1392,6 @@ def main():
13871392
# Windows.
13881393
environ_cp['TF_DOWNLOAD_CLANG'] = '0'
13891394
environ_cp['TF_NEED_MPI'] = '0'
1390-
environ_cp['TF_SET_ANDROID_WORKSPACE'] = '0'
13911395

13921396
if is_macos():
13931397
environ_cp['TF_NEED_TENSORRT'] = '0'

tensorflow/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,10 @@ package_group(
524524
],
525525
)
526526

527-
package_group(name = "ndarray_tensor_allow_list")
527+
package_group(
528+
name = "ndarray_tensor_allow_list",
529+
packages = ["//learning/pathways/..."],
530+
)
528531

529532
# Packages that use composite tensors or dispatch.
530533
# TODO(b/154762408) Remove this package group once it's no longer needed.

tensorflow/c/BUILD

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ tf_cuda_library(
216216
],
217217
visibility = [
218218
"//tensorflow/c:__subpackages__",
219+
"//tensorflow/compiler/mlir/tensorflow/c:__subpackages__",
219220
],
220221
deps = select({
221222
"//tensorflow:android": [
@@ -394,8 +395,14 @@ tf_cuda_library(
394395
deps = [
395396
":tf_status",
396397
":tf_status_internal",
397-
"//tensorflow/core:lib",
398-
],
398+
] + select({
399+
"//tensorflow:android": [
400+
"//tensorflow/core:portable_tensorflow_lib_lite", # TODO(annarev): exclude runtime srcs
401+
],
402+
"//conditions:default": [
403+
"//tensorflow/core:lib",
404+
],
405+
}),
399406
)
400407

401408
tf_cc_test(

0 commit comments

Comments
 (0)