platform/upstream/tensorflow.git
6 years agoDepthwiseConv optimizations.
A. Unique TensorFlower [Fri, 25 May 2018 17:54:38 +0000 (10:54 -0700)]
DepthwiseConv optimizations.

PiperOrigin-RevId: 198071709

6 years agoLink to tf.estimator docs for premade estimators.
Mark Daoust [Fri, 25 May 2018 17:45:27 +0000 (10:45 -0700)]
Link to tf.estimator docs for premade estimators.

PiperOrigin-RevId: 198070157

6 years agoCode simplification in dump_graphviz.cc:
A. Unique TensorFlower [Fri, 25 May 2018 15:55:24 +0000 (08:55 -0700)]
Code simplification in dump_graphviz.cc:
Just output all arrays, before writing edges, so we don't
need to keep track of which arrays we've already output.

PiperOrigin-RevId: 198055327

6 years agoMinor clarification to model_to_estimator() doc string
Shanqing Cai [Fri, 25 May 2018 13:56:38 +0000 (06:56 -0700)]
Minor clarification to model_to_estimator() doc string

PiperOrigin-RevId: 198044106

6 years agoeager: Update introduction notebooks.
Asim Shankar [Fri, 25 May 2018 09:23:06 +0000 (02:23 -0700)]
eager: Update introduction notebooks.

PiperOrigin-RevId: 198022387

6 years agoFix typo, fix build.
Asim Shankar [Fri, 25 May 2018 08:36:23 +0000 (01:36 -0700)]
Fix typo, fix build.

PiperOrigin-RevId: 198017870

6 years agoExtracts the 'simplify tile node' optimization into its own method.
A. Unique TensorFlower [Fri, 25 May 2018 03:36:45 +0000 (20:36 -0700)]
Extracts the 'simplify tile node' optimization into its own method.

