Commit Graph

72619 Commits

Author SHA1 Message Date
Mihai Maruseac
31ab265fcc Debug windows builds, add -s bazel flag 2020-03-10 10:17:49 -07:00
Eugene Brevdo
0323e1ee24 [TF XLA AOT] Make sure required sources are included in pip package.
(bugfix) We thought the previous CL ensured this, but looks like there
were some missing pieces in the genrule & MANIFEST files.

PiperOrigin-RevId: 298715688
Change-Id: Ib0a20cb10fb3b36686419b02c2f8ab6afd438d57
2020-03-09 21:35:33 -07:00
Goldie Gadde
1aaea1ffb9
Merge pull request from lgeiger/r2.2-split-unroll-bn-pass
[r2.2:Cherryppick] Split unroll_batch_matmul pass into own build target
2020-03-09 18:33:20 -07:00
A. Unique TensorFlower
67319e9764 Export Keras image preprocessing layers into the experimental namespace.
PiperOrigin-RevId: 299956491
Change-Id: I2f5a5ea74cbd2ffcfbb254d99c9d54a4bbd81f34
2020-03-09 17:14:44 -07:00
Tom O'Malley
e1c08beffe Merge branch 'r2.2' of https://github.com/tensorflow/tensorflow into cherrypicks_8ETV8 2020-03-09 15:16:16 -07:00
Goldie Gadde
c5f309f6cc
Merge pull request from omalleyt12/cherrypicks_X7ZEK
Allow missing labels when there is no loss / metric associated with t…
2020-03-09 14:26:17 -07:00
Kathy Wu
ba545bc578 Merge branch 'r2.2' of https://github.com/tensorflow/tensorflow into cherrypicks_SXE8X 2020-03-09 13:03:31 -07:00
Goldie Gadde
b720399a6e
Merge pull request from geetachavan1/cherrypicks_XMMHF
[r2.2:Cherrypick] Diable a test that fails on open source build to unblock the release.
2020-03-08 20:03:25 -07:00
Goldie Gadde
b67d58d5bf
Merge pull request from omalleyt12/cherrypicks_L42U7
Ignore training=None when passed during Functional API construction.
2020-03-08 10:01:11 -07:00
Goldie Gadde
216c878c86
Merge pull request from omalleyt12/cherrypicks_OUAJ4
Fix MultiWorkerMirroredStrategy validation in Model.fit
2020-03-08 10:00:47 -07:00
Lukas Geiger
e16cb1898c Add missing dependencies to fix internal build errors 2020-03-07 10:57:10 +00:00
A. Unique TensorFlower
d31ee0f233 Populate more error messages to the users.
PiperOrigin-RevId: 299445320
Change-Id: Ia0d02c25ac3254444f7293d60c912989ad77ee3c
2020-03-06 19:28:54 -08:00
A. Unique TensorFlower
ec60183838 Clean up profiler when exception happens.
PiperOrigin-RevId: 298788827
Change-Id: Ia420712cd0edf004aa4135cf45409d88528ed136
2020-03-06 19:28:44 -08:00
A. Unique TensorFlower
f56b9c0a25 Fix OSS windows paths for profiler.
PiperOrigin-RevId: 298760340
Change-Id: I1ab94dd92fa80ec8b9268cbb422b78d5dc68b9cb
2020-03-06 19:28:35 -08:00
A. Unique TensorFlower
b9c639a983 Save gzipped trace events json by default.
PiperOrigin-RevId: 298465129
Change-Id: I79bb7265d3e4ded84effd3218ecf62716df997c6
2020-03-06 19:28:25 -08:00
Thomas O'Malley
678dfa6780 Ignore training=None when passed during Functional API construction.
PiperOrigin-RevId: 299283031
Change-Id: I9a0654496fb403a304efca2d79f9cb1a56a2b3e5
2020-03-06 14:14:45 -08:00
Bixia Zheng
9bdf872734 Diable a test that fails on open source build to unblock the release.
PiperOrigin-RevId: 299389711
Change-Id: If4b4f18c6141101b7a7d3034a3e77a0eaabc8810
2020-03-06 13:37:28 -08:00
Katherine Wu
685de3e31e Undo changes to the input spec when RNN.unroll is True.
PiperOrigin-RevId: 298492355
Change-Id: I442ad2a23576cae8fa2fad02a27a199f13b159c1
2020-03-05 13:55:43 -08:00
A. Unique TensorFlower
248313a950 Eliminate tf.where call in updating running mean and average for batch norm in Keras. This unlocks the improvements promised by fusing updates into the CPU and GPU kernels.
Results for ResNet50 /w batch size 32 in eager mode on GTX 1080:

