platform/upstream/tensorflow.git
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

6 years agoSmall portability fixes to build scripts.
A. Unique TensorFlower [Wed, 14 Mar 2018 18:45:37 +0000 (11:45 -0700)]
Small portability fixes to build scripts.

PiperOrigin-RevId: 189060812

6 years agoInclude test_ops_kernels in main TF build rule.
Skye Wanderman-Milne [Wed, 14 Mar 2018 18:32:01 +0000 (11:32 -0700)]
Include test_ops_kernels in main TF build rule.

We already include the test_ops Python library. Without the
corresponding C++ library, these ops can't be created with the C API
enabled.

PiperOrigin-RevId: 189058853

6 years agoImplement partial constant folding for Concat.
A. Unique TensorFlower [Wed, 14 Mar 2018 18:14:23 +0000 (11:14 -0700)]
Implement partial constant folding for Concat.

PiperOrigin-RevId: 189055561

6 years agoAdd ScopedAllocator and ScopedAllocatorMgr.
Ayush Dubey [Wed, 14 Mar 2018 17:55:11 +0000 (10:55 -0700)]
Add ScopedAllocator and ScopedAllocatorMgr.

A ScopedAllocator is a new memory allocator which manages slices of a large
tensor.  ScopedAllocatorMgr manages all scoped allocators per device.  The
ScopedAllocatorMgr comprises of multiple ScopedAllocatorContainers, one per
step id.  If a step terminates abnormally, the corresponding
ScopedAllocatorContainer will clean up all allocated memory in that step.

PiperOrigin-RevId: 189051914

6 years agoExtend reduce_ops test to integers.
Jacques Pienaar [Wed, 14 Mar 2018 17:39:41 +0000 (10:39 -0700)]
Extend reduce_ops test to integers.

PiperOrigin-RevId: 189049525

6 years agoAdd interface in HloModuleGroupMetadata to return all channels
HyoukJoong Lee [Wed, 14 Mar 2018 17:07:34 +0000 (10:07 -0700)]
Add interface in HloModuleGroupMetadata to return all channels

PiperOrigin-RevId: 189044541

6 years agoCheck for the value of the _XlaCompile boolean since xla often creates it with
Benoit Steiner [Wed, 14 Mar 2018 16:47:47 +0000 (09:47 -0700)]
Check for the value of the _XlaCompile boolean since xla often creates it with
the default value of false.

PiperOrigin-RevId: 189041421

6 years agoRemoved stray/dead code that snuck in there in an earlier change.
Rachel Lim [Wed, 14 Mar 2018 15:51:14 +0000 (08:51 -0700)]
Removed stray/dead code that snuck in there in an earlier change.

PiperOrigin-RevId: 189034502

6 years agoSupport for the Is and IsNot comparator nodes
A. Unique TensorFlower [Wed, 14 Mar 2018 14:01:56 +0000 (07:01 -0700)]
Support for the Is and IsNot comparator nodes

PiperOrigin-RevId: 189022386

6 years agoTest use of tensor_list inside loops, as well as changing the contained type of a...
A. Unique TensorFlower [Wed, 14 Mar 2018 13:51:58 +0000 (06:51 -0700)]
Test use of tensor_list inside loops, as well as changing the contained type of a tensor_list inside of a loop.

PiperOrigin-RevId: 189021593

6 years agoFix std::accumulate init value in xla::Product
A. Unique TensorFlower [Wed, 14 Mar 2018 13:26:13 +0000 (06:26 -0700)]
Fix std::accumulate init value in xla::Product

The return type for std::accumulate is determined by the type of the
init value what was incorrect resulting in wrong result for large
numbers.

PiperOrigin-RevId: 189019412

6 years ago[TF:XLA] Add compiler fuel to mark_for_compilation_pass.
Justin Lebar [Wed, 14 Mar 2018 10:46:37 +0000 (03:46 -0700)]
[TF:XLA] Add compiler fuel to mark_for_compilation_pass.

This is a useful debugging tool.

PiperOrigin-RevId: 189007771

6 years ago[XLA] Supports fusion ops in HloEvaluator.
Kay Zhu [Wed, 14 Mar 2018 06:24:00 +0000 (23:24 -0700)]
[XLA] Supports fusion ops in HloEvaluator.

PiperOrigin-RevId: 188985924

6 years agoAvoid live lock in a loop.
Yao Zhang [Wed, 14 Mar 2018 03:39:23 +0000 (20:39 -0700)]
Avoid live lock in a loop.

PiperOrigin-RevId: 188973527

6 years agoAdd LinearOperatorBlockDiagonal, which supports matrix-free block diagonal structure.
A. Unique TensorFlower [Wed, 14 Mar 2018 03:20:05 +0000 (20:20 -0700)]
Add LinearOperatorBlockDiagonal, which supports matrix-free block diagonal structure.