PiperOrigin-RevId: 197996636

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Fri, 25 May 2018 02:49:05 +0000 (19:49 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 197993384

6 years agoInitialize the score threshold to -inf to avoid filtering out negative logits
A. Unique TensorFlower [Fri, 25 May 2018 02:45:27 +0000 (19:45 -0700)]
Initialize the score threshold to -inf to avoid filtering out negative logits

PiperOrigin-RevId: 197993147

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Fri, 25 May 2018 02:20:31 +0000 (19:20 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 197991672

6 years agoMerge changes from github.
Yifei Feng [Fri, 25 May 2018 02:12:26 +0000 (19:12 -0700)]
Merge changes from github.
Revert #18413. Too many internal test failures due to the name scope change caused by this change.
Revert #18192. Cannot use re2::StringPiece internally. Need alternative for set call. Will pull and clean this up in a separate change.

PiperOrigin-RevId: 197991247

6 years agoExtracts the 'simplify pad node' optimization into its own method.
A. Unique TensorFlower [Fri, 25 May 2018 01:55:30 +0000 (18:55 -0700)]
Extracts the 'simplify pad node' optimization into its own method.

PiperOrigin-RevId: 197989813

6 years agoRename TileLoader to MemoryTile; NFC
Sanjoy Das [Fri, 25 May 2018 01:23:48 +0000 (18:23 -0700)]
Rename TileLoader to MemoryTile; NFC

In a later change I will expand MemoryTile to store tiles and load "3d" tiles
(where we broadcast along one dimension as we load).

PiperOrigin-RevId: 197987185

6 years agoAdd heuristic on picking NHWC layout for (V100, fp16) convolutions.
A. Unique TensorFlower [Fri, 25 May 2018 00:48:21 +0000 (17:48 -0700)]
Add heuristic on picking NHWC layout for (V100, fp16) convolutions.

Also move AlgorithmPicker after layout assignment, as now
cudnn_convolution_runner will return failures on invalid input layouts.

Also add a backend debug option to switch the layout heuristic. By default
it has the old behavior (all NCHW).

PiperOrigin-RevId: 197983747

6 years agoEnabling some potential optimization using the restrict qualifier.
A. Unique TensorFlower [Fri, 25 May 2018 00:06:34 +0000 (17:06 -0700)]
Enabling some potential optimization using the restrict qualifier.

PiperOrigin-RevId: 197979118

6 years agoWhen converting a numpy float64 to an EagerTensor, always ensure that it
Akshay Modi [Thu, 24 May 2018 23:53:33 +0000 (16:53 -0700)]
When converting a numpy float64 to an EagerTensor, always ensure that it
becomes a float64 tensor.

Earlier py_seq_tensor would fall back to a float32 if not explicitly requesting
a float64 (which would not happen if we had no other information).

PiperOrigin-RevId: 197977260

6 years agoDon't XLA-compile naked variable reads
Igor Ganichev [Thu, 24 May 2018 23:44:17 +0000 (16:44 -0700)]
Don't XLA-compile naked variable reads

Before this change, when we executed a naked variable read (i.e. outside of
a defun, directly running <xla_device>->Compute()), tf2xla kernel would
copy the variable's tensor leading to many unnecessary copies.

This change uses the regular non-tf2xla kernel for naked variable reads
and marks the tf2xla one for CompilationOnly().

PiperOrigin-RevId: 197976146

6 years agomove wide string manipulations out of windows_file_system
A. Unique TensorFlower [Thu, 24 May 2018 23:31:48 +0000 (16:31 -0700)]
move wide string manipulations out of windows_file_system

PiperOrigin-RevId: 197974385

6 years agoRemove _get_backward_fn and depend on _gradient_function directly.
Akshay Modi [Thu, 24 May 2018 23:20:31 +0000 (16:20 -0700)]
Remove _get_backward_fn and depend on _gradient_function directly.

(_magic_gradient_function was renamed to _gradient_function)

Before:
entry {
  name: "MicroBenchmarks.benchmark_tf_gradient_forward_identity"
  iters: 30000
  wall_time: 5.88456789653
  extras {
    key: "examples_per_sec"
    value {
      double_value: 169936.011885
    }
  }
}

After:
entry {
  name: "MicroBenchmarks.benchmark_tf_gradient_forward_identity"
  iters: 30000
  wall_time: 5.04853725433
  extras {
    key: "examples_per_sec"
    value {
      double_value: 198077.175551
    }
  }
}
PiperOrigin-RevId: 197972668

6 years agoFix the generated builtin_ops enum header.
Yu-Cheng Ling [Thu, 24 May 2018 23:02:11 +0000 (16:02 -0700)]
Fix the generated builtin_ops enum header.

PiperOrigin-RevId: 197969642

6 years agoExtracts the 'simplify squeeze node' optimization into its own method.
A. Unique TensorFlower [Thu, 24 May 2018 22:53:44 +0000 (15:53 -0700)]
Extracts the 'simplify squeeze node' optimization into its own method.

PiperOrigin-RevId: 197968452

6 years ago[XLA] Remove maps with a single instruction
David Majnemer [Thu, 24 May 2018 22:45:25 +0000 (15:45 -0700)]
[XLA] Remove maps with a single instruction

These maps aren't really pulling their weight, fold them to the instruction
that they compute.

PiperOrigin-RevId: 197967117

6 years agoAvoid infinite recursion when checking for indexed slices.
Priya Gupta [Thu, 24 May 2018 22:35:13 +0000 (15:35 -0700)]
Avoid infinite recursion when checking for indexed slices.

PiperOrigin-RevId: 197965508

6 years agoAllow combinations to be used on the class level. Make "mode" optional.
Igor Saprykin [Thu, 24 May 2018 22:28:03 +0000 (15:28 -0700)]
Allow combinations to be used on the class level.  Make "mode" optional.

Applying a generator to a class is the same as applying that generator to every member of that class.  It is meant to allow avoiding repetition in some cases.

The implementation relies on some internals of parameterized tests and how it works with a class level declaration:  https://github.com/abseil/abseil-py/blob/master/absl/testing/parameterized.py#L319.

The "mode" argument is required before this change.  To accommodate cases where execution mode isn't the point of the test, "mode" became optional with "graph" mode being default.  Another idea I had was to pick a random mode by default.

PiperOrigin-RevId: 197964501

6 years agoAdd local_init_run_options to SessionManager and Supervisor so that
A. Unique TensorFlower [Thu, 24 May 2018 22:27:00 +0000 (15:27 -0700)]
Add local_init_run_options to SessionManager and Supervisor so that
collective_graph_key can be passed in when collective ops are used
in variable initialization.

PiperOrigin-RevId: 197964316

6 years agoRename getInt64 to GetInt64 to follow Google style
Sanjoy Das [Thu, 24 May 2018 22:19:40 +0000 (15:19 -0700)]
Rename getInt64 to GetInt64 to follow Google style

PiperOrigin-RevId: 197963232

6 years agoWindows build script change for release job
A. Unique TensorFlower [Thu, 24 May 2018 21:59:29 +0000 (14:59 -0700)]
Windows build script change for release job

PiperOrigin-RevId: 197959602

6 years agoSmall fix so that GDN can run on TPU
A. Unique TensorFlower [Thu, 24 May 2018 21:59:05 +0000 (14:59 -0700)]
Small fix so that GDN can run on TPU

PiperOrigin-RevId: 197959536

6 years agoRaise ValueError when calling model.summary() before it is built
Francois Chollet [Thu, 24 May 2018 21:58:15 +0000 (14:58 -0700)]
Raise ValueError when calling model.summary() before it is built

PiperOrigin-RevId: 197959372

6 years ago[TF:XLA] Avoid buffer copy when copying a Tensor onto an XLA device.
Peter Hawkins [Thu, 24 May 2018 21:20:39 +0000 (14:20 -0700)]
[TF:XLA] Avoid buffer copy when copying a Tensor onto an XLA device.

PiperOrigin-RevId: 197952565

6 years ago[XLA] Convert infeed call to take a LiteralSlice.
Chris Leary [Thu, 24 May 2018 21:03:41 +0000 (14:03 -0700)]
[XLA] Convert infeed call to take a LiteralSlice.

PiperOrigin-RevId: 197949637

6 years agotfdbg: fix issue where total source file size exceeds gRPC message size limit
Shanqing Cai [Thu, 24 May 2018 21:02:30 +0000 (14:02 -0700)]
tfdbg: fix issue where total source file size exceeds gRPC message size limit

* Source file content is now sent one by one, making it less likely that individual
  messages will have sizes above the 4-MB gRPC message size limit.
* In case the message for a single source file exceeds the limit, the client handles
  it gracefully by skipping the sending and print a warning message.

Fixes: https://github.com/tensorflow/tensorboard/issues/1118
PiperOrigin-RevId: 197949416

6 years agoFix bugs with the code blocks in defun's docstring.
Akshay Agrawal [Thu, 24 May 2018 20:30:15 +0000 (13:30 -0700)]
Fix bugs with the code blocks in defun's docstring.

PiperOrigin-RevId: 197943921

6 years agoAutomated g4 rollback of changelist 197868028
A. Unique TensorFlower [Thu, 24 May 2018 20:19:47 +0000 (13:19 -0700)]
Automated g4 rollback of changelist 197868028

PiperOrigin-RevId: 197942379

6 years agoadd maxpoolgrad transposer for layout optimizer.
A. Unique TensorFlower [Thu, 24 May 2018 20:18:32 +0000 (13:18 -0700)]
add maxpoolgrad transposer for layout optimizer.

PiperOrigin-RevId: 197942180

6 years agoRemoving outdated links.
Amit Patankar [Thu, 24 May 2018 20:15:37 +0000 (13:15 -0700)]
Removing outdated links.

PiperOrigin-RevId: 197941740

6 years agoExtracts the Simplify Pack optimization into its own method.
A. Unique TensorFlower [Thu, 24 May 2018 20:13:42 +0000 (13:13 -0700)]
Extracts the Simplify Pack optimization into its own method.

PiperOrigin-RevId: 197941474

6 years agoEnsure ResourceMgr::LookupOrCreate calls create fn just once
Nick Felt [Thu, 24 May 2018 20:07:50 +0000 (13:07 -0700)]
Ensure ResourceMgr::LookupOrCreate calls create fn just once

This addresses a race condition where LookupOrCreate is called at the same time from two threads, and both Lookup()s fail, so the creator() function is run twice, even though only a single Create() will then succeed.

The motivation is that some creator() functions have side-effects, e.g. tf.contrib.summary.create_file_writer()'s init op opens an events file.  This change ensures that if two init ops for file writers with the same resource name are run in the same session.run() call, only one events file will be created.  (Current behavior will often open two files; typically the second one overwrites the first but this won't happen if the filename_suffix values are different or the timestamps happen to straddle a second boundary.)

PiperOrigin-RevId: 197940607

6 years agoUpdated documentation for tf.reduce_join.
A. Unique TensorFlower [Thu, 24 May 2018 20:03:10 +0000 (13:03 -0700)]
Updated documentation for tf.reduce_join.

PiperOrigin-RevId: 197939808

6 years agoOnly wait for one of the input tensors to be ready.
A. Unique TensorFlower [Thu, 24 May 2018 20:00:07 +0000 (13:00 -0700)]
Only wait for one of the input tensors to be ready.
The waiting was implemented to avoid reading stale models as much as possible.
However with this dependency, each input column creates a Send/Recv to PS0
which slows down training significantly.
Colocate Quantile and Stats accumulators for the same handler.

PiperOrigin-RevId: 197939327

6 years agoModify tf.image.central_crop to support batched-input.
A. Unique TensorFlower [Thu, 24 May 2018 19:34:02 +0000 (12:34 -0700)]
Modify tf.image.central_crop to support batched-input.

Currently central_crop works on singular images with dynamic dimensions. For large image classification models, it would be nice if central_crop can be modified to support batched input. This CL makes that change.

PiperOrigin-RevId: 197935606

6 years agoMark queue related ops as having side effect
Benoit Steiner [Thu, 24 May 2018 19:23:32 +0000 (12:23 -0700)]
Mark queue related ops as having side effect

PiperOrigin-RevId: 197933941

6 years agoDon't use hex floats.
Jacques Pienaar [Thu, 24 May 2018 19:22:04 +0000 (12:22 -0700)]
Don't use hex floats.

Hex float literals are in C11 and C++17, but not in C++11, so use plain float notation.

PiperOrigin-RevId: 197933744

6 years agoFix doc: "--input_arrays" instead of "--input_array".
A. Unique TensorFlower [Thu, 24 May 2018 19:11:41 +0000 (12:11 -0700)]
Fix doc: "--input_arrays" instead of "--input_array".

PiperOrigin-RevId: 197932202

6 years ago[TF:XLA] Bump open source llvm revision to r333167
Sanjoy Das [Thu, 24 May 2018 18:54:56 +0000 (11:54 -0700)]
[TF:XLA] Bump open source llvm revision to r333167

PiperOrigin-RevId: 197929434

6 years agoFix `tf_inspect.getargspec` callable objects other than functions.
Mark Daoust [Thu, 24 May 2018 18:44:15 +0000 (11:44 -0700)]
Fix `tf_inspect.getargspec` callable objects other than functions.

PiperOrigin-RevId: 197927601

6 years ago[tf.data] Add `tf.contrib.data.choose_from_datasets()`.
Derek Murray [Thu, 24 May 2018 18:37:12 +0000 (11:37 -0700)]
[tf.data] Add `tf.contrib.data.choose_from_datasets()`.

This is a deterministic counterpart to `tf.contrib.data.sample_from_datasets()`.

PiperOrigin-RevId: 197926386

6 years agoExtracts the 'Move Constants Past Enter Node' optimization into its own method.
A. Unique TensorFlower [Thu, 24 May 2018 18:29:34 +0000 (11:29 -0700)]
Extracts the 'Move Constants Past Enter Node' optimization into its own method.

PiperOrigin-RevId: 197924962

6 years agoMake the existing checkpointable data structure a CheckpointableDataStructure
Allen Lavoie [Thu, 24 May 2018 18:23:18 +0000 (11:23 -0700)]
Make the existing checkpointable data structure a CheckpointableDataStructure

Gives it better/more consistent handling of Layers.

PiperOrigin-RevId: 197923880

6 years agoboosted_trees: used double precision instead of single precision while accumulating...
A. Unique TensorFlower [Thu, 24 May 2018 18:18:45 +0000 (11:18 -0700)]
boosted_trees: used double precision instead of single precision while accumulating batches within MakeStatsSummary, as float type faces numerical precision problems when batch gets larger and stats gets smaller.
PiperOrigin-RevId: 197923022

6 years agoDeprecate `DeviceBase::GetStepAllocator()` and replace with calls to `GetAllocator()`.
Derek Murray [Thu, 24 May 2018 18:14:17 +0000 (11:14 -0700)]
Deprecate `DeviceBase::GetStepAllocator()` and replace with calls to `GetAllocator()`.

The `GetStepAllocator()` API relied on the existence of a "step resource manager",
which is no longer a concept in the runtime (it was replaced by "step containers").
Since the additional flexibility does not appear to be used in the codebase, the
`GetScopedAllocator()` seems to provide a similar extension point (based on step IDs),
and the `OpKernelContext::get_allocator()` method is called frequently, this change
simplifies the implementation somewhat.

The `GetStepAllocator()` method is retained as a non-virtual stub that forwards to
`GetAllocator()`, because at least one third-party library (libxsmm) calls this
interface directly.

PiperOrigin-RevId: 197922154

6 years agoAdd shape validation for symbolic tensors passed to fit (only graph mode).
Francois Chollet [Thu, 24 May 2018 18:11:42 +0000 (11:11 -0700)]
Add shape validation for symbolic tensors passed to fit (only graph mode).

PiperOrigin-RevId: 197921675

6 years agoFix convert_to_tensor logic in GradientDescentOptimizer's _prepare method
Akshay Agrawal [Thu, 24 May 2018 17:58:47 +0000 (10:58 -0700)]
Fix convert_to_tensor logic in GradientDescentOptimizer's _prepare method

Previously, eagerly executing an optimizer that had been used in a `defun`
led to a cryptic error because the learning rate tensor supplied to the update
op was in fact a vestigial graph Tensor.

PiperOrigin-RevId: 197919104

6 years agoImprove TOCO Python API.
Nupur Garg [Thu, 24 May 2018 17:53:28 +0000 (10:53 -0700)]
Improve TOCO Python API.

PiperOrigin-RevId: 197918102

6 years agoFix build failure introduced by cl/197457316
A. Unique TensorFlower [Thu, 24 May 2018 17:52:18 +0000 (10:52 -0700)]
Fix build failure introduced by cl/197457316

PiperOrigin-RevId: 197917867

6 years agoWarn about tf.Variable semantics
Alexandre Passos [Thu, 24 May 2018 17:38:48 +0000 (10:38 -0700)]
Warn about tf.Variable semantics

PiperOrigin-RevId: 197915380

6 years agoAdd a checkpointable map data structure
Allen Lavoie [Thu, 24 May 2018 17:30:41 +0000 (10:30 -0700)]
Add a checkpointable map data structure

PiperOrigin-RevId: 197913890

6 years ago[XLA] Speed up slice_test again.
Justin Lebar [Thu, 24 May 2018 17:05:10 +0000 (10:05 -0700)]
[XLA] Speed up slice_test again.

Previous patch missed one instance of creating a constant inside of
slice_test.

PiperOrigin-RevId: 197909685

6 years ago[XLA] Devectorize constant-sized arrays
Benjamin Kramer [Thu, 24 May 2018 16:50:19 +0000 (09:50 -0700)]
[XLA] Devectorize constant-sized arrays

A sufficiently smart compiler could promote these from heap to stack, in
practice no compiler does that. Remove the superfluous heap allocations
manually.

PiperOrigin-RevId: 197907388

6 years agoFix a bug in BestExporter - estimator.model_dir should be property instead of a function.
A. Unique TensorFlower [Thu, 24 May 2018 16:28:43 +0000 (09:28 -0700)]
Fix a bug in BestExporter - estimator.model_dir should be property instead of a function.

PiperOrigin-RevId: 197904351

6 years agoInternal change.
A. Unique TensorFlower [Thu, 24 May 2018 16:15:17 +0000 (09:15 -0700)]
Internal change.

PiperOrigin-RevId: 197902509

6 years agoExtracts the 'switch with same input' optimization into its own method.
A. Unique TensorFlower [Thu, 24 May 2018 16:05:41 +0000 (09:05 -0700)]
Extracts the 'switch with same input' optimization into its own method.

PiperOrigin-RevId: 197900929

6 years agoWhen using fake infeed data, fill the infeed when it is empty.
A. Unique TensorFlower [Thu, 24 May 2018 14:00:24 +0000 (07:00 -0700)]
When using fake infeed data, fill the infeed when it is empty.

This makes sure we avoid OOM when there is too much infeed data to send it at
once, and we also don't need the magic "num_infeeds" parameter anymore.

PiperOrigin-RevId: 197886121

6 years agoStyle guide edits: refer to the broader Google style guide, which is what was actuall...
Dan Moldovan [Thu, 24 May 2018 13:20:04 +0000 (06:20 -0700)]
Style guide edits: refer to the broader Google style guide, which is what was actually used in the code, to replace some of the rules that were spelled out explicitly.
Use AutoGraph, rather than TensorFlow AutoGraph for name.

PiperOrigin-RevId: 197881802

6 years agoAutomated g4 rollback of changelist 197477959
A. Unique TensorFlower [Thu, 24 May 2018 10:48:24 +0000 (03:48 -0700)]
Automated g4 rollback of changelist 197477959

PiperOrigin-RevId: 197868028

6 years agoAllow to generate fake infeed buffers with shapes derived from the computation.
A. Unique TensorFlower [Thu, 24 May 2018 09:54:37 +0000 (02:54 -0700)]
Allow to generate fake infeed buffers with shapes derived from the computation.

When replaying a computation from a HloSnapshot, we want to be able to provide fake
infeed data. This was already possible when the infeed shape is known by providing
it with the --fake_infeed_shape flag. With this CL, we add the option to derive it
from the provided HloSnapshot. Also, we transfer the infeed shape a fixed number of
times instead of infinitely many times (configurable with a flag).
Otherwise we will definitely run out of memory at some point.

PiperOrigin-RevId: 197863412

6 years ago[XLA:GPU] Basic multi-output fusion for GPU.
A. Unique TensorFlower [Thu, 24 May 2018 08:03:36 +0000 (01:03 -0700)]
[XLA:GPU] Basic multi-output fusion for GPU.

Take a conservative approach and attempt multi-output fusion in cases where "regular" fusion is not an option.

PiperOrigin-RevId: 197852598

6 years agoImplement support for reshape in IndexedArrayAnalysis
Sanjoy Das [Thu, 24 May 2018 05:59:22 +0000 (22:59 -0700)]
Implement support for reshape in IndexedArrayAnalysis

PiperOrigin-RevId: 197843589

6 years agoAdd unit tests to tflite kernels
A. Unique TensorFlower [Thu, 24 May 2018 05:33:53 +0000 (22:33 -0700)]
Add unit tests to tflite kernels

PiperOrigin-RevId: 197842122

6 years agoResolve name collisions with assets in SavedModels by deduplicating names that
Karmel Allison [Thu, 24 May 2018 03:53:15 +0000 (20:53 -0700)]
Resolve name collisions with assets in SavedModels by deduplicating names that
point to distinct files.

PiperOrigin-RevId: 197835288

6 years agoAdd support for is_recompute optional kwarg to functions decorated with recompute_grad
A. Unique TensorFlower [Thu, 24 May 2018 03:39:31 +0000 (20:39 -0700)]
Add support for is_recompute optional kwarg to functions decorated with recompute_grad

PiperOrigin-RevId: 197834316

6 years agoSet the correct shape in transformed distribution.
A. Unique TensorFlower [Thu, 24 May 2018 03:03:20 +0000 (20:03 -0700)]
Set the correct shape in transformed distribution.

Also add distribution_util.maybe_get_static_event_ndims to be reused in bijector and transformed distribution classes.

PiperOrigin-RevId: 197831651

6 years agoMoves estimator getting started docs into programmer's guide.
Billy Lamberta [Thu, 24 May 2018 01:46:20 +0000 (18:46 -0700)]
Moves estimator getting started docs into programmer's guide.
Update path references and magic links.
Remove getting started with estimators doc.
Add redirects.

PiperOrigin-RevId: 197826223

6 years agoAdd back some public interface methods.
Shashi Shekhar [Thu, 24 May 2018 01:45:30 +0000 (18:45 -0700)]
Add back some public interface methods.

PiperOrigin-RevId: 197826136

6 years agoHloSharding parsing from string, used by new Sharding HloMatcher for ease of use.
A. Unique TensorFlower [Thu, 24 May 2018 01:38:34 +0000 (18:38 -0700)]
HloSharding parsing from string, used by new Sharding HloMatcher for ease of use.

PiperOrigin-RevId: 197825588

6 years agoExtracts the SimplifyReduction optimization into its own method.
A. Unique TensorFlower [Thu, 24 May 2018 01:13:23 +0000 (18:13 -0700)]
Extracts the SimplifyReduction optimization into its own method.

PiperOrigin-RevId: 197823183

6 years agoAggregating IndexedSlices: Do not require first element to be IndexedSlices.
Priya Gupta [Thu, 24 May 2018 00:58:42 +0000 (17:58 -0700)]
Aggregating IndexedSlices: Do not require first element to be IndexedSlices.

PiperOrigin-RevId: 197821479

6 years ago[XLA] Speed up SliceTest.
Justin Lebar [Thu, 24 May 2018 00:52:29 +0000 (17:52 -0700)]
[XLA] Speed up SliceTest.

- Use parameters rather than constants, because LLVM and ptxas are slow
  with large constants.

- Use iota rather than filling with random values, because the latter is
  slow.

PiperOrigin-RevId: 197820897

6 years agoCache generated LLVM IR for GEBP
Sanjoy Das [Thu, 24 May 2018 00:49:42 +0000 (17:49 -0700)]
Cache generated LLVM IR for GEBP

After this change all generated GEBPs with the same shape will share a single
llvm::Function.

This is NFC for any actual workloads because the GEBP emitter isn't exercised by
normal code-paths yet.

PiperOrigin-RevId: 197820606

6 years agoAdd import.
Nupur Garg [Thu, 24 May 2018 00:44:32 +0000 (17:44 -0700)]
Add import.

PiperOrigin-RevId: 197820050

6 years ago[tf.data] Split out the `tf.contrib.data.sample_from_datasets()` tests.
Derek Murray [Thu, 24 May 2018 00:32:54 +0000 (17:32 -0700)]
[tf.data] Split out the `tf.contrib.data.sample_from_datasets()` tests.

These were previously broken and disabled in CI builds; this change also fixes
them up.

PiperOrigin-RevId: 197818554

6 years agoInternal cleanup to remove a difference from the code on github.
A. Unique TensorFlower [Thu, 24 May 2018 00:26:04 +0000 (17:26 -0700)]
Internal cleanup to remove a difference from the code on github.

PiperOrigin-RevId: 197817738

6 years agoInternal change.
Anna R [Thu, 24 May 2018 00:15:54 +0000 (17:15 -0700)]
Internal change.

PiperOrigin-RevId: 197816560

6 years agoRefactor StatSummarizer extract common functionality without proto dependencies.
Shashi Shekhar [Thu, 24 May 2018 00:14:39 +0000 (17:14 -0700)]
Refactor StatSummarizer extract common functionality without proto dependencies.

PiperOrigin-RevId: 197816405

6 years agoSimplify the remapper code and added support for non scalar mean, variance, scale...
Benoit Steiner [Wed, 23 May 2018 23:45:26 +0000 (16:45 -0700)]
Simplify the remapper code and added support for non scalar mean, variance, scale and offset.

PiperOrigin-RevId: 197812268

6 years agoOpen source rewrite_for_inference().
A. Unique TensorFlower [Wed, 23 May 2018 23:34:00 +0000 (16:34 -0700)]
Open source rewrite_for_inference().

PiperOrigin-RevId: 197810460

6 years agoMake depthwiseconv handler handle filter ranges beyond 255
A. Unique TensorFlower [Wed, 23 May 2018 23:33:27 +0000 (16:33 -0700)]
Make depthwiseconv handler handle filter ranges beyond 255

PiperOrigin-RevId: 197810361

6 years agoAdd support for IndexedSlices in Distribution Strategy all reduce. Issue reported...
Priya Gupta [Wed, 23 May 2018 23:10:30 +0000 (16:10 -0700)]
Add support for IndexedSlices in Distribution Strategy all reduce. Issue reported in #19069

PiperOrigin-RevId: 197806955

6 years agoRun only small and medium tests in CI builds.
Justin Lebar [Wed, 23 May 2018 23:06:03 +0000 (16:06 -0700)]
Run only small and medium tests in CI builds.

PiperOrigin-RevId: 197806292

6 years agoadded support for calling fit on Dataset objects
A. Unique TensorFlower [Wed, 23 May 2018 23:02:19 +0000 (16:02 -0700)]
added support for calling fit on Dataset objects

PiperOrigin-RevId: 197805615

6 years agoFix CurlHttpRequest handling unexpectedly large responses
Nick Felt [Wed, 23 May 2018 22:58:28 +0000 (15:58 -0700)]
Fix CurlHttpRequest handling unexpectedly large responses

This fixes a few issues with CurlHttpRequest (and correspondingly GcsFileSystem):

- Return status FAILED_PRECONDITION (i.e. "your buffer was too small") when CurlHttpRequest has a direct response buffer and the response is too large for the buffer, instead of UNAVAILABLE, since if the server resource is actually a fixed size, retrying automatically won't help at all.  Also, include the message about the too-small buffer size in the returned Status as opposed to logging it, making it more obvious that it's treated as a message about a hard failure versus just a warning.

- If the response was actually a 416 Range Not Satisfied response, fully pretend that the response had no body even if we got one (I'm looking at you GCS... it returns a 177-byte error message).  This means:
  - Ignore a "buffer too small" error produced by the logic described above
  - Don't report the length of that body in GetResultBufferDirectBytesTransferred(), which looks to the client like data corruption, just report 0 (this fix makes it match the behavior of the non-direct-buffer response handling)

I also tweaked the error messages, e.g. the message that includes an HTTP response code shouldn't report the CURLcode since it will always be CURLE_OK at that point.

PiperOrigin-RevId: 197805003

6 years agoAdd support for partitioned variables to SDCA.
A. Unique TensorFlower [Wed, 23 May 2018 22:46:03 +0000 (15:46 -0700)]
Add support for partitioned variables to SDCA.

PiperOrigin-RevId: 197803127

6 years agoAdding scatter_nd* ops to Andrtoid build.
A. Unique TensorFlower [Wed, 23 May 2018 22:24:47 +0000 (15:24 -0700)]
Adding scatter_nd* ops to Andrtoid build.

PiperOrigin-RevId: 197799974

6 years ago[TF:XLA] Add tests to show that the List scheduler handles tuples correctly (in and...
Dimitris Vardoulakis [Wed, 23 May 2018 22:17:03 +0000 (15:17 -0700)]
[TF:XLA] Add tests to show that the List scheduler handles tuples correctly (in and out of fusions).

PiperOrigin-RevId: 197798787

6 years ago[XLA] Fix exhaustive_f32_elementwise_test's size marker.
Justin Lebar [Wed, 23 May 2018 21:58:08 +0000 (14:58 -0700)]
[XLA] Fix exhaustive_f32_elementwise_test's size marker.

"enormous" is a size, not a tag.

PiperOrigin-RevId: 197795125

6 years agoAllow vars_to_warm_start to be a list of strings or Variables, which allows for non...
A. Unique TensorFlower [Wed, 23 May 2018 21:57:23 +0000 (14:57 -0700)]
Allow vars_to_warm_start to be a list of strings or Variables, which allows for non-TRAINABLE_VARIABLES to be warm-started.

PiperOrigin-RevId: 197794989

6 years ago[XLA] Draw hollow arrowheads for small arrays in dumped HLO graphs.
Justin Lebar [Wed, 23 May 2018 21:56:55 +0000 (14:56 -0700)]
[XLA] Draw hollow arrowheads for small arrays in dumped HLO graphs.

The intent is to make it easier to tell what's "big" and what's "small".

PiperOrigin-RevId: 197794902

6 years agoModify model output names to not be unique when in distribution context.
Anjali Sridhar [Wed, 23 May 2018 21:36:23 +0000 (14:36 -0700)]
Modify model output names to not be unique when in distribution context.

PiperOrigin-RevId: 197791115

6 years agoAdd NNAPI delegation for EMBEDING_LOOKUP, RNN, SVDF
A. Unique TensorFlower [Wed, 23 May 2018 21:33:59 +0000 (14:33 -0700)]
Add NNAPI delegation for EMBEDING_LOOKUP, RNN, SVDF

PiperOrigin-RevId: 197790679

6 years agoNew quantized log(x) for x > 1. Used for LogSoftmax.
A. Unique TensorFlower [Wed, 23 May 2018 21:12:40 +0000 (14:12 -0700)]
New quantized log(x) for x > 1.  Used for LogSoftmax.

PiperOrigin-RevId: 197786738