Before:  85 images/s (fp32),   81 images/s (fp16)
After:  101 images/s (fp32),   99 images/s (fp16)
PiperOrigin-RevId: 298927568
Change-Id: I2941bff5d19c7fdccad78bbb9c5df2fdcd2fc36a
2020-03-05 13:54:44 -08:00
Goldie Gadde
6215f357d3
Merge pull request from geetachavan1/cherrypicks_OTJ09
[r2.2:Cherrypick] Add experimental_make_distributed_values_from_function method to distribution strategy.
2020-03-05 13:10:42 -08:00
Goldie Gadde
91393747d9
Merge pull request from geetachavan1/cherrypicks_U98JY
[r2.2:Cherrypick] Change Keras batch normalization layer to use the running mean and average computation in fused_batch_norm.
2020-03-05 13:02:55 -08:00
Goldie Gadde
fbe1103eef
Merge pull request from geetachavan1/cherrypicks_5T7BT
[r2.2:Cherrypick] Reject code containing the for/else pattern, which is not being faithfully converted at the moment. This replaces silently incorrect behavior with a warning. Also whitelist known urllib module.
2020-03-05 13:01:31 -08:00
Goldie Gadde
ac922eee05
Merge pull request from tensorflow-jenkins/version-numbers-2.2.0rc0-27624
Update version numbers for TensorFlow 2.2.0-rc0
2020-03-05 12:59:57 -08:00
Goldie Gadde
ab205979bb
Merge pull request from geetachavan1/cherrypicks_7N7WT
[r2.2:Cherrypick] Export symbols with the characteristic `tf_` like `tf_git_version`.
2020-03-05 12:58:35 -08:00
Goldie Gadde
559bb53a44
Merge pull request from jaingaurav/cherry-2.2
Fixed remote handles to be ready when they are poisoned
2020-03-05 12:57:25 -08:00
Thomas O'Malley
d0b92c1904 Fix MultiWorkerMirroredStrategy validation in Model.fit
PiperOrigin-RevId: 299150128
Change-Id: Ie0ef99dcbd1afc91ad1a0e19c56638c5e48a7865
2020-03-05 12:32:22 -08:00
Lukas Geiger
022bbaa562 Remove unused includes 2020-03-05 17:27:07 +00:00
Lukas Geiger
c5b70618aa Remove @llvm-project//mlir:QuantOps dependency 2020-03-05 17:27:07 +00:00
Lukas Geiger
0d5bb1ef94 Split unroll_batch_matmul pass into own bazel build target 2020-03-05 17:27:00 +00:00
Amit Patankar
efc9004681 Export symbols with the characteristic tf_ like tf_git_version.
PiperOrigin-RevId: 298637569
Change-Id: I5a872a6e780c35b984e4c91d4e8ff133ad7d9bf0
2020-03-04 16:03:57 -08:00
TensorFlow Release Automation
2370944868 Update version numbers to 2.2.0-rc0 2020-03-04 15:03:37 -08:00
Thomas O'Malley
a79a039828 Frees up Model.fit to take advantage of async eager when no batch-level Callbacks are
passed.
For Datasets of unknown sizes, the first epoch will still block on each batch.
However, after the first epoch, the number of steps to run will be known, and
therefore these Datasets will be able to take advantage
of async eager as well.

