platform/upstream/tensorflow.git
6 years agoDisable tsan for tensorflow/python/estimator:replicate_model_fn_test
A. Unique TensorFlower [Fri, 30 Mar 2018 19:26:21 +0000 (12:26 -0700)]
Disable tsan for tensorflow/python/estimator:replicate_model_fn_test

It gets flaky failures.

PiperOrigin-RevId: 191100692

6 years agoEnable writing of summaries in ExamplesPerSecondHook
A. Unique TensorFlower [Fri, 30 Mar 2018 18:43:05 +0000 (11:43 -0700)]
Enable writing of summaries in ExamplesPerSecondHook

PiperOrigin-RevId: 191094585

6 years agoBreak FileSystem's dependency on ThreadPool.
A. Unique TensorFlower [Fri, 30 Mar 2018 18:32:58 +0000 (11:32 -0700)]
Break FileSystem's dependency on ThreadPool.

PiperOrigin-RevId: 191092932

6 years agoInternal change.
Shashi Shekhar [Fri, 30 Mar 2018 18:21:31 +0000 (11:21 -0700)]
Internal change.

PiperOrigin-RevId: 191090993

6 years agoRename distributed_apply to _distributed_apply in OptimizerV2 to match
A. Unique TensorFlower [Fri, 30 Mar 2018 18:12:24 +0000 (11:12 -0700)]
Rename distributed_apply to _distributed_apply in OptimizerV2 to match
the Optimizer base class.

PiperOrigin-RevId: 191089407

6 years agoCreate a wrapper for bfloat16 scope so that users don't need the custom getter.
Sourabh Bajaj [Fri, 30 Mar 2018 17:50:18 +0000 (10:50 -0700)]
Create a wrapper for bfloat16 scope so that users don't need the custom getter.

PiperOrigin-RevId: 191085552

6 years agoCheck for errors returned by ExecuteOnStream before calling
A. Unique TensorFlower [Fri, 30 Mar 2018 17:47:58 +0000 (10:47 -0700)]
Check for errors returned by ExecuteOnStream before calling
BlockHostUntilDone. If ExecuteOnStream fails, BlockHostUntilDone will
also fail in a way that makes debugging much harder.

RELNOTES: n/a
PiperOrigin-RevId: 191085159

6 years ago[XLA] Add IsConstant to the local Python client.
A. Unique TensorFlower [Fri, 30 Mar 2018 17:15:11 +0000 (10:15 -0700)]
[XLA] Add IsConstant to the local Python client.

PiperOrigin-RevId: 191080094

6 years agoFix several data races by acquiring locks.
A. Unique TensorFlower [Fri, 30 Mar 2018 16:56:29 +0000 (09:56 -0700)]
Fix several data races by acquiring locks.

(The racy accesses were detected by the thread safety annotations.)

PiperOrigin-RevId: 191077376

6 years agoFix the index to match the left nav.
Mark Daoust [Fri, 30 Mar 2018 16:41:29 +0000 (09:41 -0700)]
Fix the index to match the left nav.

PiperOrigin-RevId: 191075496

6 years agoFix a crash in Quantize() when tf.contrib.framework.get_name_scope() == None.
A. Unique TensorFlower [Fri, 30 Mar 2018 15:23:30 +0000 (08:23 -0700)]
Fix a crash in Quantize() when tf.contrib.framework.get_name_scope() == None.

PiperOrigin-RevId: 191068059

6 years agoUpdate test for DebugStripper to construct graph in scope.
A. Unique TensorFlower [Fri, 30 Mar 2018 15:12:16 +0000 (08:12 -0700)]
Update test for DebugStripper to construct graph in scope.

PiperOrigin-RevId: 191067139

6 years agoReplaced calls to deprecated tensorflow::StringPiece methods with their
A. Unique TensorFlower [Fri, 30 Mar 2018 14:24:14 +0000 (07:24 -0700)]
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.

This will allow the deprecated methods to be removed.

PiperOrigin-RevId: 191063815

6 years agoBefore this change, a Tensor contained a device pointer and a TensorInfoManager datas...
A. Unique TensorFlower [Fri, 30 Mar 2018 09:41:35 +0000 (02:41 -0700)]
Before this change, a Tensor contained a device pointer and a TensorInfoManager datastructure contained a mapping from device pointer to XlaTensorInfo object. This TensorInfoManager needed to be an Allocator too, so it could be informed when a Tensor is released.

