platform/upstream/tensorflow.git
6 years agoMove if_op kernel to //third_party/tensorflow/compiler/tf2xla/kernels
A. Unique TensorFlower [Fri, 16 Mar 2018 20:00:31 +0000 (13:00 -0700)]
Move if_op kernel to //third_party/tensorflow/compiler/tf2xla/kernels

PiperOrigin-RevId: 189381067

6 years ago[XLA] BF16 conversion folding for CRS; remove no-op conversions in propagation.
Yuanzhong Xu [Fri, 16 Mar 2018 19:56:26 +0000 (12:56 -0700)]
[XLA] BF16 conversion folding for CRS; remove no-op conversions in propagation.

If CRS has tuple output, it needs special handling in conversion folding.
BF16 propagation could result in BF16->BF16 conversions, which can be removed.

PiperOrigin-RevId: 189380578

6 years agoBREAKING_CHANGE: Remove SigmoidCentered bijector.
A. Unique TensorFlower [Fri, 16 Mar 2018 19:55:18 +0000 (12:55 -0700)]
BREAKING_CHANGE: Remove SigmoidCentered bijector.
 - SoftmaxCentered solely works on vector events, and supports broadcasting.
 - Sigmoid exists for event_ndims=0 cases.

PiperOrigin-RevId: 189380445

6 years ago[XLA:python] Plumb hlo_profile flag.
Chris Leary [Fri, 16 Mar 2018 19:34:34 +0000 (12:34 -0700)]
[XLA:python] Plumb hlo_profile flag.

PiperOrigin-RevId: 189377860

6 years agoRemove empty buckets in latency_stats as it makes the report unreadable. This is...
A. Unique TensorFlower [Fri, 16 Mar 2018 19:12:52 +0000 (12:12 -0700)]
Remove empty buckets in latency_stats as it makes the report unreadable. This is also consistent with how SummaryHistoOp in summary_op.cc works.

PiperOrigin-RevId: 189375113

6 years ago[tf.data] Fix typo in `Dataset.prefetch()` docstring.
Derek Murray [Fri, 16 Mar 2018 19:11:18 +0000 (12:11 -0700)]
[tf.data] Fix typo in `Dataset.prefetch()` docstring.

PiperOrigin-RevId: 189374898

6 years ago[TF:XLA] Bump open source llvm revision to r327616
Sanjoy Das [Fri, 16 Mar 2018 18:53:14 +0000 (11:53 -0700)]
[TF:XLA] Bump open source llvm revision to r327616

PiperOrigin-RevId: 189372065

6 years agoAllow variable lists to change when saving repeatedly using tfe.Checkpoint
Allen Lavoie [Fri, 16 Mar 2018 18:47:26 +0000 (11:47 -0700)]
Allow variable lists to change when saving repeatedly using tfe.Checkpoint

For example allows saving a checkpoint before slot variables have been created

When graph building, restore() is still bound to a frozen set of variables.

PiperOrigin-RevId: 189371256

6 years agoSet number of threads at Java interpreter constructor so that Conv Kernels can be...
A. Unique TensorFlower [Fri, 16 Mar 2018 18:45:42 +0000 (11:45 -0700)]
Set number of threads at Java interpreter constructor so that Conv Kernels can be selected properly.
Remove setNumThreads in the Java API as its behavior is ambiguous.

PiperOrigin-RevId: 189370770

6 years agoFixing constant output arrays by inserting synthetic reshapes.
A. Unique TensorFlower [Fri, 16 Mar 2018 18:29:00 +0000 (11:29 -0700)]
Fixing constant output arrays by inserting synthetic reshapes.

PiperOrigin-RevId: 189368237

6 years agoAutomated g4 rollback of changelist 189346024
Frank Perbet [Fri, 16 Mar 2018 17:48:32 +0000 (10:48 -0700)]
Automated g4 rollback of changelist 189346024

PiperOrigin-RevId: 189361083

6 years agoFix naming BatchNorm_Fold//batch_norm_correction -> BatchNorm_Fold/batch_norm_correction.
A. Unique TensorFlower [Fri, 16 Mar 2018 17:29:11 +0000 (10:29 -0700)]
Fix naming BatchNorm_Fold//batch_norm_correction -> BatchNorm_Fold/batch_norm_correction.

PiperOrigin-RevId: 189358090

