platform/upstream/tensorflow.git
7 years agoInternal change
A. Unique TensorFlower [Tue, 2 Jan 2018 20:11:10 +0000 (12:11 -0800)]
Internal change

PiperOrigin-RevId: 180576390

7 years agoImplement reference transpose kernel.
Andrew Selle [Tue, 2 Jan 2018 19:32:41 +0000 (11:32 -0800)]
Implement reference transpose kernel.

PiperOrigin-RevId: 180571064

7 years ago[tf.data] Move existing tests to use dataset_serialization_test_base.
Shivani Agrawal [Tue, 2 Jan 2018 19:32:37 +0000 (11:32 -0800)]
[tf.data] Move existing tests to use dataset_serialization_test_base.

PiperOrigin-RevId: 180571052

7 years agoSupport PadV2, MirrorPad, and MirrorPadGrad ops.
Yao Zhang [Tue, 2 Jan 2018 19:32:34 +0000 (11:32 -0800)]
Support PadV2, MirrorPad, and MirrorPadGrad ops.

PiperOrigin-RevId: 180571040

7 years agoUpdate docstring to be more accurate and indicate notes of usage.
Surya Bhupatiraju [Tue, 2 Jan 2018 19:32:34 +0000 (11:32 -0800)]
Update docstring to be more accurate and indicate notes of usage.

PiperOrigin-RevId: 180571039

7 years ago[TF] TPU context subclasses an XLA context from core.
Eugene Brevdo [Tue, 2 Jan 2018 19:26:57 +0000 (11:26 -0800)]
[TF] TPU context subclasses an XLA context from core.

Making it easier to tell in the future if we are inside an XLA context.

PiperOrigin-RevId: 180570231

7 years agore-enabling a test after the llvm bug was fixed
Olivia Nordquist [Tue, 2 Jan 2018 18:50:25 +0000 (10:50 -0800)]
re-enabling a test after the llvm bug was fixed

PiperOrigin-RevId: 180565013

7 years agoRemove using directives. Test appertaining to ops have been moved into namespace...
A. Unique TensorFlower [Tue, 2 Jan 2018 18:45:56 +0000 (10:45 -0800)]
Remove using directives. Test appertaining to ops have been moved into namespace tensorflow::ops; all other tests now use explicit using-declarations.

Some tests are now using unnamed namespaces more aggressively to make as many names internal as possible.

PiperOrigin-RevId: 180564422

7 years ago[XLA] Fix a bug in --xla_hlo_profile and add a test that would have caught it
Sanjoy Das [Tue, 2 Jan 2018 18:37:44 +0000 (10:37 -0800)]
[XLA] Fix a bug in --xla_hlo_profile and add a test that would have caught it

I'm pretty sure I introduced the bug when refactoring HloExecutionProfile some
time back.

Also change the bytes-per-cycle field to use a floating point format when its
value is less than 1, to avoid rounding down to 0 (common on CPU).

PiperOrigin-RevId: 180563380

7 years agoLet tf.constant_initializer accept tuples as intiail values
Shanqing Cai [Tue, 2 Jan 2018 18:24:55 +0000 (10:24 -0800)]
Let tf.constant_initializer accept tuples as intiail values

following CL/180416775

PiperOrigin-RevId: 180561696

7 years agoGrappler item_test: fix item order dependency
Shanqing Cai [Tue, 2 Jan 2018 16:38:44 +0000 (08:38 -0800)]
Grappler item_test: fix item order dependency

by replacing assertEqual() with assertItemsEqual()

Fixes test failures such as:
http://ci.tensorflow.org/view/Tensorflow%20Jenkins%20Monitored%20builds/job/nightly-matrix-cpu/TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON3,label=cpu-slave/763/consoleFull

PiperOrigin-RevId: 180550331

7 years agoRemove 'gpu_clang' CI Docker image, use 'gpu' image instead.
Ilya Biryukov [Tue, 2 Jan 2018 13:06:01 +0000 (05:06 -0800)]
Remove 'gpu_clang' CI Docker image, use 'gpu' image instead.