Also update linear_operator_util_test to support passing in multiple shapes.

PiperOrigin-RevId: 188972221

6 years ago[tf.data] Support tf.SparseTensor components in tf.contrib.data.get_single_element().
Derek Murray [Wed, 14 Mar 2018 02:58:22 +0000 (19:58 -0700)]
[tf.data] Support tf.SparseTensor components in tf.contrib.data.get_single_element().

PiperOrigin-RevId: 188970548

6 years agoAdd a GatherExpander pass that can rewrite Gather ops back into HLO soup
Sanjoy Das [Wed, 14 Mar 2018 02:26:23 +0000 (19:26 -0700)]
Add a GatherExpander pass that can rewrite Gather ops back into HLO soup

With this pass we now have a minimal viable implementation of gather on all
platforms.  The code is a bit gnarly but conceptually this is very similar to
what we do in the tf2xla bridge today.

PiperOrigin-RevId: 188968478

6 years ago Adds R2 ReduceWindow test and generalizes the R2 test suite, particularly to
Tayo Oguntebi [Wed, 14 Mar 2018 02:00:06 +0000 (19:00 -0700)]
  Adds R2 ReduceWindow test and generalizes the R2 test suite, particularly to
  allow arbitary padding.

PiperOrigin-RevId: 188966155

6 years agoAdd ops to API that have tf_export decorators but haven't been added to API.
Anna R [Wed, 14 Mar 2018 01:50:03 +0000 (18:50 -0700)]
Add ops to API that have tf_export decorators but haven't been added to API.

PiperOrigin-RevId: 188965158

6 years agoRemove underscore prefix from _concat.
Anna R [Wed, 14 Mar 2018 01:36:56 +0000 (18:36 -0700)]
Remove underscore prefix from _concat.

PiperOrigin-RevId: 188964168

6 years ago[XLA] Handle scalar predicate in Select correctly in HloEvaluator.
Kay Zhu [Wed, 14 Mar 2018 01:12:43 +0000 (18:12 -0700)]
[XLA] Handle scalar predicate in Select correctly in HloEvaluator.

Previously the HloEvaluator would always assume the predicate is an array of
boolean type, and does not handle cases where on_true and on_false are of Tuple
types. This change fixes both and in turn removes the last blocker in full
tuple support in the evaluator.

Also enables xla/tests:tuple_test and xla/tests:deconstruct_tuple_test for the interpreter.

PiperOrigin-RevId: 188962022

6 years agoAutomated g4 rollback of changelist 188937484
Gunhan Gulsoy [Wed, 14 Mar 2018 00:32:26 +0000 (17:32 -0700)]
Automated g4 rollback of changelist 188937484

PiperOrigin-RevId: 188957662

6 years agoTranspose test updated so that unsupported transpose is not optimized away.
A. Unique TensorFlower [Wed, 14 Mar 2018 00:27:08 +0000 (17:27 -0700)]
Transpose test updated so that unsupported transpose is not optimized away.

PiperOrigin-RevId: 188956982

6 years agoChange the way we get argument list for get_local_variable. Current documentation...
Anna R [Wed, 14 Mar 2018 00:23:09 +0000 (17:23 -0700)]
Change the way we get argument list for get_local_variable. Current documentation for get_local_variable displays arguments as *args and **kwargs: https://tensorflow.org/versions/r1.3/api_docs/python/tf/get_local_variable .
Current decorator also doesn't play well with @tf_export decorator.
So I am switching to approach that adds __wrapped__ variable to get_local_variable so that we can get argument list from __wrapped__ function.

PiperOrigin-RevId: 188956520

6 years agotfdbg: split session_debug_grpc_test
Shanqing Cai [Wed, 14 Mar 2018 00:11:56 +0000 (17:11 -0700)]
tfdbg: split session_debug_grpc_test

* so that the test sizes are medium for both the existing session_debug_grpc_test
  and the new grpc_large_data_test

Also in this CL
* Consolidate the functions for creating no-grappler-rewrite ConfigProtos
  in one place: in session_debug_testlib.py

PiperOrigin-RevId: 188955135

6 years agoAdded tf.contrib.data.make_csv_dataset as a convenience method to create a
Rachel Lim [Wed, 14 Mar 2018 00:07:16 +0000 (17:07 -0700)]
Added tf.contrib.data.make_csv_dataset as a convenience method to create a
dataset from csv files.

PiperOrigin-RevId: 188954555

6 years agoIntroduce _USE_C_SHAPES toggle along with _USE_C_API toggle.
Skye Wanderman-Milne [Tue, 13 Mar 2018 23:31:14 +0000 (16:31 -0700)]
Introduce _USE_C_SHAPES toggle along with _USE_C_API toggle.