Also fixes issue where the "steps" argument was not always passed correctly to
Callbacks (tested now in data_adapter_test)

PiperOrigin-RevId: 298728965
Change-Id: I430a6935ffc19718dab1be992f03a637d3ff4584
2020-03-04 12:27:25 -08:00
Eugene Brevdo
81023cfe30 [TF] Fix windows GPU build - revert absl update
Also:
* look for xla sources under org_tensorflow
* don't include absl strings:cord since the older version of absl lacks it.
PiperOrigin-RevId: 298638795
Change-Id: Ic85d55240aaa353db60bebea0f0919cbfc5208f1
2020-03-04 09:56:45 -08:00
Thomas O'Malley
3e550fbfb6 Allow missing labels when there is no loss / metric associated with them.
Also cleans up the LossesContainer and MetricsContainer class to use shared
logic.

PiperOrigin-RevId: 298674749
Change-Id: Iaac04d1038c41b1098c0af711c696350a8d7906f
2020-03-03 16:37:45 -08:00
Dan Moldovan
40588d5ffe Reject code containing the for/else pattern, which is not being faithfully converted at the moment. This replaces silently incorrect behavior with a warning. Also whitelist known urllib module.
PiperOrigin-RevId: 298586574
Change-Id: Idd9113ccc699eb6b13cd5ec76c563a79b20b7aef
2020-03-03 11:38:35 -08:00
A. Unique TensorFlower
c838134a3b Change Keras batch normalization layer to use the running mean and average computation in fused_batch_norm.
PiperOrigin-RevId: 298446605
Change-Id: I87466c847e6c3c54a5f16d9588c19a72e24b15eb
2020-03-03 11:26:16 -08:00
Ken Franko
6ea02a53c6 Add experimental_make_distributed_values_from_function method to distribution strategy.
PiperOrigin-RevId: 298445422
Change-Id: I907cf7808e5bedaf45adccf3b6355ccf219e4116
2020-03-03 10:28:32 -08:00
Gaurav Jain
ca879f6889 Roll-forward: Consolidate tensor handle data types
Fixed remote handles to be ready when they are poisoned

PiperOrigin-RevId: 298519389
Change-Id: Icd693a354639622705ff08d253acfbbd40013bc7
2020-03-02 23:21:11 -08:00
A. Unique TensorFlower
6c212dc330 Internal change
PiperOrigin-RevId: 298470987
Change-Id: I190a37e62a7419de541a2ded4aadeb1194de7bb3
2020-03-02 23:21:07 -08:00
Gaurav Jain
f97b7ba2bf Consolidate tensor handle data types
The separation between ready and non-ready TensorHandleData classes
caused a lot of mirroring logic to get quite messy, especially when
considering the waiting logic, which was duplicated in the main
TensorHandle class and the various TensorHandleData classes. In
addition, having these classes expose the same API was a bit cumbersome
since most APIs were not supported by the various types.

We instead keep simply two different types, a local and remote one.
Further, we move all the waiting logic out of the TensorHandle and have
it in the TensorHandleData. Since we no longer need to swap out the
tensor_handle_data_ pointer when moving to a ready state, we can replace
it with a variant and save ourselves a heap allocation.

The LocalTensorHandleData is optimized such that if a tensor is provided
it does not require mutex synchronization, for any of the member
operations.

The RemoteTensorHandleData no longer needs to support the delicate dance
of calling ReleaseRemoteTensorHandle(). However, for lazy remotes we set
the EagerContext to nullptr to indicate no deletion upon class
destruction is needed.

Along the way we also do the following performance optimizations:
* Change tensor handle construct to use move semantics. This avoids
  unnecessary Ref counts on the TensorBuffer.
* In sync, do not allocate empty TensorHandle and later call SetTensor.
  Instead, we allocate the return TensorHandles once the kernel has
  executed. This avoid the overhead synchronization when there is no
  need for it.
* Switch mirror maps to store tensor data direct vs using a unique_ptr.
  Also switch to unordered_map.