The clang is now downloaded using the new TF_DOWNLOAD_CLANG option at build
time.

Also removes GPU-specific env vars from 'tools/ci_build/builds/configured',
they are now passed directly to 'docker run' instead.

PiperOrigin-RevId: 180536813

7 years agoK-FAC: Support onehot categorical in kfac.loss_functions.
A. Unique TensorFlower [Tue, 2 Jan 2018 13:02:34 +0000 (05:02 -0800)]
K-FAC: Support onehot categorical in kfac.loss_functions.

PiperOrigin-RevId: 180536416

7 years agoDisable flaky replicate_model_fn_test.
Gunhan Gulsoy [Tue, 2 Jan 2018 05:48:15 +0000 (21:48 -0800)]
Disable flaky replicate_model_fn_test.

PiperOrigin-RevId: 180512413

7 years agoDesign tweaks of Fisher Factor classes. Now they don't declare ops in their construc...
A. Unique TensorFlower [Mon, 31 Dec 2018 17:53:18 +0000 (09:53 -0800)]
Design tweaks of Fisher Factor classes.  Now they don't declare ops in their constructors, except possibly for making the cov variables (is this considered an op?).  This should allow for easier control over device placement of various ops in the future.

Fixed some problems with how colocations were done for ops computed in the base class and in the RNN class.

Colocations now controlled with global configuration variable (similar to the rest of the configuration of the FisherFactor classes).

PiperOrigin-RevId: 180441903

7 years agoUsability improvement for tf.constant_initializer
Shanqing Cai [Sun, 31 Dec 2017 05:25:36 +0000 (21:25 -0800)]
Usability improvement for tf.constant_initializer

* Raise TypeError if the input value is not one of the expected types,
  e.g., a tf.Tensor. Previously, the error is delayed until Session.run()
  time and the message is very obscure, e.g.,
  "TypeError: Expected float32, got list containing Tensors of type
   '_Message' instead."

PiperOrigin-RevId: 180416775

7 years agoUpdate TOCO for user friendly error messages.
A. Unique TensorFlower [Sat, 30 Dec 2017 03:03:15 +0000 (19:03 -0800)]
Update TOCO for user friendly error messages.

PiperOrigin-RevId: 180368346

7 years agoAdd dependency on gast.
A. Unique TensorFlower [Fri, 29 Dec 2017 20:14:30 +0000 (12:14 -0800)]
Add dependency on gast.

PiperOrigin-RevId: 180354109

7 years agoMinor change to make tpu.rewrite compatible with Python 3.
Frank Chen [Fri, 29 Dec 2017 01:30:49 +0000 (17:30 -0800)]
Minor change to make tpu.rewrite compatible with Python 3.

AttrValue is a byte array, and handling this is different between Python 2 and 3.

