Skip to content

Commit 4e0c4f2

Browse files
authored
Merge pull request #5 from tensorflow/master
sync to upstream
2 parents a28bac9 + d91193d commit 4e0c4f2

File tree

1,908 files changed

+46035
-39513
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,908 files changed

+46035
-39513
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ build:rbe_win --shell_executable=C:\\tools\\msys64\\usr\\bin\\bash.exe
496496

497497
# TODO(gunan): Remove once we use MSVC 2019 with latest patches.
498498
build:rbe_win --define=override_eigen_strong_inline=true
499-
build:rbe_win --jobs=500
499+
build:rbe_win --jobs=100
500500

501501
build:rbe_win_py37 --config=rbe
502502
build:rbe_win_py37 --repo_env=TF_PYTHON_CONFIG_REPO="@windows_py37_config_python"

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,20 @@ Build Type | Status
123123

124124
### Community Supported Builds
125125

126-
Build Type | Status | Artifacts
127-
----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------
128-
**Linux AMD ROCm GPU** Nightly | [![Build Status](http://ml-ci.amd.com:21096/job/tensorflow-rocm-nightly/badge/icon)](http://ml-ci.amd.com:21096/job/tensorflow-rocm-nightly) | [Nightly](http://ml-ci.amd.com:21096/job/tensorflow-rocm-nightly/lastSuccessfulBuild/)
129-
**Linux AMD ROCm GPU** Stable Release | [![Build Status](http://ml-ci.amd.com:21096/job/tensorflow-rocm-release/badge/icon)](http://ml-ci.amd.com:21096/job/tensorflow-rocm-release/) | Release [1.15](http://ml-ci.amd.com:21096/job/tensorflow-rocm-release/lastSuccessfulBuild/) / [2.x](http://ml-ci.amd.com:21096/job/tensorflow-rocm-v2-release/lastSuccessfulBuild/)
130-
**Linux s390x** Nightly | [![Build Status](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_CI/badge/icon)](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_CI/) | [Nightly](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_CI/)
131-
**Linux s390x CPU** Stable Release | [![Build Status](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_Release_Build/badge/icon)](https://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_Release_Build/) | [Release](https://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_Release_Build/)
132-
**Linux ppc64le CPU** Nightly | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Build/) | [Nightly](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Nightly_Artifact/)
133-
**Linux ppc64le CPU** Stable Release | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Release_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Release_Build/) | Release [1.15](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Release_Build/) / [2.x](https://powerci.osuosl.org/job/TensorFlow2_PPC64LE_CPU_Release_Build/)
134-
**Linux ppc64le GPU** Nightly | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Build/) | [Nightly](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Nightly_Artifact/)
135-
**Linux ppc64le GPU** Stable Release | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Release_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Release_Build/) | Release [1.15](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Release_Build/) / [2.x](https://powerci.osuosl.org/job/TensorFlow2_PPC64LE_GPU_Release_Build/)
136-
**Linux CPU with Intel® MKL-DNN** Nightly | [![Build Status](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-whl-nightly/badge/icon)](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-whl-nightly/) | [Nightly](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-whl-nightly/)
137-
**Linux CPU with Intel® MKL-DNN** Stable Release | ![Build Status](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-release-whl/badge/icon) | Release [1.15](https://pypi.org/project/intel-tensorflow/1.15.0/) / [2.x](https://pypi.org/project/intel-tensorflow/)
138-
**Red Hat® Enterprise Linux® 7.6 CPU & GPU** <br> Python 2.7, 3.6 | [![Build Status](https://jenkins-tensorflow.apps.ci.centos.org/buildStatus/icon?job=tensorflow-rhel7-3.6&build=2)](https://jenkins-tensorflow.apps.ci.centos.org/job/tensorflow-rhel7-3.6/2/) | [1.13.1 PyPI](https://tensorflow.pypi.thoth-station.ninja/index/)
126+
Build Type | Status | Artifacts
127+
----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------
128+
**Linux AMD ROCm GPU** Nightly | [![Build Status](http://ml-ci.amd.com:21096/job/tensorflow-rocm-nightly/badge/icon)](http://ml-ci.amd.com:21096/job/tensorflow-rocm-nightly) | [Nightly](http://ml-ci.amd.com:21096/job/tensorflow-rocm-nightly/lastSuccessfulBuild/)
129+
**Linux AMD ROCm GPU** Stable Release | [![Build Status](http://ml-ci.amd.com:21096/job/tensorflow-rocm-release/badge/icon)](http://ml-ci.amd.com:21096/job/tensorflow-rocm-release/) | Release [1.15](http://ml-ci.amd.com:21096/job/tensorflow-rocm-release/lastSuccessfulBuild/) / [2.x](http://ml-ci.amd.com:21096/job/tensorflow-rocm-v2-release/lastSuccessfulBuild/)
130+
**Linux s390x** Nightly | [![Build Status](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_CI/badge/icon)](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_CI/) | [Nightly](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_CI/)
131+
**Linux s390x CPU** Stable Release | [![Build Status](http://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_Release_Build/badge/icon)](https://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_Release_Build/) | [Release](https://ibmz-ci.osuosl.org/job/TensorFlow_IBMZ_Release_Build/)
132+
**Linux ppc64le CPU** Nightly | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Build/) | [Nightly](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Nightly_Artifact/)
133+
**Linux ppc64le CPU** Stable Release | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Release_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Release_Build/) | Release [1.15](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_CPU_Release_Build/) / [2.x](https://powerci.osuosl.org/job/TensorFlow2_PPC64LE_CPU_Release_Build/)
134+
**Linux ppc64le GPU** Nightly | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Build/) | [Nightly](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Nightly_Artifact/)
135+
**Linux ppc64le GPU** Stable Release | [![Build Status](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Release_Build/badge/icon)](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Release_Build/) | Release [1.15](https://powerci.osuosl.org/job/TensorFlow_PPC64LE_GPU_Release_Build/) / [2.x](https://powerci.osuosl.org/job/TensorFlow2_PPC64LE_GPU_Release_Build/)
136+
**Linux aarch64 CPU** Nightly <br> Python 3.6 | [![Build Status](http://openlabtesting.org:15000/badge?project=tensorflow%2Ftensorflow)](https://status.openlabtesting.org/builds/builds?project=tensorflow%2Ftensorflow) | [Nightly](https://status.openlabtesting.org/builds/builds?project=tensorflow%2Ftensorflow&job_name=tensorflow-arm64-build-daily-master)
137+
**Linux CPU with Intel oneAPI Deep Neural Network Library (oneDNN)** Nightly | [![Build Status](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-whl-nightly/badge/icon)](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-whl-nightly/) | [Nightly](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-whl-nightly/)
138+
**Linux CPU with Intel oneAPI Deep Neural Network Library (oneDNN)** Stable Release | ![Build Status](https://tensorflow-ci.intel.com/job/tensorflow-mkl-build-release-whl/badge/icon) | Release [1.15](https://pypi.org/project/intel-tensorflow/1.15.0/) / [2.x](https://pypi.org/project/intel-tensorflow/)
139+
**Red Hat® Enterprise Linux® 7.6 CPU & GPU** <br> Python 2.7, 3.6 | [![Build Status](https://jenkins-tensorflow.apps.ci.centos.org/buildStatus/icon?job=tensorflow-rhel7-3.6&build=2)](https://jenkins-tensorflow.apps.ci.centos.org/job/tensorflow-rhel7-3.6/2/) | [1.13.1 PyPI](https://tensorflow.pypi.thoth-station.ninja/index/)
139140

140141
## Resources
141142

@@ -149,6 +150,8 @@ Build Type | Status
149150
* [Intro to TensorFlow for Deep Learning from Udacity](https://www.udacity.com/course/intro-to-tensorflow-for-deep-learning--ud187)
150151
* [Introduction to TensorFlow Lite from Udacity](https://www.udacity.com/course/intro-to-tensorflow-lite--ud190)
151152
* [Machine Learning with TensorFlow on GCP](https://www.coursera.org/specializations/machine-learning-tensorflow-gcp)
153+
* [TensorFlow Chat Room on StackOverflow (not actively monitored by the
154+
TensorFlow team)](https://chat.stackoverflow.com/rooms/216694/tensorflow)
152155
* [TensorFlow Blog](https://blog.tensorflow.org)
153156
* [Learn ML with TensorFlow](https://www.tensorflow.org/resources/learn-ml)
154157
* [TensorFlow Twitter](https://twitter.com/tensorflow)

RELEASE.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
* Tracing and Debugging:
5151
* <ADD RELEASE NOTES HERE>
5252
* Other:
53+
* We have replaced uses of "whitelist" with "allowlist" where possible.
54+
Please see https://developers.google.com/style/word-list#blacklist for more
55+
context.
5356
* <ADD RELEASE NOTES HERE>
5457

5558
## Thanks to our Contributors
@@ -72,12 +75,6 @@ stjohnso98, <NAME>, <HERE>, <USING>, <GITHUB>, <HANDLE>
7275
models will not be impacted.
7376

7477
## Bug Fixes and Other Changes
75-
76-
* `tf.keras`:
77-
* Deprecated the `tf.keras.experimental.PeepholeLSTMCell` layer, which was
78-
moved to `tensorflow_addons` as
79-
`tensorflow_addons.rnn.PeepholeLSTMCell`. This experimental API is
80-
expected to be removed from TF in the next public release (2.4).
8178
* Mutable tables now restore checkpointed values when loaded from SavedModel.
8279

8380
# Release 2.1.1

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Even if the untrusted party only supplies the serialized computation
4444
graph (in form of a `GraphDef`, `SavedModel`, or equivalent on-disk format), the
4545
set of computation primitives available to TensorFlow is powerful enough that
4646
you should assume that the TensorFlow process effectively executes arbitrary
47-
code. One common solution is to whitelist only a few safe Ops. While this is
47+
code. One common solution is to allow only a few safe Ops. While this is
4848
possible in theory, we still recommend you sandbox the execution.
4949

5050
It depends on the computation graph whether a user provided checkpoint is safe.

tensorflow/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,13 @@ config_setting(
467467
visibility = ["//visibility:public"],
468468
)
469469

470+
# This flag enables experimental MLIR bridge support.
471+
config_setting(
472+
name = "enable_mlir_bridge",
473+
values = {"define": "enable_mlir_bridge=true"},
474+
visibility = ["//visibility:public"],
475+
)
476+
470477
# This flag enables experimental TPU support
471478
config_setting(
472479
name = "with_tpu_support",

tensorflow/c/eager/BUILD

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,96 @@ cc_library(
171171
],
172172
)
173173

174+
cc_library(
175+
name = "gradients",
176+
srcs = [
177+
"gradients.cc",
178+
"gradients_internal.h",
179+
],
180+
hdrs = [
181+
"gradients.h",
182+
],
183+
visibility = [
184+
"//tensorflow:internal",
185+
],
186+
deps = [
187+
":abstract_context",
188+
":abstract_operation",
189+
":abstract_tensor_handle",
190+
":c_api_unified_internal",
191+
":tape",
192+
"//tensorflow/core/common_runtime/eager:attr_builder",
193+
"//tensorflow/core/lib/llvm_rtti",
194+
"@com_google_absl//absl/container:flat_hash_map",
195+
"@com_google_absl//absl/strings",
196+
],
197+
)
198+
199+
cc_library(
200+
name = "gradients_internal",
201+
srcs = [
202+
"gradients.cc",
203+
],
204+
hdrs = [
205+
"gradients.h",
206+
"gradients_internal.h",
207+
],
208+
visibility = [
209+
"//tensorflow:internal",
210+
],
211+
deps = [
212+
":abstract_context",
213+
":abstract_operation",
214+
":abstract_tensor_handle",
215+
":c_api_unified_internal",
216+
":tape",
217+
"//tensorflow/core/common_runtime/eager:attr_builder",
218+
"//tensorflow/core/lib/llvm_rtti",
219+
"@com_google_absl//absl/container:flat_hash_map",
220+
"@com_google_absl//absl/strings",
221+
],
222+
)
223+
224+
tf_cuda_cc_test(
225+
name = "gradients_test",
226+
size = "small",
227+
srcs = [
228+
"gradients_test.cc",
229+
],
230+
args = ["--heap_check=local"],
231+
extra_copts = tfe_xla_copts(),
232+
linkstatic = tf_kernel_tests_linkstatic(),
233+
tags = tf_cuda_tests_tags() + ["nomac"],
234+
deps = [
235+
":abstract_tensor_handle",
236+
":c_api_experimental",
237+
":c_api_test_util",
238+
":c_api_unified_internal",
239+
":gradients_internal",
240+
"//tensorflow/c:c_api",
241+
"//tensorflow/c:c_test_util",
242+
"//tensorflow/c:tf_status_helper",
243+
"//tensorflow/cc/profiler",
244+
"//tensorflow/compiler/mlir/tensorflow/c:mlir_c_api_registration",
245+
"//tensorflow/core:lib",
246+
"//tensorflow/core:protos_all_cc",
247+
"//tensorflow/core:test",
248+
"//tensorflow/core:test_main",
249+
"//tensorflow/core/lib/llvm_rtti",
250+
"@com_google_absl//absl/strings",
251+
"@com_google_absl//absl/types:span",
252+
],
253+
)
254+
174255
cc_library(
175256
name = "abstract_tensor_handle",
176257
hdrs = ["abstract_tensor_handle.h"],
177258
visibility = [
178259
"//tensorflow:internal",
179260
],
180-
deps = [],
261+
deps = [
262+
"//tensorflow/core:protos_all_cc",
263+
],
181264
)
182265

183266
cc_library(
@@ -480,6 +563,7 @@ tf_cuda_cc_test(
480563
"//tensorflow/core:test",
481564
"//tensorflow/core:test_main",
482565
"//tensorflow/core/common_runtime:function_optimization_registry",
566+
"//tensorflow/core/common_runtime:optimization_registry",
483567
"//tensorflow/core/common_runtime/eager:eager_operation",
484568
"//tensorflow/core/distributed_runtime/rpc:grpc_server_lib",
485569
"@com_google_absl//absl/strings",
@@ -744,6 +828,7 @@ filegroup(
744828
"c_api_unified_experimental_eager.cc",
745829
"c_api_unified_experimental_graph.cc",
746830
"c_api_unified_experimental_internal.h",
831+
"gradients.cc", # Uses RTTI.
747832
"*test*",
748833
"*dlpack*",
749834
],

tensorflow/c/eager/abstract_operation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class AbstractOperation {
7373
virtual Status SetDeviceName(const char* name) = 0;
7474

7575
virtual Status AddInput(AbstractTensorHandle* input) = 0;
76-
virtual Status AddInputList(absl::Span<AbstractTensorHandle*> inputs) = 0;
76+
virtual Status AddInputList(
77+
absl::Span<AbstractTensorHandle* const> inputs) = 0;
7778
virtual Status Execute(absl::Span<AbstractTensorHandle*> retvals,
7879
int* num_retvals) = 0;
7980

tensorflow/c/eager/abstract_tensor_handle.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616
#define TENSORFLOW_C_EAGER_ABSTRACT_TENSOR_HANDLE_H_
1717

1818
#include <memory>
19+
20+
#include "tensorflow/core/framework/types.pb.h"
1921
namespace tensorflow {
2022

2123
// Abstract interface to a Tensor handle in either tracing or immediate
@@ -27,6 +29,9 @@ class AbstractTensorHandle {
2729
virtual ~AbstractTensorHandle() {}
2830

2931
public:
32+
// Returns tensor dtype.
33+
virtual tensorflow::DataType DataType() const = 0;
34+
3035
AbstractTensorHandleKind getKind() const { return kind_; }
3136

3237
// Release any underlying resources, including the interface object.

0 commit comments

Comments
 (0)