Additional clean-ups:
* Make TensorHandle APIs consistently take Device pointer as first
  argument.
* Remove CreateLocalTensorHandle function which could be confused with
  the one used for CustomDevice.
* Remove many unused includes.

PiperOrigin-RevId: 298423283
Change-Id: I838736396e9ef81b2de665d6d9a3ad2062070b0c
2020-03-02 13:04:04 -08:00
Katherine Wu
fc7116dd0d Serialize the state of stateful RNN layers. This enables saving and loading built-in layers from SavedModel.
PiperOrigin-RevId: 298421271
Change-Id: Ied896a158940716a37e8ab1cda659b84baf06ac7
2020-03-02 12:52:11 -08:00
Frank Chen
745eeb2e9e Refactor and pull out SnapshotReader and SnapshotReader for public SnapshotDataset implementation
PiperOrigin-RevId: 298419306
Change-Id: I6c137c4378ee4e26a6e76fdbf0787fcc01bd203a
2020-03-02 12:47:33 -08:00
Reed Wanderman-Milne
f0756e1c19 Various mixed precision doc improvements.
The primary changes are:
1. Use the >>> format for code samples. But I couldn't change the code in mixed_precision.py to use the >>> format, since an error is thrown if both the Keras mixed precision API and the graph rewrite API are used in the same process.
2. In the enable_mixed_precision_graph_rewrite docstring, compare the graph rewrite API with the Keras mixed precision API.
3. In the error message that occurs if you try to use both the graph rewrite and the Keras MP API, recommend the Keras API instead of the graph rewrite.
4. Add new sections to Policy docstring: "How a layer users its policy's variable dtype" and "How to write a layer that supports mixed precision and float64". The latter section might be more appropriate for the mixed precision guide, but the guide is already very long and its hard to fit in.

PiperOrigin-RevId: 298419101
Change-Id: I1936e1bcce401d02d4fdeb36b9866eb9cd40c421
2020-03-02 12:44:04 -08:00
TensorFlower Gardener
27348ebd06 Merge pull request from howl-anderson:typofix/typo_in_kerashistory
PiperOrigin-RevId: 298417054
Change-Id: I0f778078a9d417af49d6b401dc8dc679d94b810a
2020-03-02 12:40:00 -08:00
Robert David
ae2fe82448 SVDF: Do state shifting and clearing of last state separately, so state shifting can be done in a single loop.
PiperOrigin-RevId: 298417000
Change-Id: Ia8a6756ffcc1bb7f761755461c085c55511602bc
2020-03-02 12:34:06 -08:00
Yanping Huang
7c12dad5fd Assign original device names to _tpu_output_identity ops, similar to LN1409
PiperOrigin-RevId: 298413704
Change-Id: I1f97e08734645b850dc3e3df02829f8f9cc3050c
2020-03-02 12:20:29 -08:00
Yanhui Liang
90409c6a20 Fix timeout application tests.
PiperOrigin-RevId: 298411276
Change-Id: Id799ecdb1a1e3701fc545c8ad52b7cd55fc78c1a
2020-03-02 12:11:34 -08:00
Ken Franko
76758a2720 Add test for calling tpu initialization twice.
PiperOrigin-RevId: 298410647
Change-Id: I9d8d4ce45a58b26d18a7bb5fc0c54e1c7213c6a6
2020-03-02 12:07:19 -08:00
Jiho Choi
1ca83d81aa Hide internal stats in the trace viewer.
PiperOrigin-RevId: 298409447
Change-Id: Ia27b637bf8e469ba139cd672c86abc363d776fde
2020-03-02 12:02:48 -08:00
Sanjoy Das
847d6a8958 Avoid a footgun in KernelArgsArray
Do not store the address of a `const T&`.  Storing the address of a `const T&`
means add_argument(42) does not work, which very counter-intuitive.

PiperOrigin-RevId: 298405422
Change-Id: I769dfa8d7dad92b1e73b1a4f591768b4536cca39
2020-03-02 11:50:16 -08:00