After this change, a Tensor on an XlaDevice contains an XlaTensor object. The XlaTensor object is the equivalent of the old XlaTensorInfo object.

This has advantages and drawbacks:
  + We don't need yet another allocator wrapper, as there is no side-band data to manage.
  + No hashtable lookups are required.
  - As XlaLocalLaunchOp could either be on an XlaDevice or a TF-classic device, we need some way to distinguish whether a Tensor is a TF-classic tensor (holds a device pointer) or an XlaTensor (we use a tagged pointer).

As part of this, allocate ShapedBuffers using the XLA backend's allocator directly instead of a roundabout route where we:
  Wrapped the XLA allocator in an XlaDeviceAllocator
  Then wrapped the XlaDeviceAllocator in an XlaAllocator

This leaves less to go wrong. Ideally we'd actually use StreamExecutor's allocator here, but this is less useful than XLA's as it doesn't provide helpful OOM messages (just returns nullptr).

PiperOrigin-RevId: 191048184

6 years agoInternal change.
Anna R [Fri, 30 Mar 2018 06:35:30 +0000 (23:35 -0700)]
Internal change.

PiperOrigin-RevId: 191037166

6 years agoMerged commit includes the following changes:
A. Unique TensorFlower [Fri, 30 Mar 2018 04:20:50 +0000 (21:20 -0700)]
Merged commit includes the following changes:
191029891  by xiejw:

    Fix python script file.

--
191029336  by isaprykin:

    Add .configure method to the whole hierarchy of DistributionStrategies.

--
191026971  by blamb:

    Updates get_started nav and renames the beginner guides to include eager.

--
191025863  by mrry:

    Add private Python API for accessing the C++ Session::*Callable API.

--
191025795  by mikecase:

    Internal Change.

--
191024780  by isaprykin:

    Internal change.

--

PiperOrigin-RevId: 191029891

6 years agoAdd summaries from only the first tower in distributed strategy.
Priya Gupta [Fri, 30 Mar 2018 02:57:49 +0000 (19:57 -0700)]
Add summaries from only the first tower in distributed strategy.

PiperOrigin-RevId: 191024726

6 years agoInternal Change.
Anjali Sridhar [Fri, 30 Mar 2018 02:57:27 +0000 (19:57 -0700)]
Internal Change.

PiperOrigin-RevId: 191024708

6 years agoInternal change
Yuefeng Zhou [Fri, 30 Mar 2018 02:56:47 +0000 (19:56 -0700)]
Internal change

PiperOrigin-RevId: 191024677

6 years agoInternal change
Rohan Jain [Fri, 30 Mar 2018 02:45:17 +0000 (19:45 -0700)]
Internal change

PiperOrigin-RevId: 191024085

6 years agoBUGFIX: sample_stats.percentile: Fractions for interpolation were done in
Ian Langmore [Fri, 30 Mar 2018 02:29:21 +0000 (19:29 -0700)]
BUGFIX:  sample_stats.percentile:  Fractions for interpolation were done in
float, which caused the error d - 1 == d for large 'd'.  Fix is to do in
double.  Also clipping index values to [0,..., d - 1] in case double isn't enough for some huge array
PiperOrigin-RevId: 191023164

6 years agoInternal change.
Igor Saprykin [Fri, 30 Mar 2018 02:29:14 +0000 (19:29 -0700)]
Internal change.

PiperOrigin-RevId: 191023160