This is a second level of staging before fully enabling the C
API. With _USE_C_API enabled but _USE_C_SHAPES disabled, the C API is
used for everything but retrieving the shape of Tensors (i.e. we
continue using the existing Python shape inference to implement
Tensor.shape).

This is useful because many tests fail with the C API fully
enabled. This will allow us to enable everything but the full shape
inference, fix the remaining broken tests, and then enable the full
shape shape inference.

This change also introduces the test_util.enable_c_shapes test method
decorator. This can be used to enable C shapes for a specific test
method. This is useful for tests that have already been modified to
work with full C shape inference.

PiperOrigin-RevId: 188949619

6 years agoCurrently, multi-image summaries have their image indices removed and so they show...
A. Unique TensorFlower [Tue, 13 Mar 2018 23:16:43 +0000 (16:16 -0700)]
Currently, multi-image summaries have their image indices removed and so they show up as a single summary (you have to use the timeline bar to cycle between the several images for the same step). This CL separates them to give the normal/expected behavior for image summaries where max_outputs > 1 (multiple images displayed simultaneously).

PiperOrigin-RevId: 188947797

6 years ago[XLA]: Enhancement to the while loop simplifier HLO pass.
Bixia Zheng [Tue, 13 Mar 2018 23:01:42 +0000 (16:01 -0700)]
[XLA]: Enhancement to the while loop simplifier HLO pass.

If a while-loop tuple element is initialized as a scalar constant and isn't
changed by the while-body, replace the use of the tuple element in
while-condition and while-body with the constant value. This enables the
simplification of while-loops that have 0/1 iteration and loop bound passed in
through the while-loop tuple.

Add test cases for while-loops with 0/1 iteration and loop bound passed in
through the while-loop tuple.

PiperOrigin-RevId: 188945375

6 years agoAdd test for API generated with tf_export calls to api_compatibility_test.py.
Anna R [Tue, 13 Mar 2018 22:51:36 +0000 (15:51 -0700)]
Add test for API generated with tf_export calls to api_compatibility_test.py.
Also, fix remaining differences between this new API and the current TensorFlow
API.

PiperOrigin-RevId: 188943768

6 years agoMerged commit includes the following changes:
A. Unique TensorFlower [Tue, 13 Mar 2018 22:42:34 +0000 (15:42 -0700)]
Merged commit includes the following changes:
188942386  by mikecase:

    Internal Change.

--
188941669  by A. Unique TensorFlower:

    Change TensorFlow Lite Java Interpreter to use Checker Framework @NonNull annotation

--
188937484  by zhixianyan:

    Convert saved_model to tflite flatbuffer.

--

PiperOrigin-RevId: 188942386

6 years agoResubmit changes which were accidentally rolled back.
Alexandre Passos [Tue, 13 Mar 2018 21:52:43 +0000 (14:52 -0700)]
Resubmit changes which were accidentally rolled back.

PiperOrigin-RevId: 188934018

6 years agoFix a couple of null-ptr dereferences
A. Unique TensorFlower [Tue, 13 Mar 2018 21:22:16 +0000 (14:22 -0700)]
Fix a couple of null-ptr dereferences

PiperOrigin-RevId: 188929375

6 years agoInternal Google Cleanup
A. Unique TensorFlower [Tue, 13 Mar 2018 20:31:52 +0000 (13:31 -0700)]
Internal Google Cleanup

PiperOrigin-RevId: 188921801

6 years agoBreak the dependency between platform/types.h and bfloat16.h, and between
A. Unique TensorFlower [Tue, 13 Mar 2018 20:24:30 +0000 (13:24 -0700)]
Break the dependency between platform/types.h and bfloat16.h, and between
hash.h and bfloat16.h. This change introduces a generic mechanism for adapting
types that are meant to be used in tensorflow's error objects.

PiperOrigin-RevId: 188920678

6 years agoMove session info into op info.
Yuefeng Zhou [Tue, 13 Mar 2018 19:29:55 +0000 (12:29 -0700)]
Move session info into op info.

PiperOrigin-RevId: 188912426

6 years agoRemoving hidden_ops.txt file.
Anna R [Tue, 13 Mar 2018 19:26:35 +0000 (12:26 -0700)]
Removing hidden_ops.txt file.

PiperOrigin-RevId: 188911958

6 years agoEnable int8 tf.pad on GPU.
Jingyue Wu [Tue, 13 Mar 2018 19:25:56 +0000 (12:25 -0700)]
Enable int8 tf.pad on GPU.

PiperOrigin-RevId: 188911859

6 years ago[TF:XLA] Bump open source llvm revision to r327373
Sanjoy Das [Tue, 13 Mar 2018 19:04:05 +0000 (12:04 -0700)]
[TF:XLA] Bump open source llvm revision to r327373

PiperOrigin-RevId: 188908427