6 years agoFix sed invocation in copy_binary.py script for Mac.
Michael Case [Fri, 16 Mar 2018 17:23:41 +0000 (10:23 -0700)]
Fix sed invocation in copy_binary.py script for Mac.

Script was explicitly calling /bin/sed which was not being found on MacOS Kokoro builds.
Removing calling "sed" in script.

PiperOrigin-RevId: 189357296

6 years agoAdded StrContains, StartsWith, and EndsWith functions to str_util.h.
A. Unique TensorFlower [Fri, 16 Mar 2018 17:10:16 +0000 (10:10 -0700)]
Added StrContains, StartsWith, and EndsWith functions to str_util.h.
Marked contains, starts_with, ends_with, and consume StringPiece methods as deprecated.

This will allow tensorflow::StringPiece to be more easily replaced with absl::string_view (once the deprecated methods are removed) as absl::string_view does not contain those methods.

PiperOrigin-RevId: 189355316

6 years agoMove CreateSubProcess from test.h to subprocess.h
A. Unique TensorFlower [Fri, 16 Mar 2018 16:54:27 +0000 (09:54 -0700)]
Move CreateSubProcess from test.h to subprocess.h

PiperOrigin-RevId: 189353033

6 years agoEliminate use of grpc::CoreCodegenInterface, which is marked as an internal interface
A. Unique TensorFlower [Fri, 16 Mar 2018 16:53:20 +0000 (09:53 -0700)]
Eliminate use of grpc::CoreCodegenInterface, which is marked as an internal interface

PiperOrigin-RevId: 189352860

6 years agoDoc grammar and style fixes for macOS installation.
A. Unique TensorFlower [Fri, 16 Mar 2018 16:42:45 +0000 (09:42 -0700)]
Doc grammar and style fixes for macOS installation.

PiperOrigin-RevId: 189351224

6 years agoUpgrade gRPC version used in OSS Tensorflow
A. Unique TensorFlower [Fri, 16 Mar 2018 16:32:43 +0000 (09:32 -0700)]
Upgrade gRPC version used in OSS Tensorflow

PiperOrigin-RevId: 189349737

6 years agoMake the graph_editor C-API friendly: always construct ops with their inputs.
Frank Perbet [Fri, 16 Mar 2018 16:02:48 +0000 (09:02 -0700)]
Make the graph_editor C-API friendly: always construct ops with their inputs.

PiperOrigin-RevId: 189346024

6 years agoFix a typo in docstring for index_table_from_tensor.
A. Unique TensorFlower [Fri, 16 Mar 2018 15:59:02 +0000 (08:59 -0700)]
Fix a typo in docstring for index_table_from_tensor.

PiperOrigin-RevId: 189345585

6 years ago- Adds support for shared embedding layers (e.g. in RNNs), and shared Conv2D layers.
A. Unique TensorFlower [Fri, 16 Mar 2018 14:54:08 +0000 (07:54 -0700)]
- Adds support for shared embedding layers (e.g. in RNNs), and shared Conv2D layers.
- Some minor refactoring of internal structure in fisher_blocks and layer_collection

PiperOrigin-RevId: 189338874

6 years ago[XLA:python] Fix a bug where returning an status would not incref Py_None.
Chris Leary [Fri, 16 Mar 2018 14:40:49 +0000 (07:40 -0700)]
[XLA:python] Fix a bug where returning an status would not incref Py_None.

PiperOrigin-RevId: 189337748

6 years agoClean up and clarify the 'install from source' page.
A. Unique TensorFlower [Fri, 16 Mar 2018 12:53:38 +0000 (05:53 -0700)]
Clean up and clarify the 'install from source' page.

Remove reference to CUDA and cuDNN versions for 'install from source' from the 'install Linux' documentation. The 'install from source' should be the authoritative page for this.

PiperOrigin-RevId: 189328669

6 years ago[tf2xla] Introduce XlaTensorInfo
A. Unique TensorFlower [Fri, 16 Mar 2018 10:45:32 +0000 (03:45 -0700)]
[tf2xla] Introduce XlaTensorInfo

XlaTensorInfo is side-band data for Tensors. It can be used to store
information about Tensors that is not possible to store in the Tensor
itself.  The XlaTensorInfos are managed by XlaTensorInfoManager, which
is an Allocator, which allows it to release the TensorInfos when the
underlying Tensor is released.  Looking up an XlaTensorInfo for a
Tensor requires a hash table lookup. This implementation keeps this
off the fast path and only looks the tensorinfos up when they are
required.

