platform/upstream/tensorflow.git
6 years agoMerge commit for internal changes
Yifei Feng [Tue, 29 May 2018 19:57:14 +0000 (12:57 -0700)]
Merge commit for internal changes

6 years agoIncrease tolerances in depthwise_conv_op_test.
Justin Lebar [Tue, 29 May 2018 19:05:19 +0000 (12:05 -0700)]
Increase tolerances in depthwise_conv_op_test.

PiperOrigin-RevId: 198434814

6 years agoUse target machine features to determine max vectorization width for GEMM
Sanjoy Das [Tue, 29 May 2018 19:02:57 +0000 (12:02 -0700)]
Use target machine features to determine max vectorization width for GEMM

PiperOrigin-RevId: 198434296

6 years agoL2HMC trained with strongly correlated Gaussian. Simple testing
A. Unique TensorFlower [Tue, 29 May 2018 19:01:11 +0000 (12:01 -0700)]
L2HMC trained with strongly correlated Gaussian. Simple testing
and benchmark with eager and graph mode execution.

PiperOrigin-RevId: 198433911

6 years agoExtracts the 'remove split or splitv nodes' optimization into its own method.
A. Unique TensorFlower [Tue, 29 May 2018 18:55:17 +0000 (11:55 -0700)]
Extracts the 'remove split or splitv nodes' optimization into its own method.

PiperOrigin-RevId: 198432976

6 years ago[TF:XLA] Bump open source llvm revision to r333395
Sanjoy Das [Tue, 29 May 2018 18:51:20 +0000 (11:51 -0700)]
[TF:XLA] Bump open source llvm revision to r333395