6 years agoInternal cleanup.
A. Unique TensorFlower [Tue, 13 Mar 2018 18:46:05 +0000 (11:46 -0700)]
Internal cleanup.

PiperOrigin-RevId: 188905507

6 years agoProper name scoping in contrib summaries.
Alexandre Passos [Tue, 13 Mar 2018 18:43:39 +0000 (11:43 -0700)]
Proper name scoping in contrib summaries.

PiperOrigin-RevId: 188905080

6 years agoChange back TFE_Execute logic to set '*num_retvals' on return.
A. Unique TensorFlower [Tue, 13 Mar 2018 18:36:28 +0000 (11:36 -0700)]
Change back TFE_Execute logic to set '*num_retvals' on return.

PiperOrigin-RevId: 188903892

6 years agoAdd TransformShardedTileShape helper method to HloSharding
A. Unique TensorFlower [Tue, 13 Mar 2018 18:34:23 +0000 (11:34 -0700)]
Add TransformShardedTileShape helper method to HloSharding

It transforms an existing sharding to be compatible with a new shape
with an optional transform method to adjust the tile size for the
sharded dimensions.

PiperOrigin-RevId: 188903257

6 years agoAutomated g4 rollback of changelist 188353354
A. Unique TensorFlower [Tue, 13 Mar 2018 18:30:20 +0000 (11:30 -0700)]
Automated g4 rollback of changelist 188353354

PiperOrigin-RevId: 188902517

6 years agoReplace the unknown dimension of signature input when building grappler items.
Yuefeng Zhou [Tue, 13 Mar 2018 18:27:46 +0000 (11:27 -0700)]
Replace the unknown dimension of signature input when building grappler items.
Fix the bug where same feed nodes or fetch nodes would be added more than once.

PiperOrigin-RevId: 188902101

6 years agoEnable arithmetic optimizations for Fill nodes that are all zeros or ones.
A. Unique TensorFlower [Tue, 13 Mar 2018 17:39:33 +0000 (10:39 -0700)]
Enable arithmetic optimizations for Fill nodes that are all zeros or ones.

PiperOrigin-RevId: 188893722

6 years agoAdd TFLite Interpreter bindings.
A. Unique TensorFlower [Tue, 13 Mar 2018 17:22:53 +0000 (10:22 -0700)]
Add TFLite Interpreter bindings.

PiperOrigin-RevId: 188890943

6 years agoPerforming the finalization of the LayerCollection outside of FisherEstimator's const...
A. Unique TensorFlower [Tue, 13 Mar 2018 17:13:45 +0000 (10:13 -0700)]
Performing the finalization of the LayerCollection outside of FisherEstimator's constructor.  This allows layers and losses to be registered after the FisherEstimator (or KFACOptimizer) has been constructed.

PiperOrigin-RevId: 188889252

6 years agoinclude the graph.pb->tensorboard script in pip package
Mark Daoust [Tue, 13 Mar 2018 17:09:03 +0000 (10:09 -0700)]
include the graph.pb->tensorboard script in pip package

This will allow you to run it with:

`python -m tensorflow.python.tools.import_pb_to_tensorboard ...`

Without any additional downloads or setup.

see #8854

PiperOrigin-RevId: 188888501

6 years agoInternal change
A. Unique TensorFlower [Tue, 13 Mar 2018 16:11:14 +0000 (09:11 -0700)]
Internal change

PiperOrigin-RevId: 188880419

6 years ago[TFLite] Don't always treat inputs and outputs as encoded floats.
Eugene Brevdo [Tue, 13 Mar 2018 16:09:57 +0000 (09:09 -0700)]
[TFLite] Don't always treat inputs and outputs as encoded floats.

PiperOrigin-RevId: 188880237

6 years agoIntroduce output fusion for (A dot B) * alpha
A. Unique TensorFlower [Tue, 13 Mar 2018 15:49:17 +0000 (08:49 -0700)]
Introduce output fusion for (A dot B) * alpha

We allow now to fuse (A dot B) times a constant, which is available in cublas.

PiperOrigin-RevId: 188878210

6 years agoPiperOrigin-RevId: 188860028
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId: 188860028

6 years agotfdbg: add reference to the TensorBoard Debugger Plugin in README.md
Shanqing Cai [Tue, 13 Mar 2018 05:38:48 +0000 (22:38 -0700)]
tfdbg: add reference to the TensorBoard Debugger Plugin in README.md
PiperOrigin-RevId: 188828898

6 years agoPiperOrigin-RevId: 188860028
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId: 188860028

6 years agotfdbg: add reference to the TensorBoard Debugger Plugin in README.md
Shanqing Cai [Tue, 13 Mar 2018 05:38:48 +0000 (22:38 -0700)]
tfdbg: add reference to the TensorBoard Debugger Plugin in README.md
PiperOrigin-RevId: 188828898