6 years agoAdd basic serialization support to DistributedVariable (by using the underlying prima...
Priya Gupta [Fri, 30 Mar 2018 02:24:58 +0000 (19:24 -0700)]
Add basic serialization support to DistributedVariable (by using the underlying primary variable's serialization). Also, throw an exception when trying to de-serialize as we haven't implemented that yet.

PiperOrigin-RevId: 191022884

6 years agoAdd output info into op_context otherwise the estimator crashes when OOM.
Rui Zhao [Fri, 30 Mar 2018 02:02:29 +0000 (19:02 -0700)]
Add output info into op_context otherwise the estimator crashes when OOM.

PiperOrigin-RevId: 191021184

6 years agoPrevent infinite loop in constant folding when materializing broadcast gradient nodes...
A. Unique TensorFlower [Fri, 30 Mar 2018 01:57:52 +0000 (18:57 -0700)]
Prevent infinite loop in constant folding when materializing broadcast gradient nodes that are subsequently constant folded.

PiperOrigin-RevId: 191020868

6 years agoInternal change.
Igor Saprykin [Fri, 30 Mar 2018 01:50:05 +0000 (18:50 -0700)]
Internal change.

PiperOrigin-RevId: 191020351

6 years agoDisable shape inference for functions since it doesn't seem to work when
Benoit Steiner [Fri, 30 Mar 2018 01:44:12 +0000 (18:44 -0700)]
Disable shape inference for functions since it doesn't seem to work when
functions are instantiated inside a while loop.

PiperOrigin-RevId: 191019870

6 years agoFixed typo in PReLU.
A. Unique TensorFlower [Fri, 30 Mar 2018 01:37:21 +0000 (18:37 -0700)]
Fixed typo in PReLU.

PiperOrigin-RevId: 191019421

6 years agoGetting rid of the threadpool from FunctionBufferingResource. It wasn't really servin...
Rohan Jain [Fri, 30 Mar 2018 01:18:28 +0000 (18:18 -0700)]
Getting rid of the threadpool from FunctionBufferingResource. It wasn't really serving much purpose apart from moving all the function logic execution onto those threads and making the destruction of the resource quite complicated.

PiperOrigin-RevId: 191017836

6 years agoMove the simple_estimator_example to the examples/ dir.
Anjali Sridhar [Fri, 30 Mar 2018 01:15:34 +0000 (18:15 -0700)]
Move the simple_estimator_example to the examples/ dir.

PiperOrigin-RevId: 191017560

6 years agoAdd distribution support for incrementing the global step.
A. Unique TensorFlower [Fri, 30 Mar 2018 01:11:09 +0000 (18:11 -0700)]
Add distribution support for incrementing the global step.
Don't require Dataset as input to eval and predict even when using
a DistributionStrategy.

PiperOrigin-RevId: 191017191

6 years agoPort TensorFlow demo to TFLite with three activities: MobileNet Classification, Mobil...
Andrew Harp [Fri, 30 Mar 2018 00:57:27 +0000 (17:57 -0700)]
Port TensorFlow demo to TFLite with three activities: MobileNet Classification, MobileNet SSD Object Detection, and Speech hotword classification

PiperOrigin-RevId: 191015617

6 years ago* Added a JavaScript tab to DEVELOP.
A. Unique TensorFlower [Fri, 30 Mar 2018 00:30:09 +0000 (17:30 -0700)]
* Added a JavaScript tab to DEVELOP.
* Added a JavaScript file to DEPLOY.
* Added a link to JavaScript API Ref.

PiperOrigin-RevId: 191012951

6 years agoTighten the condition for node removal next to device crossings, since the previous...
A. Unique TensorFlower [Fri, 30 Mar 2018 00:16:46 +0000 (17:16 -0700)]
Tighten the condition for node removal next to device crossings, since the previous changes were observed to cause a performance regression for distributed execution.

PiperOrigin-RevId: 191011347

6 years agoAdd details of new mailing lists
A. Unique TensorFlower [Fri, 30 Mar 2018 00:15:33 +0000 (17:15 -0700)]
Add details of new mailing lists

PiperOrigin-RevId: 191011187

6 years agoUpdating documentation.
Nupur Garg [Thu, 29 Mar 2018 23:56:42 +0000 (16:56 -0700)]
Updating documentation.

PiperOrigin-RevId: 191008662

6 years agoFixing a subtle bug where in some cases the post cancellation work wasn't being done...
Rohan Jain [Thu, 29 Mar 2018 23:50:34 +0000 (16:50 -0700)]
Fixing a subtle bug where in some cases the post cancellation work wasn't being done correctly. This is the scenario in which FunctionBufferingResource::Cancel() got called while buffering was being done, but then the buffer filled up in which case FillBuffer() wasn't ever called and the Cancel() method would get stuck waiting on a notification from the condition variable leading to timeouts. This CL fixes this by making sure FillBuffer() got called one last time in this case.

Tested by running contrib/data/python/kernel_tests:prefetching_ops_test 500 times and ran contrib/distribute/python:values_test 500 times with no timeouts.

PiperOrigin-RevId: 191007895

6 years agoMinor language change in readme.
Priya Gupta [Thu, 29 Mar 2018 23:37:05 +0000 (16:37 -0700)]
Minor language change in readme.

PiperOrigin-RevId: 191006151

6 years agoAdd support for running benchmarks in XLA unit tests.
Mark Heffernan [Thu, 29 Mar 2018 23:02:26 +0000 (16:02 -0700)]
Add support for running benchmarks in XLA unit tests.
In the XLA internal test 'main', parse the --benchmarks flag if it exists
and runs the specified benchmarks. Previously microbenchmarks defined in
unit tests were never run.

PiperOrigin-RevId: 191001183

6 years agoUpdated eager guide to use tensorflow 1.7.
Billy Lamberta [Thu, 29 Mar 2018 23:01:20 +0000 (16:01 -0700)]
Updated eager guide to use tensorflow 1.7.
Code snippets still work.

PiperOrigin-RevId: 191001008

6 years ago- Expose slim arg_scope function to compute keys to enable tessting.
A. Unique TensorFlower [Thu, 29 Mar 2018 22:40:14 +0000 (15:40 -0700)]
- Expose slim arg_scope function to compute keys to enable tessting.
- Add is_training=None option to mobinenet arg_scopes. This allows the users to set is_training from an outer scope.

PiperOrigin-RevId: 190997959

6 years agoUndisables broken list_ops_test
Alexandre Passos [Thu, 29 Mar 2018 22:36:14 +0000 (15:36 -0700)]
Undisables broken list_ops_test

PiperOrigin-RevId: 190997355

6 years ago capture_tpu_profile will fallback to old behavior if user specify local directories...
A. Unique TensorFlower [Thu, 29 Mar 2018 22:32:42 +0000 (15:32 -0700)]
  capture_tpu_profile will fallback to old behavior if user specify local directories as model directory.

PiperOrigin-RevId: 190996878

6 years agoInternal Change
Priya Gupta [Thu, 29 Mar 2018 22:32:14 +0000 (15:32 -0700)]
Internal Change

PiperOrigin-RevId: 190996815

6 years agoAdd tf.contrib.distribute, which defines classes DistributionStrategy
A. Unique TensorFlower [Thu, 29 Mar 2018 22:28:24 +0000 (15:28 -0700)]
Add tf.contrib.distribute, which defines classes DistributionStrategy
and MirroredStrategy, and related functionality.

Also add tf.contrib.optimizer_v2, an update to the Optimizer API.

RELNOTES: Can now pass tf.contrib.distribute.MirroredStrategy() to
tf.estimator.RunConfig() to run an Estimator model on multiple GPUs
on one machine.
PiperOrigin-RevId: 190996247

6 years agoInternal change.
Anna R [Thu, 29 Mar 2018 22:20:38 +0000 (15:20 -0700)]
Internal change.

PiperOrigin-RevId: 190995029

6 years ago[XLA] Remove some dead code from Executable.
A. Unique TensorFlower [Thu, 29 Mar 2018 22:18:59 +0000 (15:18 -0700)]
[XLA] Remove some dead code from Executable.

PiperOrigin-RevId: 190994733

6 years agoTFLite logs to stderr.
Eugene Brevdo [Thu, 29 Mar 2018 22:05:31 +0000 (15:05 -0700)]
TFLite logs to stderr.

PiperOrigin-RevId: 190992629

6 years agoLSTM support: Add non-uint8 quantized elementwise unary operators.
A. Unique TensorFlower [Thu, 29 Mar 2018 21:25:10 +0000 (14:25 -0700)]
LSTM support: Add non-uint8 quantized elementwise unary operators.

PiperOrigin-RevId: 190986046

6 years agoboosted_trees: post-submit clean up
Younghee Kwon [Thu, 29 Mar 2018 21:17:16 +0000 (14:17 -0700)]
boosted_trees: post-submit clean up
 - non-public objects are renamed.
 - is_single_machine is set properly when run_config is not populated properly (i.e. empty).
PiperOrigin-RevId: 190984693

6 years ago[XLA] Remove note about what implementations do for DynamicSlice and DynamicUpdateSlice.
Michael Kuperstein [Thu, 29 Mar 2018 20:59:36 +0000 (13:59 -0700)]
[XLA] Remove note about what implementations do for DynamicSlice and DynamicUpdateSlice.

It is impossible to commit to a particular "implementation-defined behavior" for all implementations.

PiperOrigin-RevId: 190981804

6 years agoTurns eager device placement on by default.
Alexandre Passos [Thu, 29 Mar 2018 20:35:34 +0000 (13:35 -0700)]
Turns eager device placement on by default.

Change the device policy to have silent copies, which are logged when
RunMetadata tracking is enabled.

In the process, changed TensorHandle to always keep its context around if
it gets one. Changed TFE_TensorHandleResolve to, if necessary, copy to the
CPU (since the user has no control as to whether this copy is needed by
default).

PiperOrigin-RevId: 190978086

6 years agoDocs: Add Eager Execution guide to Programmer's Guide.
Billy Lamberta [Thu, 29 Mar 2018 20:31:23 +0000 (13:31 -0700)]
Docs: Add Eager Execution guide to Programmer's Guide.

PiperOrigin-RevId: 190977505

6 years agoDocs: Move TFLite docs into tensorflow.org
Billy Lamberta [Thu, 29 Mar 2018 20:28:05 +0000 (13:28 -0700)]
Docs: Move TFLite docs into tensorflow.org

PiperOrigin-RevId: 190977057

6 years agoUse GraphProperties directly in ArithmeticOptimizer.
A. Unique TensorFlower [Thu, 29 Mar 2018 20:27:01 +0000 (13:27 -0700)]
Use GraphProperties directly in ArithmeticOptimizer.

PiperOrigin-RevId: 190976918

6 years agoUpdating a test in constant_folding_test.cc that uses a graph with placeholder nodes...
A. Unique TensorFlower [Thu, 29 Mar 2018 20:24:38 +0000 (13:24 -0700)]
Updating a test in constant_folding_test.cc that uses a graph with placeholder nodes by providing input to those nodes. This will allow evaluation of the fetch nodes in the optimized and original graph and check whether the output tensors produced by them are the same.

PiperOrigin-RevId: 190976595

6 years agoInternal change.
Yuefeng Zhou [Thu, 29 Mar 2018 20:22:45 +0000 (13:22 -0700)]
Internal change.

PiperOrigin-RevId: 190976338

6 years agoFix docstring.
A. Unique TensorFlower [Thu, 29 Mar 2018 20:18:54 +0000 (13:18 -0700)]
Fix docstring.

PiperOrigin-RevId: 190975767

6 years agoAvoid evaluating SaveSpec Tensors multiple times when executing eagerly
Allen Lavoie [Thu, 29 Mar 2018 19:58:43 +0000 (12:58 -0700)]
Avoid evaluating SaveSpec Tensors multiple times when executing eagerly

The Saver now calls a SaveSpec callable once when saving and not at all when restoring. Previously saving evaluated the callable twice and restoring once (copying a variable's value each time).

Requires a dtype be passed to a SaveSpec if its tensor is callable.

PiperOrigin-RevId: 190972754

6 years agoMinor adjustments to an error message.
Jonathan Hseu [Thu, 29 Mar 2018 19:54:59 +0000 (12:54 -0700)]
Minor adjustments to an error message.

PiperOrigin-RevId: 190972253

6 years agoAdd more tflite hosted models like resnet, inception-v4, nasnet.
Zhixian Yan [Thu, 29 Mar 2018 19:39:33 +0000 (12:39 -0700)]
Add more tflite hosted models like resnet, inception-v4, nasnet.

PiperOrigin-RevId: 190970367

6 years agoLeaves attributes on outside_compilation nodes so they can be replicated in a later...
A. Unique TensorFlower [Thu, 29 Mar 2018 19:02:50 +0000 (12:02 -0700)]
Leaves attributes on outside_compilation nodes so they can be replicated in a later pass.

PiperOrigin-RevId: 190965218

6 years agoInitialize pointer to ScopedAllocatorMgr in BaseGPUDevice.
Ayush Dubey [Thu, 29 Mar 2018 18:54:55 +0000 (11:54 -0700)]
Initialize pointer to ScopedAllocatorMgr in BaseGPUDevice.

PiperOrigin-RevId: 190964008

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 29 Mar 2018 18:24:44 +0000 (11:24 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 190959179

6 years agoAutomated g4 rollback of changelist 190808678
A. Unique TensorFlower [Thu, 29 Mar 2018 18:02:56 +0000 (11:02 -0700)]
Automated g4 rollback of changelist 190808678

PiperOrigin-RevId: 190955400

6 years agoAutomated g4 rollback of changelist 190858242
Jianwei Xie [Thu, 29 Mar 2018 17:50:46 +0000 (10:50 -0700)]
Automated g4 rollback of changelist 190858242

PiperOrigin-RevId: 190953197

6 years agoAllow experimental string attrs for functions.
Patrick Nguyen [Thu, 29 Mar 2018 17:41:36 +0000 (10:41 -0700)]
Allow experimental string attrs for functions.

PiperOrigin-RevId: 190951605

6 years agoCache op input's fetched from the C API.
Skye Wanderman-Milne [Thu, 29 Mar 2018 17:40:55 +0000 (10:40 -0700)]
Cache op input's fetched from the C API.

PiperOrigin-RevId: 190951499

6 years ago[XLA:GPU] Assume that tuple sub-buffers are available at runtime.
Justin Lebar [Thu, 29 Mar 2018 17:30:31 +0000 (10:30 -0700)]
[XLA:GPU] Assume that tuple sub-buffers are available at runtime.

Previously we assumed this was not the case, and allowed front-ends to
pass in a pointer to tuple without also passing in pointers to
sub-buffers.

This mostly worked: Whenever we wanted a tuple sub-buffer, we'd just
chase the tuple's pointers in our emitted kernel.

But this doesn't work if we ever need a pointer to that sub-buffer on
the host.  Which we do if e.g. the sub-buffer is an input to a cudnn
call.

There are various ways to make this work, but by far the simplest and
most efficient is simply to specify away this problem, and say that the
front-end *must* give us all the pointers we want.  This is what the
earlier change, "Assert that all buffers and sub-buffers passed to XLA
have an explicit pointer" did.

This change adds a testcase and lets us skip some pointer chasing when
we have a tuple whose sub-buffers are known statically.

PiperOrigin-RevId: 190949743

6 years agoLSTM support: Further quantized Fully-Connected op optimization.
A. Unique TensorFlower [Thu, 29 Mar 2018 17:12:42 +0000 (10:12 -0700)]
LSTM support: Further quantized Fully-Connected op optimization.

PiperOrigin-RevId: 190946885

6 years agoAutomated g4 rollback of changelist 190728742
A. Unique TensorFlower [Thu, 29 Mar 2018 17:06:52 +0000 (10:06 -0700)]
Automated g4 rollback of changelist 190728742

PiperOrigin-RevId: 190946066

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 29 Mar 2018 16:46:06 +0000 (09:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 190942952

6 years agoAdded kernels and estimators for Gradient Boosting Trees algorithm.
Younghee Kwon [Thu, 29 Mar 2018 16:43:19 +0000 (09:43 -0700)]
Added kernels and estimators for Gradient Boosting Trees algorithm.
BoostedTreesClassifier and BoostedTreesRegressor are added to tf.estimator.
Also some training utility functions are added to tf.contrib.estimator.

PiperOrigin-RevId: 190942599

6 years agoAdd bitcast for equal bitwidth casts.
Jacques Pienaar [Thu, 29 Mar 2018 16:42:05 +0000 (09:42 -0700)]
Add bitcast for equal bitwidth casts.

Map bitcasts to XLA bitcast HLO if the bitwidth of the elementtype is the same.

PiperOrigin-RevId: 190942398

6 years agoUpgrade Eigen version.
A. Unique TensorFlower [Thu, 29 Mar 2018 16:41:53 +0000 (09:41 -0700)]
Upgrade Eigen version.

PiperOrigin-RevId: 190942370

6 years ago[tf.data] Optimizations on make_csv_dataset internals.
Rachel Lim [Thu, 29 Mar 2018 15:19:17 +0000 (08:19 -0700)]
[tf.data] Optimizations on make_csv_dataset internals.

PiperOrigin-RevId: 190933143

6 years agoAdd meta-distribution which reshapes batch dims.
Joshua V. Dillon [Thu, 29 Mar 2018 14:56:15 +0000 (07:56 -0700)]
Add meta-distribution which reshapes batch dims.

PiperOrigin-RevId: 190930846

6 years agoInternal change.
Anna R [Thu, 29 Mar 2018 11:34:29 +0000 (04:34 -0700)]
Internal change.

PiperOrigin-RevId: 190913047

6 years agoMove the swapping kernels to the all_kernels library to avoid registering them
Benoit Steiner [Thu, 29 Mar 2018 06:31:26 +0000 (23:31 -0700)]
Move the swapping kernels to the all_kernels library to avoid registering them
more than once from tensorflow/contrib.

PiperOrigin-RevId: 190887394

6 years agoAdd --announce_rc Bazel arg to several of our builds.
Michael Case [Thu, 29 Mar 2018 05:46:25 +0000 (22:46 -0700)]
Add --announce_rc Bazel arg to several of our builds.

This will help to...
 - Refactor the build scripts without accidently adding functional changes.
 - Help debug several issues where some options aren't being added correctly
   by configure script.

PiperOrigin-RevId: 190884531

6 years agoDistributionStrategy-enable Estimator.
A. Unique TensorFlower [Thu, 29 Mar 2018 04:52:30 +0000 (21:52 -0700)]
DistributionStrategy-enable Estimator.

PiperOrigin-RevId: 190882152

6 years agoFix TensorList decoding bug. Thanks to Alexandre Passos for finding this.
A. Unique TensorFlower [Thu, 29 Mar 2018 04:11:16 +0000 (21:11 -0700)]
Fix TensorList decoding bug. Thanks to Alexandre Passos for finding this.

PiperOrigin-RevId: 190879840

6 years agoFixed the shape function of the SplitV op that incorrectly often assumed that
Benoit Steiner [Thu, 29 Mar 2018 04:07:02 +0000 (21:07 -0700)]
Fixed the shape function of the SplitV op that incorrectly often assumed that
the shape of all the outputs is the same.

PiperOrigin-RevId: 190879600

6 years agoSupport structured source in GradientTape.gradient
Igor Ganichev [Thu, 29 Mar 2018 03:51:01 +0000 (20:51 -0700)]
Support structured source in GradientTape.gradient

Before this change, it was easy to forget [] around the source tensor.
This mistake lead to GradientTape.gradient(), returning a list of Nones.
Nones normally tell to the user that the source and the target are
not connected via differentiable operations, which is not the source
of the error in this case.

Instead of adding a check that `sources` is a list of tensors, this CL
adds ability to handle structured source (which includes a lone tensor),
similarly to many existing TensorFlow APIs.

Also, with Alex's help, it fixes a bug where repeated tensors in
`sources` were not handled correctly.

PiperOrigin-RevId: 190878583

6 years agoRemove all_opensource_files. It's not needed any more.
Martin Wicke [Thu, 29 Mar 2018 03:46:14 +0000 (20:46 -0700)]
Remove all_opensource_files. It's not needed any more.

PiperOrigin-RevId: 190878279

6 years ago[tf.data] Maintain a reference on the FunctionBufferingResource while a get-next...
Derek Murray [Thu, 29 Mar 2018 03:44:51 +0000 (20:44 -0700)]
[tf.data] Maintain a reference on the FunctionBufferingResource while a get-next operation is active.

Previously, the reference count on a FunctionBufferingResource could drop to 0 and it could be deleted (e.g. by a DestroyResourceOp) while a get-next operation is active on it. This would lead to use-after-free errors.

PiperOrigin-RevId: 190878208

6 years agoRelax limitations on rerouting graph outputs.
Suharsh Sivakumar [Thu, 29 Mar 2018 02:21:08 +0000 (19:21 -0700)]
Relax limitations on rerouting graph outputs.

- Allow multiple outputs of output_tensors in fold_batch_norms.
- Allow duplicate consumers in quantize.
- I also quick a fix issue for matching final layers that have batch norm.

PiperOrigin-RevId: 190873003

6 years ago[XLA] Redesign: implement GetComputationStats.
A. Unique TensorFlower [Thu, 29 Mar 2018 01:54:09 +0000 (18:54 -0700)]
[XLA] Redesign: implement GetComputationStats.

PiperOrigin-RevId: 190871262

6 years agoRelax CuDNN version requirements because CuDNN is backwards compatible within
Smit Hinsu [Thu, 29 Mar 2018 01:26:46 +0000 (18:26 -0700)]
Relax CuDNN version requirements because CuDNN is backwards compatible within
a major release starting with CuDNN 7.0

PiperOrigin-RevId: 190869028

6 years agoImplement assert_same_structure in C++
Igor Ganichev [Thu, 29 Mar 2018 01:26:30 +0000 (18:26 -0700)]
Implement assert_same_structure in C++

Also implements helper functions nest._is_namedtuple
nest._same_namedtuple.

Also, fix a bug in FlattenHelper where error from recursive
calls were not propagated up immediately.

This change implements a good chunk of machinery that will
allow us to move map_structure to C++.

Before:
entry {
  name: "NestBenchmark.assert_same_structure_6_elem"
  iters: 30000
  wall_time: 4.79532718658e-05
}

entry {
  name: "NestBenchmark.assert_same_structure_60_elem"
  iters: 30000
  wall_time: 0.000403008667628
}

After:
entry {
  name: "NestBenchmark.assert_same_structure_6_elem"
  iters: 30000
  wall_time: 1.65301720301e-05
}

entry {
  name: "NestBenchmark.assert_same_structure_60_elem"
  iters: 30000
  wall_time: 0.000147621099154
}

PiperOrigin-RevId: 190869007

6 years agoTPU: Implement 3rd gen input pipeline config.
Brennan Saeta [Thu, 29 Mar 2018 00:54:01 +0000 (17:54 -0700)]
TPU: Implement 3rd gen input pipeline config.

In this new configuration, we are able to drive a Cloud TPU at full device performance, and achieve over 3k images/sec on ResNet-50. The previous bottleneck was the un-pipeline-able split that occurred after the iterator.get_next() call. This split (when not splitting on the batch-major dimension) caused the training job to be single-threaded-CPU-bottlenecked, resulting in a performance of only ~2650 images/sec on ResNet-50.

This latest input pipeline configuration requires the use of datasets. By requiring datasets, we gain the ability to call get_next() num_replicas times per host, and avoid the expensive split op. (Note: this also opens up potential future avenues for further optimization.) Despite this, we retain a lot of nice usability properties that per_host_v1 (aka input pipeline config v2) gave us.

PiperOrigin-RevId: 190865741

6 years agoFurther speed up statistical_testing_test by breaking up DKWM test.
A. Unique TensorFlower [Thu, 29 Mar 2018 00:36:30 +0000 (17:36 -0700)]
Further speed up statistical_testing_test by breaking up DKWM test.

PiperOrigin-RevId: 190863893

6 years agoMissed ScopedUnref in ResourceGather
Alexandre Passos [Thu, 29 Mar 2018 00:16:10 +0000 (17:16 -0700)]
Missed ScopedUnref in ResourceGather

PiperOrigin-RevId: 190861558

6 years agoCollective Ops Part 1
A. Unique TensorFlower [Thu, 29 Mar 2018 00:06:44 +0000 (17:06 -0700)]
Collective Ops Part 1

The basic interface definitions, local-only versions of remote-access,
param-resolution, device-resolution and mgr.

A collective op is able to execute synchronously across devices
and across separate graphs. Collective ops to be introduced eventually
include broadcast and all-reduce.  This change is part of a series of
changes that will introduce the necessary infrastructure then the
initial op implementations.

PiperOrigin-RevId: 190860248

6 years agoAutomated g4 rollback of changelist 190835392
Anna R [Wed, 28 Mar 2018 23:52:39 +0000 (16:52 -0700)]
Automated g4 rollback of changelist 190835392

PiperOrigin-RevId: 190858242

6 years agoTower-local variable support for DistributionStrategy. Each tower has
A. Unique TensorFlower [Wed, 28 Mar 2018 23:16:48 +0000 (16:16 -0700)]
Tower-local variable support for DistributionStrategy. Each tower has
its own variable, but fetch() and checkpoint apply a reduction to get
a single value.

PiperOrigin-RevId: 190853123

6 years agoAdd IsSquare bool to the grappler op_types.
A. Unique TensorFlower [Wed, 28 Mar 2018 23:12:51 +0000 (16:12 -0700)]
Add IsSquare bool to the grappler op_types.

PiperOrigin-RevId: 190852501

6 years ago[tf.data] Expose the symbol `tf.contrib.data.make_csv_dataset()`.
Derek Murray [Wed, 28 Mar 2018 22:54:31 +0000 (15:54 -0700)]
[tf.data] Expose the symbol `tf.contrib.data.make_csv_dataset()`.

PiperOrigin-RevId: 190849333

6 years agoRefresh Community pages to surface new resources, SIGs and mailing lists.
A. Unique TensorFlower [Wed, 28 Mar 2018 22:31:19 +0000 (15:31 -0700)]
Refresh Community pages to surface new resources, SIGs and mailing lists.

PiperOrigin-RevId: 190845545

6 years agoAutomated g4 rollback of changelist 190801044
A. Unique TensorFlower [Wed, 28 Mar 2018 21:59:53 +0000 (14:59 -0700)]
Automated g4 rollback of changelist 190801044

PiperOrigin-RevId: 190839672