PiperOrigin-RevId: 189319553

6 years agoDon't put quantization variables in EMA collection by default.
Suharsh Sivakumar [Fri, 16 Mar 2018 06:56:10 +0000 (23:56 -0700)]
Don't put quantization variables in EMA collection by default.

PiperOrigin-RevId: 189302082

6 years agoPropagate min-max when resolving constant Reshape op.
A. Unique TensorFlower [Fri, 16 Mar 2018 05:28:26 +0000 (22:28 -0700)]
Propagate min-max when resolving constant Reshape op.

PiperOrigin-RevId: 189296593

6 years agoAutomated g4 rollback of changelist 189234789
Gunhan Gulsoy [Fri, 16 Mar 2018 04:39:15 +0000 (21:39 -0700)]
Automated g4 rollback of changelist 189234789

PiperOrigin-RevId: 189293458

6 years agoImplement out of bounds behavior for gather in the HLO evaluator
Sanjoy Das [Fri, 16 Mar 2018 04:33:44 +0000 (21:33 -0700)]
Implement out of bounds behavior for gather in the HLO evaluator

This makes the OOB behavior of gather in the HLO evaluator consistent with
DynamicSlice while we figure out the semantics we want long term.

The HLO->HLO gather expander inherits the wrapping behavior of dynamic-slice
because it lowers the gather ops to loops of dynamic slices.

PiperOrigin-RevId: 189293175

6 years agoInternal cleanup.
A. Unique TensorFlower [Fri, 16 Mar 2018 01:22:09 +0000 (18:22 -0700)]
Internal cleanup.