PiperOrigin-RevId: 198432337

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Tue, 29 May 2018 18:46:26 +0000 (11:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 198431534

6 years agoAdd note to bijector_impl.py explaining that `log_det_jacobian` is `log(*abs*(det...
A. Unique TensorFlower [Tue, 29 May 2018 18:32:25 +0000 (11:32 -0700)]
Add note to bijector_impl.py explaining that `log_det_jacobian` is `log(*abs*(det(Jacobian)))`.

PiperOrigin-RevId: 198428995

6 years ago[XLA] Clarify that options passed to LocalService override legacy_flags values.
Justin Lebar [Tue, 29 May 2018 18:19:19 +0000 (11:19 -0700)]
[XLA] Clarify that options passed to LocalService override legacy_flags values.

PiperOrigin-RevId: 198426696

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Tue, 29 May 2018 18:18:54 +0000 (11:18 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 198426617

6 years agoTile on the M dimension in GEBP.
Sanjoy Das [Tue, 29 May 2018 18:14:43 +0000 (11:14 -0700)]
Tile on the M dimension in GEBP.

After this change the inner reduction loop in GEBP multiplies a tile from the
LHS and a tile from the RHS to get a result tile.

PiperOrigin-RevId: 198425769

6 years ago [tpu:profiler] Add a new field to the statistics collected at each step.
A. Unique TensorFlower [Tue, 29 May 2018 18:13:36 +0000 (11:13 -0700)]
  [tpu:profiler] Add a new field to the statistics collected at each step.

PiperOrigin-RevId: 198425588

6 years agoExtracts the 'remove shuffle or transpose node' optimization into its own method.
A. Unique TensorFlower [Tue, 29 May 2018 18:12:22 +0000 (11:12 -0700)]
Extracts the 'remove shuffle or transpose node' optimization into its own method.

PiperOrigin-RevId: 198425354

6 years agoAdd security notices for recently discovered and patched vulnerabilities.
Frank Chen [Tue, 29 May 2018 17:57:01 +0000 (10:57 -0700)]
Add security notices for recently discovered and patched vulnerabilities.

PiperOrigin-RevId: 198422244

6 years ago[TF/XLA] Add validation to find ops incompatible with the given device type at the...
A. Unique TensorFlower [Tue, 29 May 2018 17:54:51 +0000 (10:54 -0700)]
[TF/XLA] Add validation to find ops incompatible with the given device type at the beginning of graph compilation.

PiperOrigin-RevId: 198421828

6 years ago Support NHWC_VECT_W in MakeShapeFromFormat.
A. Unique TensorFlower [Tue, 29 May 2018 17:53:40 +0000 (10:53 -0700)]
  Support NHWC_VECT_W in MakeShapeFromFormat.

PiperOrigin-RevId: 198421617

6 years agoUpdate python_configure.bzl (#19614)
Yun Peng [Tue, 29 May 2018 17:37:55 +0000 (19:37 +0200)]
Update python_configure.bzl (#19614)

Add BAZEL_SH environment variable as a dependency of python_configure repository rule

6 years agoAdd AnonymousIteratorHandleOp for non-shared Iterator resources
Allen Lavoie [Tue, 29 May 2018 17:34:20 +0000 (10:34 -0700)]
Add AnonymousIteratorHandleOp for non-shared Iterator resources

Fixes Iterator cleanup when executing eagerly. DestroyResourceOp will now remove the last reference from the Iterator resource when it runs (after the last Python reference to an EagerIterator is removed).

Previously EagerIterator used IteratorHandleOp to create resource handles, which used one kernel per (unique) shared name since the shared name was an attribute. These kernels each held a reference to their resource, which kept it alive indefinitely.

Fixes #19499.

PiperOrigin-RevId: 198417997

6 years agoClarify argument types and relationships in docstrings of statistical_testing.py.
A. Unique TensorFlower [Tue, 29 May 2018 17:17:39 +0000 (10:17 -0700)]
Clarify argument types and relationships in docstrings of statistical_testing.py.

PiperOrigin-RevId: 198414898

6 years agoAdd mirror for nasm (#19349)
Guido Zuidhof [Tue, 29 May 2018 17:17:51 +0000 (18:17 +0100)]
Add mirror for nasm (#19349)

6 years agoEliminate self.test_session in favor of self.evaluate in statistical_testing_test.py.
A. Unique TensorFlower [Tue, 29 May 2018 16:49:42 +0000 (09:49 -0700)]
Eliminate self.test_session in favor of self.evaluate in statistical_testing_test.py.

PiperOrigin-RevId: 198410306

6 years agoClean up: handle the hidden additional clause on for loops in a way that's clearer...
Dan Moldovan [Tue, 29 May 2018 16:46:21 +0000 (09:46 -0700)]
Clean up: handle the hidden additional clause on for loops in a way that's clearer about what it does.

PiperOrigin-RevId: 198409797

6 years agoMerge pull request #19574 from braincodercn/patch-1
Michael Case [Tue, 29 May 2018 16:45:09 +0000 (09:45 -0700)]
Merge pull request #19574 from braincodercn/patch-1

Fix build error

6 years agoClean up: remove useless super delegation.
Dan Moldovan [Tue, 29 May 2018 16:15:44 +0000 (09:15 -0700)]
Clean up: remove useless super delegation.

PiperOrigin-RevId: 198405670

6 years ago Fixed memory leak with py_func (#18292) (#19085)
voegtlel [Tue, 29 May 2018 16:15:10 +0000 (18:15 +0200)]
 Fixed memory leak with py_func (#18292) (#19085)

* Fixing memory leak with py_func (#18292)

* Fixed memory leak with py_func (#18292)

6 years agoAllow assignment to subscripts in static analysis.
Dan Moldovan [Tue, 29 May 2018 15:45:28 +0000 (08:45 -0700)]
Allow assignment to subscripts in static analysis.

Move the handling of syntactic unpackings to a generic helper function since the pattern is used in multiple places. Update the type info analyzer to correctly process function arguments.

PiperOrigin-RevId: 198401368

6 years agoGeneralize assert_true_mean_equal and assert_true_mean_equal_two_sample to assert_tru...
A. Unique TensorFlower [Tue, 29 May 2018 15:36:14 +0000 (08:36 -0700)]
Generalize assert_true_mean_equal and assert_true_mean_equal_two_sample to assert_true_mean_in_interval.

PiperOrigin-RevId: 198400265

6 years agoRe-apply #18192.
Asim Shankar [Tue, 29 May 2018 07:50:34 +0000 (00:50 -0700)]
Re-apply #18192.

PiperOrigin-RevId: 198358055

6 years agoFix an incorrect precondition check in IndexedArrayAnalysis
Sanjoy Das [Tue, 29 May 2018 06:55:19 +0000 (23:55 -0700)]
Fix an incorrect precondition check in IndexedArrayAnalysis

PiperOrigin-RevId: 198354001

6 years agoPass HloOpcode instead of HloInstruction; NFC
Sanjoy Das [Tue, 29 May 2018 06:03:39 +0000 (23:03 -0700)]
Pass HloOpcode instead of HloInstruction; NFC

Minor code cleanup change.

PiperOrigin-RevId: 198351045

6 years agoMake IndexedArrayAnalysis behave well around StatusOr
Sanjoy Das [Tue, 29 May 2018 05:16:46 +0000 (22:16 -0700)]
Make IndexedArrayAnalysis behave well around StatusOr

PiperOrigin-RevId: 198348355

6 years agopython_configure.bzl: Find bash binary path through BAZEL_SH env var. (#19598)
Yun Peng [Tue, 29 May 2018 03:05:08 +0000 (05:05 +0200)]
python_configure.bzl: Find bash binary path through BAZEL_SH env var. (#19598)

* python_configure.bzl: Find bash binary path through BAZEL_SH env var.

This helps avoid invoking the wrong bash binary when "Bash on Ubuntu on Windows"
is installed.

Fixed https://github.com/tensorflow/tensorflow/issues/11735

* Readability modifications.

6 years agoWindows: fail gracefully when undname.exe is not found (#19600)
Yun Peng [Tue, 29 May 2018 03:04:59 +0000 (05:04 +0200)]
Windows: fail gracefully when undname.exe is not found (#19600)

* Windows: fail gracefully when undname.exe is not found

* Edit error message.

6 years agoMerge pull request #19539 from AD-530/master
Michael Case [Mon, 28 May 2018 19:23:35 +0000 (12:23 -0700)]
Merge pull request #19539 from AD-530/master

Add missing deps for simd_armv8a in jpeg.BUILD

6 years agoMerge pull request #19577 from tensorflow/terrytangyuan-patch-1
Michael Case [Mon, 28 May 2018 19:22:14 +0000 (12:22 -0700)]
Merge pull request #19577 from tensorflow/terrytangyuan-patch-1

Fixed typo in exporter.py

6 years agoMerge pull request #19580 from ManHyuk/fix_typo
Michael Case [Mon, 28 May 2018 19:21:48 +0000 (12:21 -0700)]
Merge pull request #19580 from ManHyuk/fix_typo

Fix typo

6 years agoAdding tf.data optimization for rewriting `map(...).batch(...)` to `map_and_batch...
Jiri Simsa [Mon, 28 May 2018 16:33:49 +0000 (09:33 -0700)]
Adding tf.data optimization for rewriting `map(...).batch(...)` to `map_and_batch(...)`.

PiperOrigin-RevId: 198310806

6 years agoSort variables in C++ instead of Python.
Tom Hennigan [Mon, 28 May 2018 13:32:04 +0000 (06:32 -0700)]
Sort variables in C++ instead of Python.

PiperOrigin-RevId: 198298103

6 years agoRelax compatibility checks for Protocol Buffer classes, to not rely on the exact...
A. Unique TensorFlower [Mon, 28 May 2018 12:21:13 +0000 (05:21 -0700)]
Relax compatibility checks for Protocol Buffer classes, to not rely on the exact layout of the generated classes. The definition of the message is checked instead.

PiperOrigin-RevId: 198292780

6 years ago[XLA] Don't display metadata inline in HLO graph dump.
Justin Lebar [Sun, 27 May 2018 20:27:28 +0000 (13:27 -0700)]
[XLA] Don't display metadata inline in HLO graph dump.

We only want to display it in the tooltip.

PiperOrigin-RevId: 198235268

6 years agoTPUEstimator.export_savedmodel() saves a SavedModel with both TPU and CPU graphs.
A. Unique TensorFlower [Sun, 27 May 2018 17:49:12 +0000 (10:49 -0700)]
TPUEstimator.export_savedmodel() saves a SavedModel with both TPU and CPU graphs.

PiperOrigin-RevId: 198229550

6 years agofix typo
ManHyuk [Sun, 27 May 2018 07:07:47 +0000 (16:07 +0900)]
fix typo

6 years agoMerge branch 'master' into fix_typo
ManHyuk [Sun, 27 May 2018 07:03:14 +0000 (16:03 +0900)]
Merge branch 'master' into fix_typo

6 years agoFixed typo in exporter.py
Yuan (Terry) Tang [Sat, 26 May 2018 18:49:29 +0000 (14:49 -0400)]
Fixed typo in exporter.py

6 years agoFix build error
braincodercn [Sat, 26 May 2018 16:25:10 +0000 (00:25 +0800)]
Fix build error

Fix build error: 'function' in namespace 'std' does not name a template type

6 years agoExtracts the 'remove random shuffle node' optimization into its own method.
A. Unique TensorFlower [Sat, 26 May 2018 15:25:12 +0000 (08:25 -0700)]
Extracts the 'remove random shuffle node' optimization into its own method.

PiperOrigin-RevId: 198169790

6 years agoFix the issue where returned Status is not used.
Guangda Lai [Sat, 26 May 2018 06:44:11 +0000 (23:44 -0700)]
Fix the issue where returned Status is not used.

PiperOrigin-RevId: 198146500

6 years agoDepthwiseConv Optimizations
A. Unique TensorFlower [Sat, 26 May 2018 05:46:46 +0000 (22:46 -0700)]
DepthwiseConv Optimizations

PiperOrigin-RevId: 198144118

6 years agoUse dict(locals()) instead of distribution_util.parent_frame_arguments. This will...
A. Unique TensorFlower [Sat, 26 May 2018 04:38:56 +0000 (21:38 -0700)]
Use dict(locals()) instead of distribution_util.parent_frame_arguments. This will be much
faster at object construction time (going forward we'll figure out a way to make this a function to call).

PiperOrigin-RevId: 198141184

6 years ago[XLA] Don't compute relative error when the expected value is 0.
Justin Lebar [Sat, 26 May 2018 03:23:31 +0000 (20:23 -0700)]
[XLA] Don't compute relative error when the expected value is 0.

In literal_comparison, don't try to compute a relative error when the
expected value is 0, because doing so would mean that the only
acceptable value *is* zero, which probably isn't what you mean.

PiperOrigin-RevId: 198137414

6 years agoAdd support for unary and binary ops to indexed tensor analysis
Sanjoy Das [Sat, 26 May 2018 02:21:57 +0000 (19:21 -0700)]
Add support for unary and binary ops to indexed tensor analysis

I've added a TODO to clean up the use of ValueOrDie which I will address in an
immediately following CL.

PiperOrigin-RevId: 198134579

6 years ago[Hlo Graphviz] Always show metadata as tooltips
Yunxing Dai [Sat, 26 May 2018 02:18:30 +0000 (19:18 -0700)]
[Hlo Graphviz] Always show metadata as tooltips

Always show metadata as tooltips.

PiperOrigin-RevId: 198134430

6 years agoAdd a type-erased broadcast implementation to xla::Literal
Sanjoy Das [Sat, 26 May 2018 00:46:19 +0000 (17:46 -0700)]
Add a type-erased broadcast implementation to xla::Literal

And use this in HLO evaluator.  Since broadcast only moves bytes around we don't
need a type specialized implementation.

I'll use this in a later change.

PiperOrigin-RevId: 198128524

6 years agoMinor eager performance improvements
Akshay Modi [Sat, 26 May 2018 00:37:01 +0000 (17:37 -0700)]
Minor eager performance improvements

- remove linear regression dependence on global step.
  This speeds things up a lot for the benchmark (since it removes a bunch of
  unnecessary code), but is obviously not a fair comparison.
  I think its worth doing, since I don't see any reason to have a global step
  in eager.

- nn_ops dropout had an unnecessary convert_to_tensor, convert back to numpy
  (with a GPU this would copy out, copy back).
- cudnn_recurrent reshape would always fallback to the slow path - so I just
  converted it to be in the fastpath - this will be low impact.

- tensor_shape should not generate a new object every time
- remove unnecessary list creation and searching in some dtypes functions

PiperOrigin-RevId: 198127757

6 years ago[TF:XLA] Add direct implementation of AssignVariableOp for XLA devices.
Peter Hawkins [Sat, 26 May 2018 00:29:37 +0000 (17:29 -0700)]
[TF:XLA] Add direct implementation of AssignVariableOp for XLA devices.

This allows us to avoid an XLA compilation and tensor copies when assigning to a variable placed on an XLA device.

PiperOrigin-RevId: 198127062

6 years agoTurn on heuristic (mostly-NHWC) convolution layout assignment for (V100, fp16) by...
A. Unique TensorFlower [Sat, 26 May 2018 00:22:17 +0000 (17:22 -0700)]
Turn on heuristic (mostly-NHWC) convolution layout assignment for (V100, fp16) by default.

Also increase the column reduction tile size to reduce atomic operations.

PiperOrigin-RevId: 198126505

6 years agoEnable while loop constant sinking for GPU
Sanjoy Das [Sat, 26 May 2018 00:22:11 +0000 (17:22 -0700)]
Enable while loop constant sinking for GPU

To avoid keeping constants in while loop bodies after optimization (where they
may cause extra copies) we run a late pass of LICM that has been asked to hoist
constants when it can.

PiperOrigin-RevId: 198126497

6 years agoProvide a step container to OpKernelContexts when running eagerly.
Akshay Agrawal [Sat, 26 May 2018 00:12:49 +0000 (17:12 -0700)]
Provide a step container to OpKernelContexts when running eagerly.

This lets us run some ops that require step containers (e.g.
TensorArray-related ops).

 Before change:
 Benchmark                    Time(ns)        CPU(ns)     Iterations
-------------------------------------------------------------------
 BM_CreateGraph                  61292          80915           8581
 BM_RunGraph                      7899          13398          51251
 BM_CreateAndDestroySession       2588           2594         269838
 BM_KernelAndDeviceInit           2971           2976         235908
 BM_KernelAndDeviceRun             505            506        1000000

 After change:
 Benchmark                    Time(ns)        CPU(ns)     Iterations
 -------------------------------------------------------------------
 BM_CreateGraph                  78295         105539           8698
 BM_RunGraph                      9907          16988          47908
 BM_CreateAndDestroySession       2773           2778         247635
 BM_KernelAndDeviceInit           2678           2682         270054
 BM_KernelAndDeviceRun             553            554        1000000

PiperOrigin-RevId: 198125630

6 years ago[tf.data] Fixing concurrency issue in `map_and_batch`.
Jiri Simsa [Sat, 26 May 2018 00:05:33 +0000 (17:05 -0700)]
[tf.data] Fixing concurrency issue in `map_and_batch`.

PiperOrigin-RevId: 198124860

6 years agoMerge pull request #19483 from markdryan/markdryan/fix-bfcallocator-align
Tatiana Shpeisman [Sat, 26 May 2018 00:06:29 +0000 (17:06 -0700)]
Merge pull request #19483 from markdryan/markdryan/fix-bfcallocator-align

Fix BFCAllocator::Extend alignment issues

6 years agoIgnore while loops instead of mangling them in the automatic control dependencies.
Alexandre Passos [Fri, 25 May 2018 23:43:40 +0000 (16:43 -0700)]
Ignore while loops instead of mangling them in the automatic control dependencies.

PiperOrigin-RevId: 198122188

6 years agoExtracts the 'remove reverse node' optimization into its own method.
A. Unique TensorFlower [Fri, 25 May 2018 23:43:29 +0000 (16:43 -0700)]
Extracts the 'remove reverse node' optimization into its own method.

PiperOrigin-RevId: 198122165

6 years agoFix of issue #13164 (Merges #13382) (#16368)
Robin Richtsfeld [Fri, 25 May 2018 23:38:33 +0000 (01:38 +0200)]
Fix of issue #13164 (Merges #13382) (#16368)

* tf.gather int64 GPU, tf.gather_nd int32/int64 GPU, tf.scatter_nd int32 GPU

* Fix tf.gather test

6 years agoAutomated g4 rollback of changelist 198087342
A. Unique TensorFlower [Fri, 25 May 2018 23:07:25 +0000 (16:07 -0700)]
Automated g4 rollback of changelist 198087342

PiperOrigin-RevId: 198117552

6 years agoMerge pull request #19364 from Intel-tensorflow/agramesh/mkl_v14_fix2
Tatiana Shpeisman [Fri, 25 May 2018 22:52:39 +0000 (15:52 -0700)]
Merge pull request #19364 from Intel-tensorflow/agramesh/mkl_v14_fix2

[INTEL MKL] Upgrading to MKL DNN v.14

6 years agoMerge pull request #19540 from Intel-tensorflow/mkl_registration_fix
Tatiana Shpeisman [Fri, 25 May 2018 22:51:00 +0000 (15:51 -0700)]
Merge pull request #19540 from Intel-tensorflow/mkl_registration_fix

INTEL-MKL: Fix an issue related to MKL op registration

6 years agoMerge pull request #19558 from bzier/patch-1
Michael Case [Fri, 25 May 2018 22:33:36 +0000 (15:33 -0700)]
Merge pull request #19558 from bzier/patch-1

Updated embedding column example

6 years agoMerge pull request #19544 from yongtang/05182018-duplicate-import
Michael Case [Fri, 25 May 2018 22:28:58 +0000 (15:28 -0700)]
Merge pull request #19544 from yongtang/05182018-duplicate-import

Remove duplicate `from six import text_type` in upload_test_benchmarks.py

6 years agoAdd warning to LookupOrCreate about reentrancy issue
Nick Felt [Fri, 25 May 2018 22:11:46 +0000 (15:11 -0700)]
Add warning to LookupOrCreate about reentrancy issue

PiperOrigin-RevId: 198110382

6 years agoMerge pull request #19470 from ankurtaly/branch_197583446
ankurtaly [Fri, 25 May 2018 21:43:38 +0000 (14:43 -0700)]
Merge pull request #19470 from ankurtaly/branch_197583446

Branch 197583446

6 years agoAdd EagerTensor profiler and device shape utilities
Igor Ganichev [Fri, 25 May 2018 20:58:51 +0000 (13:58 -0700)]
Add EagerTensor profiler and device shape utilities

This change includes the following steps to make
EagerTensor profiler work:
 - Add a PaddedShapeFn to XlaDevice::Metadata. We need a
   backend-independent way to get a fully-padded shape and
   its layout on the device. This function is set during
   device construction. CPU and GPU devices effectively get
   an identity function since they neither change the layout
   nor pad. TPU gets the appropriate function.
 - Add TFE_TensorDebugInfo struct and C API methods for it.
   These methods are necessary to fetch the shape and layout
   from under the C API to the Python level. This can be a home
   for more debug information later.
 - Make EagerTensor weak referencable. This involves adding a
   pointer to the list of current weak references. This addition
   should have negligible overhead when profiler is not used.
   The only operations on this field are setting it to null on
   construction and checking if it is null on destruction.
 - Adding C++ functions callable from Python to register an instance
   of EagerTensorProfiler and retrieve debug information for a given
   EagerTensor. These functions are used in the new "inspect" module.
 - Finally, writing the actual profiler.

PiperOrigin-RevId: 198098380

6 years agoDisable //tensorflow/contrib/lite/python:lite_test on Windows
A. Unique TensorFlower [Fri, 25 May 2018 20:44:36 +0000 (13:44 -0700)]
Disable //tensorflow/contrib/lite/python:lite_test on Windows

PiperOrigin-RevId: 198096344

6 years ago [tpu:profiler] Capture the data for generating a memory viewer of the profiling...
A. Unique TensorFlower [Fri, 25 May 2018 20:39:25 +0000 (13:39 -0700)]
   [tpu:profiler] Capture the data for generating a memory viewer of the profiling results.

PiperOrigin-RevId: 198095564

6 years ago[TF:XLA] Bump open source llvm revision to r333273
Sanjoy Das [Fri, 25 May 2018 20:38:24 +0000 (13:38 -0700)]
[TF:XLA] Bump open source llvm revision to r333273

PiperOrigin-RevId: 198095416

6 years agoPublic API to switch between eager execution and graph building.
Alexandre Passos [Fri, 25 May 2018 20:20:13 +0000 (13:20 -0700)]
Public API to switch between eager execution and graph building.

Now, after tf.enable_eager_execution() has been executed, entering the context
manager of a tf.Graph will enable graph mode. So, for example

```
tf.enable_eager_execution()
with tf.Graph().as_default():
  c = tf.constant(1.0)  # this is a graph tensor
c2 = tf.constant(1.0)  # this is an eager tensor
```

The main use-case of this is allowing documentation writers to make a single
notebook which starts with eager execution and seamlessly transitions to
building graphs.

This also makes many explicit enablings of graph mode in the code redundant
(a cleanup cl will follow).

PiperOrigin-RevId: 198092991

6 years agoUse functions to build dense splits. Tensorflow Function invocations share the same...
A. Unique TensorFlower [Fri, 25 May 2018 19:58:55 +0000 (12:58 -0700)]
Use functions to build dense splits. Tensorflow Function invocations share the same graph so using them reduces the graph construction overhead.

PiperOrigin-RevId: 198090110

6 years ago [tpu:profiler] Minor change in the description of tool name proto.
A. Unique TensorFlower [Fri, 25 May 2018 19:56:40 +0000 (12:56 -0700)]
   [tpu:profiler] Minor change in the description of tool name proto.

PiperOrigin-RevId: 198089875

6 years agoAdd ScopedAllocatorOptimizer in support of CollectiveReduce.
A. Unique TensorFlower [Fri, 25 May 2018 19:54:49 +0000 (12:54 -0700)]
Add ScopedAllocatorOptimizer in support of CollectiveReduce.

The efficiency of CollectiveReduce is greatly improved by merging
multiple parallel reductions over smaller tensors into a single
reduction over a larger tensor that is the concatentation of the
smaller tensors.  Because CollectiveReduce is essentially an
element-wise array operation which operates on a 1-D reshape of
the input tensor it is eligible for a ScopedAllocation optimization.

The optimization works by looking for serially independent instances
of CollectiveReduce that lie within the same name-scope tier and
have the same control-flow (e.g. loop) embedding structure.  Where
two or more such nodes are found the upstream nodes that generate
their inputs are modified to write their outputs into consecutive
regions of a single tensor buffer maintained by a ScopedAllocator.
The multiple CollectiveReduce nodes are then replaced by a single
CollectiveReduce that operates in-place on the backing buffer.

The effectiveness of the optimization depends on there being candidate
CollectiveReduce nodes with these characteristics that become eligible
for execution at close to the same time.  If the name scope is too
large, and includes nodes that become execution eligible at very different
times, this graph rewrite could result in a slowdown.

Note that this optimization is experimental: it is not guaranteed to
work, especially for ops other than CollectiveReduce.

PiperOrigin-RevId: 198089642

6 years agoMerge pull request #19479 from Intel-tensorflow/concat_build_fix
Tatiana Shpeisman [Fri, 25 May 2018 19:49:54 +0000 (12:49 -0700)]
Merge pull request #19479 from Intel-tensorflow/concat_build_fix

INTEL-MKL: Fix build issue with old GCC version - MklConcat related

6 years agoenhance Tensorflow GBDT and GBRT model by exposing a new two dimensional output in...
A. Unique TensorFlower [Fri, 25 May 2018 19:35:50 +0000 (12:35 -0700)]
enhance Tensorflow GBDT and GBRT model by exposing a new two dimensional output in prediction ops (example id, tree leaf node index id) for input as other model features

PiperOrigin-RevId: 198087342

6 years agoExtracts the 'simplify slice' optimization into its own method.
A. Unique TensorFlower [Fri, 25 May 2018 19:22:45 +0000 (12:22 -0700)]
Extracts the 'simplify slice' optimization into its own method.

PiperOrigin-RevId: 198085532

6 years ago[TF:XLA] Register Switch and Merge ops on XLA devices.
Peter Hawkins [Fri, 25 May 2018 19:04:49 +0000 (12:04 -0700)]
[TF:XLA] Register Switch and Merge ops on XLA devices.

PiperOrigin-RevId: 198083156

6 years agoAutomated g4 rollback of changelist 192848921
Derek Murray [Fri, 25 May 2018 18:42:33 +0000 (11:42 -0700)]
Automated g4 rollback of changelist 192848921

PiperOrigin-RevId: 198079927

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

PiperOrigin-RevId: 198078724

6 years agoBump TPU batch size and wrap apply_grads in defun
Igor Ganichev [Fri, 25 May 2018 18:27:39 +0000 (11:27 -0700)]
Bump TPU batch size and wrap apply_grads in defun

PiperOrigin-RevId: 198077643

6 years agoRelease C++ lock before calling back into python
Akshay Modi [Fri, 25 May 2018 18:02:42 +0000 (11:02 -0700)]
Release C++ lock before calling back into python

PiperOrigin-RevId: 198073059

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 agoUpdated embedding column example
Brian Zier [Fri, 25 May 2018 17:49:57 +0000 (10:49 -0700)]
Updated embedding column example

The embedding column example had a comment that seemed to incorrectly relate to the indicator column. Updated the comment to reflect the embedding column info. Also updated the name of the dimension variable to be consistent with the example from a few lines earlier.

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 agoMerge pull request #17331 from kbsriram/easy-nn-grads
Asim Shankar [Fri, 25 May 2018 17:38:23 +0000 (10:38 -0700)]
Merge pull request #17331 from kbsriram/easy-nn-grads

C++ gradients: Fractional*Pool, Soft{Plus,Sign}

6 years agoMerge pull request #19532 from yongtang/05242018-gemmlowp
Michael Case [Fri, 25 May 2018 16:54:36 +0000 (09:54 -0700)]
Merge pull request #19532 from yongtang/05242018-gemmlowp

Enable mirror.bazel.build link for gemmlowp

6 years agoMerge pull request #19553 from silvasean/patch-1
Michael Case [Fri, 25 May 2018 16:36:45 +0000 (09:36 -0700)]
Merge pull request #19553 from silvasean/patch-1

Fix broken link

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 agoFix broken link
Sean Silva [Fri, 25 May 2018 07:27:46 +0000 (00:27 -0700)]
Fix broken link

Also, as a side note, I found this link confusing. I was expecting it to take me to a list of pre-made estimators. Not a definition of what a pre-made estimator is. (maybe the glossary definition should link to a list of pre-made estimators?)

6 years agoFix cmake for MacOS (#17005)
ted chang [Fri, 25 May 2018 06:21:46 +0000 (23:21 -0700)]
Fix cmake for MacOS (#17005)

This change address cmake build issues for MacOS.
Also fixes #14712

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