PiperOrigin-RevId: 180306415

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Fri, 29 Dec 2017 01:13:39 +0000 (17:13 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 180305698

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Fri, 29 Dec 2017 01:04:47 +0000 (17:04 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 180305277

7 years agoFix tf.train.piecewise_constant docstring example.
Reed Wanderman-Milne [Fri, 29 Dec 2017 01:00:26 +0000 (17:00 -0800)]
Fix tf.train.piecewise_constant docstring example.

The example currently implies that if the global_step is on the first boundary, it takes the second value, not the first. In reality, it takes the first value.

PiperOrigin-RevId: 180304929

7 years ago[XLA:CPU] Use a simpler mechanism to fetch llvm::TargetTransformInfo
Sanjoy Das [Fri, 29 Dec 2017 00:47:34 +0000 (16:47 -0800)]
[XLA:CPU] Use a simpler mechanism to fetch llvm::TargetTransformInfo

This resolves the TODO.  The backing change landed in LLVM in
https://reviews.llvm.org/rL321375

PiperOrigin-RevId: 180304271

7 years ago[TF:XLA] Bump open source llvm revision to r321490
Sanjoy Das [Fri, 29 Dec 2017 00:13:40 +0000 (16:13 -0800)]
[TF:XLA] Bump open source llvm revision to r321490

PiperOrigin-RevId: 180302351

7 years agoMerge changes from github.
Patrick Nguyen [Fri, 29 Dec 2017 00:04:42 +0000 (16:04 -0800)]
Merge changes from github.

PiperOrigin-RevId: 180301735

7 years agoFix saved_model_cli _print_tensor_info for REF types.
Yifei Feng [Thu, 28 Dec 2017 21:57:18 +0000 (13:57 -0800)]
Fix saved_model_cli _print_tensor_info for REF types.
Fix #15611.

PiperOrigin-RevId: 180292752

7 years ago[XLA] Fix hlo_graph_dumper: don't crash if the computation has a constant root instru...
A. Unique TensorFlower [Thu, 28 Dec 2017 20:03:59 +0000 (12:03 -0800)]
[XLA] Fix hlo_graph_dumper: don't crash if the computation has a constant root instruction.

PiperOrigin-RevId: 180285687

7 years ago[XLA:CPU] Implement RngBernoulli for F32 and F64
Sanjoy Das [Thu, 28 Dec 2017 19:26:03 +0000 (11:26 -0800)]
[XLA:CPU] Implement RngBernoulli for F32 and F64

PiperOrigin-RevId: 180283205

7 years agoUpgrade TF CI scripts to use cuda 9.
Gunhan Gulsoy [Thu, 28 Dec 2017 07:43:49 +0000 (23:43 -0800)]
Upgrade TF CI scripts to use cuda 9.

PiperOrigin-RevId: 180246669

7 years agoImprove a text comment in replicate_model_fn.GatheringOptimizer.
Igor Saprykin [Wed, 27 Dec 2017 23:12:38 +0000 (15:12 -0800)]
Improve a text comment in replicate_model_fn.GatheringOptimizer.

PiperOrigin-RevId: 180224227

7 years agoBump the limit on checkpopint_utils_test as it is failing consistently with the curre...
Gunhan Gulsoy [Wed, 27 Dec 2017 19:12:46 +0000 (11:12 -0800)]
Bump the limit on checkpopint_utils_test as it is failing consistently with the current number by a small margin.

PiperOrigin-RevId: 180207280

7 years agoHack around a bug caused by bazel+tempfile+multiprocessing.
Gunhan Gulsoy [Wed, 27 Dec 2017 19:10:26 +0000 (11:10 -0800)]
Hack around a bug caused by bazel+tempfile+multiprocessing.

PiperOrigin-RevId: 180207077

7 years agoFix typo in export_savedmodel api doc.
A. Unique TensorFlower [Wed, 27 Dec 2017 18:27:17 +0000 (10:27 -0800)]
Fix typo in export_savedmodel api doc.

PiperOrigin-RevId: 180203426

7 years agoOptionally store the status code/message in the response
A. Unique TensorFlower [Wed, 27 Dec 2017 18:26:23 +0000 (10:26 -0800)]
Optionally store the status code/message in the response
body for RunGraph and RunStep RPCs, to workaround the fact that the
RPC subsystem truncates long metadata messages.

PiperOrigin-RevId: 180203356

7 years agotfdbg: Fix a bug in source file content reading
Shanqing Cai [Wed, 27 Dec 2017 17:07:25 +0000 (09:07 -0800)]
tfdbg: Fix a bug in source file content reading

Previously, calling strip() removed not only the trailing newline character, but also any leading spaces and tabs, which actually should be preserved. This CL fixes it.

PiperOrigin-RevId: 180198179

7 years agoRemove unwrapping for function argument inspection in Estimator.
Martin Wicke [Tue, 26 Dec 2017 19:07:00 +0000 (11:07 -0800)]
Remove unwrapping for function argument inspection in Estimator.

PiperOrigin-RevId: 180147476

7 years agoAssign subgraph created by cudnn_rnn saveable to the 1st GPU.
James Qin [Sun, 24 Dec 2017 19:34:41 +0000 (11:34 -0800)]
Assign subgraph created by cudnn_rnn saveable to the 1st GPU.

PiperOrigin-RevId: 180053468

7 years ago[TF:XLA] Refactor large list of hard-coded compile-time constant arguments to operato...
Peter Hawkins [Sat, 23 Dec 2017 16:59:26 +0000 (08:59 -0800)]
[TF:XLA] Refactor large list of hard-coded compile-time constant arguments to operators. Add a new .CompileTimeConstInput() annotation on kernel registrations instead.

PiperOrigin-RevId: 180008567

7 years agoAutomated g4 rollback of changelist 179983419
A. Unique TensorFlower [Sat, 23 Dec 2017 12:22:33 +0000 (04:22 -0800)]
Automated g4 rollback of changelist 179983419

PiperOrigin-RevId: 180000981

7 years agoAdds FFT for XLA: CPU via Eigen, GPU via cuFFT.
A. Unique TensorFlower [Sat, 23 Dec 2017 03:28:38 +0000 (19:28 -0800)]
Adds FFT for XLA: CPU via Eigen, GPU via cuFFT.

GPU support includes plan reuse with new scratch allocator per execution in fft_thunk.

PiperOrigin-RevId: 179983419

7 years agoFill the 4th and 5th output of FusedBatchNormGradOp with zeros so that check_op won...
Yuefeng Zhou [Sat, 23 Dec 2017 02:37:27 +0000 (18:37 -0800)]
Fill the 4th and 5th output of FusedBatchNormGradOp with zeros so that check_op won't fail.

PiperOrigin-RevId: 179981448

7 years agoAdds train_hooks into _TrainingExecutor.
Jianwei Xie [Sat, 23 Dec 2017 01:37:51 +0000 (17:37 -0800)]
Adds train_hooks into _TrainingExecutor.

PiperOrigin-RevId: 179978502

7 years agoRemove a few unused constructions and simplfy some code
A. Unique TensorFlower [Sat, 23 Dec 2017 01:37:12 +0000 (17:37 -0800)]
Remove a few unused constructions and simplfy some code

PiperOrigin-RevId: 179978470

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Sat, 23 Dec 2017 01:25:41 +0000 (17:25 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 179977826

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Sat, 23 Dec 2017 01:07:23 +0000 (17:07 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 179976854

7 years agoClarify Eager Metrics docs.
Sergio Guadarrama [Sat, 23 Dec 2017 01:05:51 +0000 (17:05 -0800)]
Clarify Eager Metrics docs.
Add Metric.value()

PiperOrigin-RevId: 179976743

7 years agoChanging tf.contrib.data.dense_to_sparse_batch to return tf.SparseTensor.
Jiri Simsa [Sat, 23 Dec 2017 00:42:18 +0000 (16:42 -0800)]
Changing tf.contrib.data.dense_to_sparse_batch to return tf.SparseTensor.

PiperOrigin-RevId: 179975122

7 years agoProduces RunMetadata from eager execution when tracing is explicitly enabled.
Alexandre Passos [Sat, 23 Dec 2017 00:30:04 +0000 (16:30 -0800)]
Produces RunMetadata from eager execution when tracing is explicitly enabled.

This will allow downstream profiling tools to work with eager execution.

PiperOrigin-RevId: 179974238

7 years agoAllow ImportGraphDef to ignore shape validation to match semantics of ConvertGraphDef...
Alexandre Passos [Sat, 23 Dec 2017 00:29:52 +0000 (16:29 -0800)]
Allow ImportGraphDef to ignore shape validation to match semantics of ConvertGraphDefToGraph optionally.

PiperOrigin-RevId: 179974220

7 years agoShard and turn on the layout optimizer test
Benoit Steiner [Sat, 23 Dec 2017 00:27:21 +0000 (16:27 -0800)]
Shard and turn on the layout optimizer test
Tag the dataset test

PiperOrigin-RevId: 179974079

7 years agoReplaces custom _lengths_to_masks function with the official, more efficient sequence...
A. Unique TensorFlower [Fri, 22 Dec 2017 23:50:19 +0000 (15:50 -0800)]
Replaces custom _lengths_to_masks function with the official, more efficient sequence_mask function that supersedes it.

PiperOrigin-RevId: 179971521

7 years agoRun gen_git_source.py inside of a repo_rule instead of configure.
Michael Case [Fri, 22 Dec 2017 23:44:29 +0000 (15:44 -0800)]
Run gen_git_source.py inside of a repo_rule instead of configure.

PiperOrigin-RevId: 179971055

7 years agoAvoid unnecessary copying and allocation in `ExecutorBarrier::WhenDone()`.
Derek Murray [Fri, 22 Dec 2017 23:39:18 +0000 (15:39 -0800)]
Avoid unnecessary copying and allocation in `ExecutorBarrier::WhenDone()`.

Previously the code would make a copy of the `done_cb_` and update the status
on a successful completion, neither of which is necessary, and both of which
showed up in trace amounts in profiling.

PiperOrigin-RevId: 179970701

7 years agoAdding page to tensorflow.org with directions for building the TFLite demo on Android.
A. Unique TensorFlower [Fri, 22 Dec 2017 23:34:13 +0000 (15:34 -0800)]
Adding page to tensorflow.org with directions for building the TFLite demo on Android.

PiperOrigin-RevId: 179970218

7 years ago[XLA] Hlo parser: update readme.
A. Unique TensorFlower [Fri, 22 Dec 2017 23:23:01 +0000 (15:23 -0800)]
[XLA] Hlo parser: update readme.

PiperOrigin-RevId: 179969357

7 years agoOutput of a slice op can alias its operand.
A. Unique TensorFlower [Fri, 22 Dec 2017 23:22:36 +0000 (15:22 -0800)]
Output of a slice op can alias its operand.

PiperOrigin-RevId: 179969317

7 years agoMake the analytical estimator and the virtual cluster own the ready_node_manager...
A. Unique TensorFlower [Fri, 22 Dec 2017 23:05:24 +0000 (15:05 -0800)]
Make the analytical estimator and the virtual cluster own the ready_node_manager to be used   by the virtual_scheduler. This allows us to customize the ready_node_manager for each analyzer instance.

PiperOrigin-RevId: 179967778

7 years agoExtracts the tpu_job_name from TF_CONFIG if set.
Jianwei Xie [Fri, 22 Dec 2017 22:49:14 +0000 (14:49 -0800)]
Extracts the tpu_job_name from TF_CONFIG if set.

PiperOrigin-RevId: 179966184

7 years agoUse assert_near in mvn_full_covariance to assert symmetric.
Ian Langmore [Fri, 22 Dec 2017 22:33:44 +0000 (14:33 -0800)]
Use assert_near in mvn_full_covariance to assert symmetric.

PiperOrigin-RevId: 179964717

7 years agoAutomated g4 rollback of changelist 179846085
A. Unique TensorFlower [Fri, 22 Dec 2017 22:25:36 +0000 (14:25 -0800)]
Automated g4 rollback of changelist 179846085

PiperOrigin-RevId: 179963793

7 years agoFix documentation error in tensorflow feature_utils.h
A. Unique TensorFlower [Fri, 22 Dec 2017 22:21:11 +0000 (14:21 -0800)]
Fix documentation error in tensorflow feature_utils.h

Need to take address of the example for modifying its feature

PiperOrigin-RevId: 179963317

7 years agoSupport non-constant param input of AvgPoolGrad and Sum.
Yao Zhang [Fri, 22 Dec 2017 22:10:56 +0000 (14:10 -0800)]
Support non-constant param input of AvgPoolGrad and Sum.

PiperOrigin-RevId: 179962212

7 years agoFix typo in direct_session_test.cc.
Derek Murray [Fri, 22 Dec 2017 22:01:11 +0000 (14:01 -0800)]
Fix typo in direct_session_test.cc.

PiperOrigin-RevId: 179960797

7 years ago[TFE] Add link to other exapmles from spinn/README.md
Shanqing Cai [Fri, 22 Dec 2017 21:54:11 +0000 (13:54 -0800)]
[TFE] Add link to other exapmles from spinn/README.md

PiperOrigin-RevId: 179960166

7 years agoAdds more useful debug information to an error message when no kernels are found.
A. Unique TensorFlower [Fri, 22 Dec 2017 21:31:15 +0000 (13:31 -0800)]
Adds more useful debug information to an error message when no kernels are found.

PiperOrigin-RevId: 179957977

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Fri, 22 Dec 2017 21:05:26 +0000 (13:05 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 179955796

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Fri, 22 Dec 2017 20:55:54 +0000 (12:55 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 179954704

7 years agoMerge changes from github.
A. Unique TensorFlower [Fri, 22 Dec 2017 20:42:59 +0000 (12:42 -0800)]
Merge changes from github.

PiperOrigin-RevId: 179953488

7 years agoUpdated the virtual cluster to return the proper error code if the simulated
Benoit Steiner [Fri, 22 Dec 2017 20:37:14 +0000 (12:37 -0800)]
Updated the virtual cluster to return the proper error code if the simulated
peak memory usage exceeds the available memory.

PiperOrigin-RevId: 179952918

7 years agoUses ImportGraphDef instead of ConvertGraphDefToGraph in tflite.
Alexandre Passos [Fri, 22 Dec 2017 20:21:16 +0000 (12:21 -0800)]
Uses ImportGraphDef instead of ConvertGraphDefToGraph in tflite.

This has the right semantics for backwards compatibility.

PiperOrigin-RevId: 179951639

7 years agoAdding performance guide for the `tf.data` API.
Jiri Simsa [Fri, 22 Dec 2017 19:40:43 +0000 (11:40 -0800)]
Adding performance guide for the `tf.data` API.

PiperOrigin-RevId: 179947300

7 years agoassert_near added to check_ops.py
Ian Langmore [Fri, 22 Dec 2017 19:28:19 +0000 (11:28 -0800)]
assert_near added to check_ops.py

PiperOrigin-RevId: 179946066

7 years ago[TF:XLA] Implement AdjustContrastv2, AdjustHue, AdjustSaturation, HSVToRGB, RGBToHSV...
Peter Hawkins [Fri, 22 Dec 2017 19:20:43 +0000 (11:20 -0800)]
[TF:XLA] Implement AdjustContrastv2, AdjustHue, AdjustSaturation, HSVToRGB, RGBToHSV in XLA bridge.

PiperOrigin-RevId: 179945310

7 years agoFixing tf.contrib.data API declarations.
Jiri Simsa [Fri, 22 Dec 2017 19:04:18 +0000 (11:04 -0800)]
Fixing tf.contrib.data API declarations.

PiperOrigin-RevId: 179943582

7 years ago[XLA] Remove Power architecture support from CPU backend.
Peter Hawkins [Fri, 22 Dec 2017 18:53:34 +0000 (10:53 -0800)]
[XLA] Remove Power architecture support from CPU backend.

The Power support is unused, untested, and buggy. Remove it until it is fixed.

PiperOrigin-RevId: 179942340

7 years agoIn FirstReady node manager, use node name as tie-breaker when multiple nodes
A. Unique TensorFlower [Fri, 22 Dec 2017 18:35:05 +0000 (10:35 -0800)]
In FirstReady node manager, use node name as tie-breaker when multiple nodes
have same time_ready.

PiperOrigin-RevId: 179940344

7 years agoFix allow_smaller_final_batches for bucket_by_sequence_length.
Matthew Schulkind [Fri, 22 Dec 2017 18:32:27 +0000 (10:32 -0800)]
Fix allow_smaller_final_batches for bucket_by_sequence_length.
Closes #14420.

PiperOrigin-RevId: 179940036

7 years agoAdds support in stream executor interface to update the scratch allocator used with...
A. Unique TensorFlower [Fri, 22 Dec 2017 18:32:07 +0000 (10:32 -0800)]
Adds support in stream executor interface to update the scratch allocator used with a cuFFT plan. This enables plan reuse without requiring we keep the scratch allocation alive between executions.

PiperOrigin-RevId: 179939994

7 years agoExtract placement restrictions for a graph
Benoit Steiner [Fri, 22 Dec 2017 18:29:16 +0000 (10:29 -0800)]
Extract placement restrictions for a graph

PiperOrigin-RevId: 179939679

7 years ago[XLA:GPU] Fix implementation of Thunk::ShouldBlockFutureThunks.
Justin Lebar [Fri, 22 Dec 2017 18:18:18 +0000 (10:18 -0800)]
[XLA:GPU] Fix implementation of Thunk::ShouldBlockFutureThunks.

The old implementation did not do what it was intended to do.  Instead
of making the next thunk on each other stream wait for this thunk to
complete, it made all following thunks on this stream wait for this
thunk to complete.  (Which is redundant, since streams are serialized
anyway.)

PiperOrigin-RevId: 179938424

7 years agoNo need to and don't add layout transform to control nodes.
Yao Zhang [Fri, 22 Dec 2017 17:44:32 +0000 (09:44 -0800)]
No need to and don't add layout transform to control nodes.

PiperOrigin-RevId: 179934839

7 years agoMark the Arg and RetVal ops as inexpensive.
Derek Murray [Fri, 22 Dec 2017 17:24:31 +0000 (09:24 -0800)]
Mark the Arg and RetVal ops as inexpensive.

This change avoids gratuitous context switches at the beginning of a
step (for each fed value) and end of a step (for each fetched
value). These OpKernels are trivial, so the cost of executing it
inline is typically smaller than waking up another thread to perform
the work.

PiperOrigin-RevId: 179933412

7 years agoAdd comments to link convolutional factors code with definitions in the KFC paper.
A. Unique TensorFlower [Fri, 22 Dec 2017 15:40:11 +0000 (07:40 -0800)]
Add comments to link convolutional factors code with definitions in the KFC paper.

PiperOrigin-RevId: 179925679

7 years agoAdded an option to download a fresh release of clang for doing cuda_clang builds.
A. Unique TensorFlower [Fri, 22 Dec 2017 11:07:51 +0000 (03:07 -0800)]
Added an option to download a fresh release of clang for doing cuda_clang builds.

Tested only on Linux, but should also work for Mac.
No support for Windows is available yet.

PiperOrigin-RevId: 179910980

7 years ago[XLA] Support conditional in all backends.
A. Unique TensorFlower [Fri, 22 Dec 2017 08:07:40 +0000 (00:07 -0800)]
[XLA] Support conditional in all backends.

PiperOrigin-RevId: 179900775

7 years agoSupport multiple loss and multiple optimizers in replicate_model_fn.
Igor Saprykin [Fri, 22 Dec 2017 07:43:57 +0000 (23:43 -0800)]
Support multiple loss and multiple optimizers in replicate_model_fn.

Instead of supplying `optimizer_fn`, the user is now expected to wrap their optimizer in GatheringOptimizer.  The latter will gather gradients, reduce and apply them.

There can be multiple instances of GatheringOptimizer inside the model.

PiperOrigin-RevId: 179899422

7 years agoMade hard colocation constraints (i.e constraints that must be met for the
Benoit Steiner [Fri, 22 Dec 2017 05:49:22 +0000 (21:49 -0800)]
Made hard colocation constraints (i.e constraints that must be met for the
model to be executable) available from python

PiperOrigin-RevId: 179892785

7 years ago[XLA] Print out missing extra-info for many instructions in the HLO graph dumper.
Justin Lebar [Fri, 22 Dec 2017 05:42:12 +0000 (21:42 -0800)]
[XLA] Print out missing extra-info for many instructions in the HLO graph dumper.

Now we use the same functionality as HloInstruction::ToString() to print
instructions' extra info.  This fills in a lot of previously-missing
info, like reduce-windows' windows, and dots' dot-dimension-numbers.

PiperOrigin-RevId: 179892469

7 years ago[XLA] Update the parsing and stringfication of the Dot dimension numbers.
A. Unique TensorFlower [Fri, 22 Dec 2017 04:24:37 +0000 (20:24 -0800)]
[XLA] Update the parsing and stringfication of the Dot dimension numbers.

PiperOrigin-RevId: 179888764

7 years ago[XLA] Add zero-sized batchnorm test.
Justin Lebar [Fri, 22 Dec 2017 04:23:40 +0000 (20:23 -0800)]
[XLA] Add zero-sized batchnorm test.

Also fix out-of-bounds read in ReferenceUtil::Reduce4DTo1D.

PiperOrigin-RevId: 179888724

7 years agoSupport fill op.
Yao Zhang [Fri, 22 Dec 2017 04:10:02 +0000 (20:10 -0800)]
Support fill op.

PiperOrigin-RevId: 179888184

7 years ago[XLA] Run ZeroSizedHloElimination after BatchNormExpander.
Justin Lebar [Fri, 22 Dec 2017 03:11:50 +0000 (19:11 -0800)]
[XLA] Run ZeroSizedHloElimination after BatchNormExpander.

BatchNormExpander can create zero-sized HLOs even if it's run after
ZeroSizedHloElimination.  For example, you might have a
BatchNormTraining op with shape (f32[0, 10], f32[10], f32[10]).  This
won't be eliminated by ZeroSizedHloElimination, but when it's
decomposed, it will result in many zero-sized HLOs.

PiperOrigin-RevId: 179885417

7 years ago[XLA:GPU] Implement BatchNormThunk as a call into cudnn.
Justin Lebar [Fri, 22 Dec 2017 02:27:42 +0000 (18:27 -0800)]
[XLA:GPU] Implement BatchNormThunk as a call into cudnn.

Using cudnn for these calls is disabled by default, because it's not a
performance win on our benchmarks.

PiperOrigin-RevId: 179882911

7 years agoAutomated g4 rollback of changelist 179872807
Anna R [Fri, 22 Dec 2017 02:19:25 +0000 (18:19 -0800)]
Automated g4 rollback of changelist 179872807

PiperOrigin-RevId: 179882393

7 years agoNo external change.
Dandelion Man? [Fri, 22 Dec 2017 02:09:03 +0000 (18:09 -0800)]
No external change.

PiperOrigin-RevId: 179881638

7 years agoInternal change.
Anna R [Fri, 22 Dec 2017 01:51:46 +0000 (17:51 -0800)]
Internal change.

PiperOrigin-RevId: 179880234

7 years agoAdding a test that checks that Grappler is able to infer shapes for core `tf.data...
Jiri Simsa [Fri, 22 Dec 2017 01:34:47 +0000 (17:34 -0800)]
Adding a test that checks that Grappler is able to infer shapes for core `tf.data` API.

PiperOrigin-RevId: 179878973

7 years agoAdded a comment to explain why we can't reorder BiasAdd
Benoit Steiner [Fri, 22 Dec 2017 01:31:11 +0000 (17:31 -0800)]
Added a comment to explain why we can't reorder BiasAdd

PiperOrigin-RevId: 179878687

7 years agoAdd test coverage for example parsing with a feature that is an empty string.
Derek Murray [Fri, 22 Dec 2017 00:58:27 +0000 (16:58 -0800)]
Add test coverage for example parsing with a feature that is an empty string.

PiperOrigin-RevId: 179875758

7 years agoFold FuseBatchNorm correctly.
Suharsh Sivakumar [Fri, 22 Dec 2017 00:49:17 +0000 (16:49 -0800)]
Fold FuseBatchNorm correctly.

PiperOrigin-RevId: 179874901