PiperOrigin-RevId: 189278596

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Fri, 16 Mar 2018 00:46:39 +0000 (17:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 189274859

6 years agoSymbolic gradient optimization
Benoit Steiner [Thu, 15 Mar 2018 23:52:23 +0000 (16:52 -0700)]
Symbolic gradient optimization

PiperOrigin-RevId: 189268327

6 years agoAdd initial host transfer ops for XLA support for computation on the host during...
A. Unique TensorFlower [Thu, 15 Mar 2018 23:29:14 +0000 (16:29 -0700)]
Add initial host transfer ops for XLA support for computation on the host during a compiled computation.

PiperOrigin-RevId: 189265297

6 years agoClarifying when is it possible to use a tape while it is still active.
Alexandre Passos [Thu, 15 Mar 2018 22:58:44 +0000 (15:58 -0700)]
Clarifying when is it possible to use a tape while it is still active.

PiperOrigin-RevId: 189260773

6 years agoRename CreateXyzHlo utilities to MakeXyzHlo as discussed on cr/188968478; NFC
Sanjoy Das [Thu, 15 Mar 2018 22:47:09 +0000 (15:47 -0700)]
Rename CreateXyzHlo utilities to MakeXyzHlo as discussed on cr/188968478; NFC

The rationale here is that MakeXyzHlo is less likely to be confused with
HloInstruction::CreateXyz and we already have a convention of using a "Make"
prefix for ergonomic factory functions.
PiperOrigin-RevId: 189259036

6 years agoAutomated g4 rollback of changelist 189231636
A. Unique TensorFlower [Thu, 15 Mar 2018 22:44:56 +0000 (15:44 -0700)]
Automated g4 rollback of changelist 189231636

PiperOrigin-RevId: 189258641

6 years agoPass error reporter to file copy allocation,
A. Unique TensorFlower [Thu, 15 Mar 2018 22:29:39 +0000 (15:29 -0700)]
Pass error reporter to file copy allocation,
and avoid loading model from file twice

PiperOrigin-RevId: 189256489

6 years agoPIE binaries that depends on static libraries usually have text relocations in the...
A. Unique TensorFlower [Thu, 15 Mar 2018 22:16:38 +0000 (15:16 -0700)]
PIE binaries that depends on static libraries usually have text relocations in the final executable, which causes link warnings/errors (different linker behaves differently). The optimal way to fix this is to link the binary with shared library, however, the libraries are NVIDIA-proprietary, not all of them have shared version (for example: cuda_9_0/lib64/libculibos.a)

PiperOrigin-RevId: 189254317

6 years agoChange ParseAndVerifyModule to take a StringPiece; NFC
Sanjoy Das [Thu, 15 Mar 2018 21:53:52 +0000 (14:53 -0700)]
Change ParseAndVerifyModule to take a StringPiece; NFC

PiperOrigin-RevId: 189250126

6 years agoCheck for very large chunk sizes in WAV decoding
Pete Warden [Thu, 15 Mar 2018 21:45:34 +0000 (14:45 -0700)]
Check for very large chunk sizes in WAV decoding
Change how chunk sizes larger than 2GB are handled, since they're stored as
unsigned int32s, so there are lots of ways for conversions to confuse the
decoding logic. The new behavior is to fail with an error, since such
large WAV files are not common, and are unsupported by many readers.

PiperOrigin-RevId: 189248857

6 years agoAdds a GPU kernel registration for PlaceholderWithDefault, so we can avoid the issue
A. Unique TensorFlower [Thu, 15 Mar 2018 21:40:12 +0000 (14:40 -0700)]
Adds a GPU kernel registration for PlaceholderWithDefault, so we can avoid the issue
of using it with a registered GPU device without soft placement.

PiperOrigin-RevId: 189248024

6 years ago[Checkpointable] Make EagerIterator checkpointable.
Shivani Agrawal [Thu, 15 Mar 2018 21:38:25 +0000 (14:38 -0700)]
[Checkpointable] Make EagerIterator checkpointable.

Use object-based save/restore to make dataset/iterator checkpointable in eager mode, this could potentially be extended to graph mode as well.

PiperOrigin-RevId: 189247720

6 years agoInternal cleanup.
A. Unique TensorFlower [Thu, 15 Mar 2018 21:36:53 +0000 (14:36 -0700)]
Internal cleanup.

PiperOrigin-RevId: 189247461

6 years agoFix the HLO alias analysis and copy insertion to cope with the new kConditional instr...
A. Unique TensorFlower [Thu, 15 Mar 2018 21:27:04 +0000 (14:27 -0700)]
Fix the HLO alias analysis and copy insertion to cope with the new kConditional instruction.

PiperOrigin-RevId: 189245979

6 years agoFix a bug which caused slot variables to be shared when executing eagerly
Allen Lavoie [Thu, 15 Mar 2018 20:52:16 +0000 (13:52 -0700)]
Fix a bug which caused slot variables to be shared when executing eagerly

Threads the uid() name of a ResourceVariable through to the Optimizer. Tests
that slot variables are unique in several ways.

Previously ResourceVariable._shared_name was the Optimizer's slot key for a
variable, which for tfe.Variable() is just the non-uniquified name.

PiperOrigin-RevId: 189240115

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 15 Mar 2018 20:46:52 +0000 (13:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 189239161

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 15 Mar 2018 20:19:16 +0000 (13:19 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 189234789

6 years agoAdd mean-only FID and diagonal-covariance-only FID variants to TFGAN.
Surya Bhupatiraju [Thu, 15 Mar 2018 20:02:23 +0000 (13:02 -0700)]
Add mean-only FID and diagonal-covariance-only FID variants to TFGAN.

PiperOrigin-RevId: 189232299

6 years agoTFLite iOS Makefile: Disable SSE4.1 for x86_64 build.
Yu-Cheng Ling [Thu, 15 Mar 2018 20:01:28 +0000 (13:01 -0700)]
TFLite iOS Makefile: Disable SSE4.1 for x86_64 build.

PiperOrigin-RevId: 189232136

6 years agoMerge changes from github.
Jacques Pienaar [Thu, 15 Mar 2018 19:58:08 +0000 (12:58 -0700)]
Merge changes from github.

PiperOrigin-RevId: 189231636

6 years agoSmall code readability improvement.
Mustafa Ispir [Thu, 15 Mar 2018 19:54:42 +0000 (12:54 -0700)]
Small code readability improvement.

PiperOrigin-RevId: 189231130

6 years agoRemove underscore prefix from broadcast_gradient_args op.
Anna R [Thu, 15 Mar 2018 19:43:01 +0000 (12:43 -0700)]
Remove underscore prefix from broadcast_gradient_args op.

PiperOrigin-RevId: 189229472

6 years agoWarn when creating a `tf.InteractiveSession` if another is active.
Derek Murray [Thu, 15 Mar 2018 19:33:10 +0000 (12:33 -0700)]
Warn when creating a `tf.InteractiveSession` if another is active.

Fixes #13202 (as far as possible without breaking backwards compatibility).

PiperOrigin-RevId: 189228094

6 years agoClarify that in_nodes and in_edges includes control edges.
Benjamin Kramer [Thu, 15 Mar 2018 19:15:07 +0000 (12:15 -0700)]
Clarify that in_nodes and in_edges includes control edges.

PiperOrigin-RevId: 189225717

6 years agoAutomated g4 rollback of changelist 189110935
A. Unique TensorFlower [Thu, 15 Mar 2018 19:06:24 +0000 (12:06 -0700)]
Automated g4 rollback of changelist 189110935

PiperOrigin-RevId: 189224522

6 years ago[TF:XLA] Don't follow control dependencies for const analysis.
Benjamin Kramer [Thu, 15 Mar 2018 18:53:00 +0000 (11:53 -0700)]
[TF:XLA] Don't follow control dependencies for const analysis.

Those inputs are not actually required to be constants.

PiperOrigin-RevId: 189222308

6 years agoPrevent fusing activation functions that would remove non-discardable arrays.
A. Unique TensorFlower [Thu, 15 Mar 2018 18:24:46 +0000 (11:24 -0700)]
Prevent fusing activation functions that would remove non-discardable arrays.

PiperOrigin-RevId: 189217360

6 years ago[XLA:CPU] Fix the parallel task assignment to not parallelize dot operations.
Bixia Zheng [Thu, 15 Mar 2018 18:22:58 +0000 (11:22 -0700)]
[XLA:CPU] Fix the parallel task assignment to not parallelize dot operations.

The IR emitter currently generates incorrect code for parallelized dot
operations.

Add test cases to check for dot operation parallelization.

PiperOrigin-RevId: 189216963

6 years agoBroadcast Sub and Div from #17123 except for quantization.
A. Unique TensorFlower [Thu, 15 Mar 2018 18:19:32 +0000 (11:19 -0700)]
Broadcast Sub and Div from #17123 except for quantization.

PiperOrigin-RevId: 189216312

6 years agoRefactor and enable loop optimizer tests.
A. Unique TensorFlower [Thu, 15 Mar 2018 18:16:21 +0000 (11:16 -0700)]
Refactor and enable loop optimizer tests.

PiperOrigin-RevId: 189215781

6 years agoInternal change.
Alexandre Passos [Thu, 15 Mar 2018 18:03:42 +0000 (11:03 -0700)]
Internal change.

PiperOrigin-RevId: 189213372

6 years agoReally delete old checkpoints this time.
Allen Lavoie [Thu, 15 Mar 2018 17:54:42 +0000 (10:54 -0700)]
Really delete old checkpoints this time.

Follows up on cl/188187349, which fixed checkpoint management for tf.train.Saver
when executing eagerly. Except I was recreating the tf.train.Saver objects each
save, so tfe.Checkpoint and friends did not benefit from that change.

Keeps the same tf.train.Saver around when executing eagerly. This limits object
graph mutations just like when graph building; if there are complaints I can
assign to Saver._var_list instead, since eager tf.train.Saver is not specialized
to its var_list argument.

PiperOrigin-RevId: 189211552

6 years ago[XLA] Add --xla_hlo_profile_last_run flag to replay_computation.
Justin Lebar [Thu, 15 Mar 2018 17:39:55 +0000 (10:39 -0700)]
[XLA] Add --xla_hlo_profile_last_run flag to replay_computation.

When using replay_computation for profiling, you usually only want to
do one or two warmup runs and then profile the last run of your model.
This flag makes that possible.

PiperOrigin-RevId: 189208924

6 years agoTFE: Modify initialization of `ContextStack` to ensure eager context is kept.
Akshay Agrawal [Thu, 15 Mar 2018 17:26:13 +0000 (10:26 -0700)]
TFE: Modify initialization of `ContextStack` to ensure eager context is kept.

When eager execution is enabled in the main thread, the fact that it was
enabled is propagated to subsequently created threads. This
change ...

(1) ensures that the fact that eager was enabled is also propagated to the `ContextStack`, which is renamed to `_ContextSwitchStack`, for clarity;
(2) adds a `_ContextSwitchStack` object to `Context` as a member, removing the global `context_stack`.

PiperOrigin-RevId: 189206207

6 years ago add grpc service stub for TPUProfilerAnalysis
A. Unique TensorFlower [Thu, 15 Mar 2018 16:40:28 +0000 (09:40 -0700)]
  add grpc service stub for TPUProfilerAnalysis

PiperOrigin-RevId: 189198495

6 years agoEnable constant folding optimizations in loop bodies by copying constants across...
A. Unique TensorFlower [Thu, 15 Mar 2018 16:33:03 +0000 (09:33 -0700)]
Enable constant folding optimizations in loop bodies by copying constants across Enter nodes.

PiperOrigin-RevId: 189197514

6 years agoExpose setNumThreads in the Java API.
A. Unique TensorFlower [Thu, 15 Mar 2018 16:07:41 +0000 (09:07 -0700)]
Expose setNumThreads in the Java API.

PiperOrigin-RevId: 189193847

6 years agoDisable Add/AddN rewrite (temp).
A. Unique TensorFlower [Thu, 15 Mar 2018 15:37:21 +0000 (08:37 -0700)]
Disable Add/AddN rewrite (temp).

PiperOrigin-RevId: 189189997

6 years agoRemoved the pointer to model from interpreter.
A. Unique TensorFlower [Thu, 15 Mar 2018 15:09:08 +0000 (08:09 -0700)]
Removed the pointer to model from interpreter.

PiperOrigin-RevId: 189186901

6 years agoAdd ability to use feature_columns in KMeans Estimator.
A. Unique TensorFlower [Thu, 15 Mar 2018 13:56:23 +0000 (06:56 -0700)]
Add ability to use feature_columns in KMeans Estimator.

PiperOrigin-RevId: 189179304

6 years ago[SE] [XLA:GPU] Inform --xla_hlo_profile of the GPU's memory bandwidth.
Justin Lebar [Thu, 15 Mar 2018 09:22:17 +0000 (02:22 -0700)]
[SE] [XLA:GPU] Inform --xla_hlo_profile of the GPU's memory bandwidth.

Add a memory_bandwidth() property to StreamExecutor's DeviceDescription,
and use this in the GPU's --xla_hlo_profile.

PiperOrigin-RevId: 189157407

6 years agoEnable Add/AddN tree rewrite for symbolically equal shapes.
A. Unique TensorFlower [Thu, 15 Mar 2018 03:39:10 +0000 (20:39 -0700)]
Enable Add/AddN tree rewrite for symbolically equal shapes.

1) Rewrite a tree of Add/AddN ops with a single AddN,
   if all shapes are symbolically equal
2) Lookup shape properties using GraphProperties instead
   of direct access to Node attributes

PiperOrigin-RevId: 189131726

6 years agoInternal change.
Mingsheng Hong [Thu, 15 Mar 2018 03:35:42 +0000 (20:35 -0700)]
Internal change.

PiperOrigin-RevId: 189131526

6 years agoMake hash.h a public header.
A. Unique TensorFlower [Thu, 15 Mar 2018 03:23:36 +0000 (20:23 -0700)]
Make hash.h a public header.

PiperOrigin-RevId: 189130768

6 years agoAdd int64 to randomized tests.
Jacques Pienaar [Thu, 15 Mar 2018 03:07:38 +0000 (20:07 -0700)]
Add int64 to randomized tests.

PiperOrigin-RevId: 189129641

6 years agoCheckpointable: Add logic for late-naming of SaveableObjects
Allen Lavoie [Thu, 15 Mar 2018 02:03:28 +0000 (19:03 -0700)]
Checkpointable: Add logic for late-naming of SaveableObjects

Previously SaveableObjects returned by _gather_saveables_for_checkpoint ran into a sanity check for naming, and would otherwise have been saved under the wrong key. This change has _gather_saveables_for_checkpoint returning factories for SaveableObjects instead, which are either passed the object-based saving key or are called with no arguments when using the global name.

Variables didn't run into this, since the Saver was generating their names.

PiperOrigin-RevId: 189124512

6 years ago[XLA] Add a test for F32 -> U32 conversion
David Majnemer [Thu, 15 Mar 2018 02:02:29 +0000 (19:02 -0700)]
[XLA] Add a test for F32 -> U32 conversion

PiperOrigin-RevId: 189124355

6 years ago[tf.data] Fix Python shape inference for `tf.contrib.data.map_and_batch()`.
Derek Murray [Thu, 15 Mar 2018 01:39:25 +0000 (18:39 -0700)]
[tf.data] Fix Python shape inference for `tf.contrib.data.map_and_batch()`.

Previously, it would incorrectly report that all batches have the same size, not accounting for the possibility of the last batch being partial.

Fixes #17720.

PiperOrigin-RevId: 189121488

6 years agoTurn on strip_default_attrs in custom export strategy. Validated that the change...
A. Unique TensorFlower [Thu, 15 Mar 2018 01:06:25 +0000 (18:06 -0700)]
Turn on strip_default_attrs in custom export strategy. Validated that the change WAI on a local pipeline.

PiperOrigin-RevId: 189118106

6 years agoAutomated g4 rollback of changelist 189060958
A. Unique TensorFlower [Thu, 15 Mar 2018 00:08:35 +0000 (17:08 -0700)]
Automated g4 rollback of changelist 189060958

PiperOrigin-RevId: 189110935

6 years agoCheck for the value of the _XlaCompile boolean since xla often creates it with
Benoit Steiner [Thu, 15 Mar 2018 00:05:57 +0000 (17:05 -0700)]
Check for the value of the _XlaCompile boolean since xla often creates it with
the default value of false.

PiperOrigin-RevId: 189110514

6 years agoAutomated g4 rollback of changelist 189089672
Yifei Feng [Wed, 14 Mar 2018 23:20:13 +0000 (16:20 -0700)]
Automated g4 rollback of changelist 189089672

PiperOrigin-RevId: 189104013

6 years agoEnable async eager mode in python. Add some benchmarks.
A. Unique TensorFlower [Wed, 14 Mar 2018 23:03:54 +0000 (16:03 -0700)]
Enable async eager mode in python. Add some benchmarks.

PiperOrigin-RevId: 189101670

6 years agoAutomated g4 rollback of changelist 188525171
Andrew Harp [Wed, 14 Mar 2018 22:58:15 +0000 (15:58 -0700)]
Automated g4 rollback of changelist 188525171

PiperOrigin-RevId: 189100846

6 years agoAutomated g4 rollback of changelist 189071037
Pete Warden [Wed, 14 Mar 2018 22:36:32 +0000 (15:36 -0700)]
Automated g4 rollback of changelist 189071037

PiperOrigin-RevId: 189097692

6 years agoRe-phrase some tests in replicate_model_fn using parameterized tests.
Igor Saprykin [Wed, 14 Mar 2018 22:30:20 +0000 (15:30 -0700)]
Re-phrase some tests in replicate_model_fn using parameterized tests.

PiperOrigin-RevId: 189096779

6 years agoRemove underscore prefix from ref_identity op.
Anna R [Wed, 14 Mar 2018 22:25:53 +0000 (15:25 -0700)]
Remove underscore prefix from ref_identity op.

PiperOrigin-RevId: 189096108

6 years agoEnsure zeros constant created is dominated by Switch node of cond context.
Jacques Pienaar [Wed, 14 Mar 2018 22:02:20 +0000 (15:02 -0700)]
Ensure zeros constant created is dominated by Switch node of cond context.

All values entering control flow context either has to be via a switch or dominated by one.

PiperOrigin-RevId: 189092017

6 years agoAdding non-linear image warping ops to tf.contrib.image
A. Unique TensorFlower [Wed, 14 Mar 2018 21:47:40 +0000 (14:47 -0700)]
Adding non-linear image warping ops to tf.contrib.image

New ops are:
tf.contrib.image.sparse_image_warp, tf.contrib.image.dense_image_warp, and tf.contrib.image.interpolate_spline.

PiperOrigin-RevId: 189089672

6 years agoRename KMeans _parse_tensor_or_dict to _parse_features_if_necessary and add a unit...
A. Unique TensorFlower [Wed, 14 Mar 2018 21:34:15 +0000 (14:34 -0700)]
Rename KMeans _parse_tensor_or_dict to _parse_features_if_necessary and add a unit test.

PiperOrigin-RevId: 189087384

6 years agoRemoving underscore prefix from _enter and _ref_enter.
Anna R [Wed, 14 Mar 2018 21:07:43 +0000 (14:07 -0700)]
Removing underscore prefix from _enter and _ref_enter.

PiperOrigin-RevId: 189082871

6 years agoRemove nsync header files from tensorflow/core/platform/default/mutex.h
A. Unique TensorFlower [Wed, 14 Mar 2018 20:47:22 +0000 (13:47 -0700)]
Remove nsync header files from tensorflow/core/platform/default/mutex.h

The implementation of tensorflow/core/platform/default/mutex.h uses the nsync
library, so mutex.h has included nsync header files.

This has been awkward, because each TensorFlow build (bazel, cmake, make, plus
the instructions for compiling individual custom ops, on all the various
platforms) has needed to handle the include paths correctly, reaching into a
package that is downloaded separately from TensorFlow itself.

This change avoids that awkwardness, instead taking on two different
irritations:
- mutex.h now defines two structs that are large enough and aligned enough to
  contain an nsync_mu and an nsync_cv.  This is an abstraction violation,
  because TensorFlow's source should not need to know how big these data
  structures are.  However, this is unlikely to cause problems because:
  1) this is checked by a static assertion in mutex.cc, so we will notice
     immediately should a change be needed, and
  2) this will likely never fail because we have no intent of allowing nsync's
     data strcutures to get bigger.

- The methods of mutex and condition_variable can no longer be inlined, because
  that too would require mutex.h to include the nsync header files.  (Or we'd
  need to declare the nsync functions directly in mutex.h, which would be
  another abstraction violation.)   However, this is a small imposition
  because the overhead of a procedure call is typically small.

The assumption behind this CL is that these irritations are less important than
the ongoing frustration of maintaining the complex include path in multiple build
systems.

PiperOrigin-RevId: 189079523

6 years agoSet shard count to 4 for tensorflow/contrib/linalg:linear_operator_block_diag_test...
A. Unique TensorFlower [Wed, 14 Mar 2018 20:46:57 +0000 (13:46 -0700)]
Set shard count to 4 for tensorflow/contrib/linalg:linear_operator_block_diag_test to avoid timeouts

This was getting flaky timeouts because it was taking over 300s about 25% of the time.
This change increases the shard count to 4 to reduce the total elapsed time.
With 4 shards, the maximum time per shard is about 180s.

PiperOrigin-RevId: 189079453

6 years agoRemoving underscore prefix from _scalar_summary and _histogram_summary.
Anna R [Wed, 14 Mar 2018 20:11:57 +0000 (13:11 -0700)]
Removing underscore prefix from _scalar_summary and _histogram_summary.

PiperOrigin-RevId: 189073787

6 years agoFix tensorflow/python/eager:benchmarks_test.
Anna R [Wed, 14 Mar 2018 20:10:27 +0000 (13:10 -0700)]
Fix tensorflow/python/eager:benchmarks_test.

PiperOrigin-RevId: 189073615

6 years agoCheck for very large chunk sizes in WAV decoding
Pete Warden [Wed, 14 Mar 2018 19:53:30 +0000 (12:53 -0700)]
Check for very large chunk sizes in WAV decoding
Change how chunk sizes larger than 2GB are handled, since they're stored as
unsigned int32s, so there are lots of ways for conversions to confuse the
decoding logic. The new behavior is to fail with an error, since such
large WAV files are not common, and are unsupported by many readers.

PiperOrigin-RevId: 189071037

6 years ago[TF:XLA] Bump open source llvm revision to r327491
Sanjoy Das [Wed, 14 Mar 2018 19:46:43 +0000 (12:46 -0700)]
[TF:XLA] Bump open source llvm revision to r327491

PiperOrigin-RevId: 189069844

6 years agoAdd test in select and scatter to test tie breaking logic.
Yunxing Dai [Wed, 14 Mar 2018 19:31:55 +0000 (12:31 -0700)]
Add test in select and scatter to test tie breaking logic.

- Add test in select and scatter to test we break ties by lexicographical order.
- Fix reference util to break ties by lexicographical order.
- Fix evaluator to break ties by lexicographical order.
RELNOTES: select and scatter in reference util and evaluator now uses lexicographical order to break ties.
PiperOrigin-RevId: 189067946

6 years agoJava: Released 1.7.0-rc0
Asim Shankar [Wed, 14 Mar 2018 19:30:22 +0000 (12:30 -0700)]
Java: Released 1.7.0-rc0

PiperOrigin-RevId: 189067733

6 years ago[XLA] Add XlaBuilder. This is the first step of implementing the client-service inter...
A. Unique TensorFlower [Wed, 14 Mar 2018 18:49:04 +0000 (11:49 -0700)]
[XLA] Add XlaBuilder. This is the first step of implementing the client-service interface redesign. Implemented ops: Add, Call, Constant, Parameter.

PiperOrigin-RevId: 189061445

6 years agoMove StringPieceHasher from stringpiece.h to hash.h (where there is already a hash...
A. Unique TensorFlower [Wed, 14 Mar 2018 18:46:22 +0000 (11:46 -0700)]
Move StringPieceHasher from stringpiece.h to hash.h (where there is already a hash<StringPiece>).

PiperOrigin-RevId: 189060958