platform/upstream/tensorflow.git
6 years agoFaster reduce_logsoftmax (specially in eager) and bugfixes in broadcast_to
Alexandre Passos [Tue, 1 May 2018 00:11:40 +0000 (17:11 -0700)]
Faster reduce_logsoftmax (specially in eager) and bugfixes in broadcast_to

PiperOrigin-RevId: 194870645

6 years agoSmall fix to prevent a crash if the delegate has not implemented FreeBufferHandle.
A. Unique TensorFlower [Mon, 30 Apr 2018 23:43:14 +0000 (16:43 -0700)]
Small fix to prevent a crash if the delegate has not implemented FreeBufferHandle.

PiperOrigin-RevId: 194866595

6 years agoAdd MultiNodeDataset and MultiNodeIterator which are intended to work for multi-node...
Yuefeng Zhou [Mon, 30 Apr 2018 23:12:33 +0000 (16:12 -0700)]
Add MultiNodeDataset and MultiNodeIterator which are intended to work for multi-node distribution strategy.

PiperOrigin-RevId: 194862215

6 years ago[XLA] Change the TF2XLA bridge to perform F16 reduction using F32 data type.
Bixia Zheng [Mon, 30 Apr 2018 23:11:38 +0000 (16:11 -0700)]
[XLA] Change the TF2XLA bridge to perform F16 reduction using F32 data type.

Add test cases to test that reduce sum for bfloat16 and float16 doesn't lose too
much precision.

PiperOrigin-RevId: 194862078

6 years agoImprove error message for pip_smoke_test.
Yifei Feng [Mon, 30 Apr 2018 22:56:26 +0000 (15:56 -0700)]
Improve error message for pip_smoke_test.

PiperOrigin-RevId: 194859591

6 years agoDo not allocate memory for literal as it will be allocated later.
A. Unique TensorFlower [Mon, 30 Apr 2018 22:41:28 +0000 (15:41 -0700)]
Do not allocate memory for literal as it will be allocated later.

PiperOrigin-RevId: 194857422

6 years agoEnhancements to GRAPHVIZ_DOT output:
A. Unique TensorFlower [Mon, 30 Apr 2018 22:19:00 +0000 (15:19 -0700)]
Enhancements to GRAPHVIZ_DOT output:
    -edge weights added to encourage straighter main data-flow
    -line thickness proportional to log(data_size)
    -set global parameter "nslimit" to prevent excessive layout time for difficult graphs

PiperOrigin-RevId: 194854051

6 years agoImplement unary chain hoisting optimization for Concat, Split, and SplitV.
A. Unique TensorFlower [Mon, 30 Apr 2018 21:56:13 +0000 (14:56 -0700)]
Implement unary chain hoisting optimization for Concat, Split, and SplitV.

For Concat, hoist prefix chains of unary ops before concatenation, e.g.
  // Rewrites
  //       Concat({Cos(Exp(a)), Cos(Exp(b)), Cos(Exp(c))})
  // into
  //       Cos(Exp(Concat({a, b, c}))).

For Split/SplitV hoist unary postfix chains before the split, e.g.
  // Rewrites
  //          [Cos(Exp(y)) for y in Split(x)]
  // into
  //          [y for y in Split(Cos(Exp(x)))].

The new optimization is off by default.

PiperOrigin-RevId: 194850318

6 years agoAdd XLA logo to its documentation page
Eli Bendersky [Mon, 30 Apr 2018 21:39:25 +0000 (14:39 -0700)]
Add XLA logo to its documentation page

PiperOrigin-RevId: 194847599

6 years agoDo not cast int64 to int32 in keras embedding lookups.
Alexandre Passos [Mon, 30 Apr 2018 21:34:01 +0000 (14:34 -0700)]
Do not cast int64 to int32 in keras embedding lookups.

Often when working on the GPU with tf int64s are more efficient as int32s will
be copied back and forth to the host quite a bit.

PiperOrigin-RevId: 194846629

6 years ago[TF:XLA] Fix some unexpected memory leak in hlo_graph_dumper_test.
Dimitris Vardoulakis [Mon, 30 Apr 2018 21:28:46 +0000 (14:28 -0700)]
[TF:XLA] Fix some unexpected memory leak in hlo_graph_dumper_test.

PiperOrigin-RevId: 194845792

6 years agoRemoving an obsolete TODO
Petros Mol [Mon, 30 Apr 2018 21:26:08 +0000 (14:26 -0700)]
Removing an obsolete TODO

PiperOrigin-RevId: 194845376

6 years agoPush down const inputs into the function of specialized functions.
A. Unique TensorFlower [Mon, 30 Apr 2018 21:14:43 +0000 (14:14 -0700)]
Push down const inputs into the function of specialized functions.

PiperOrigin-RevId: 194843380

6 years ago[tf.data] Adding support for `tf.SparseTensor` into `tf.contrib.data.scan()`
Jiri Simsa [Mon, 30 Apr 2018 21:08:29 +0000 (14:08 -0700)]
[tf.data] Adding support for `tf.SparseTensor` into `tf.contrib.data.scan()`

PiperOrigin-RevId: 194842266

6 years agoExtend SDCAOptimizer functionality to prune negative indices (the default value for...
A. Unique TensorFlower [Mon, 30 Apr 2018 20:51:34 +0000 (13:51 -0700)]
Extend SDCAOptimizer functionality to prune negative indices (the default value for OOV with tf.feature_column.FeatureColumn, sparse / categorical).

PiperOrigin-RevId: 194839178

6 years agoFix a bug in profiler.
Shashi Shekhar [Mon, 30 Apr 2018 20:50:17 +0000 (13:50 -0700)]
Fix a bug in profiler.

PiperOrigin-RevId: 194838948

6 years agoCleanup handling of non-Tensor valued event_ndims in Bijector.
Joshua V. Dillon [Mon, 30 Apr 2018 20:34:46 +0000 (13:34 -0700)]
Cleanup handling of non-Tensor valued event_ndims in Bijector.

PiperOrigin-RevId: 194836408

6 years agoFix device assignment in xla/service/service.cc to build the assignment based on
HyoukJoong Lee [Mon, 30 Apr 2018 19:49:33 +0000 (12:49 -0700)]
Fix device assignment in xla/service/service.cc to build the assignment based on
the provided device handles rather than using the default assignment.

PiperOrigin-RevId: 194829761

6 years agoFix typos in tf.GradientTape documentation.
Tom Hennigan [Mon, 30 Apr 2018 19:47:35 +0000 (12:47 -0700)]
Fix typos in tf.GradientTape documentation.

PiperOrigin-RevId: 194829506

6 years agoWhen a mirrored variable is fetched in cross-tower mode, fetch its primary variable.
Igor Saprykin [Mon, 30 Apr 2018 19:41:12 +0000 (12:41 -0700)]
When a mirrored variable is fetched in cross-tower mode, fetch its primary variable.

This prevents errors like
ValueError: Fetch argument MirroredVariable({'/job:localhost/replica:0/task:0/device:GPU:0': <tf.Variable 'global_step:0' shape=() dtype=int64>, '/job:localhost/replica:0/task:0/device:GPU:1': <tf.Variable 'global_step/replica_1:0' shape=() dtype=int64>}) cannot be interpreted as a Tensor. (Device /job:localhost/replica:0/task:0/device:CPU:0 not found in ['/job:localhost/replica:0/task:0/device:GPU:0', '/job:localhost/replica:0/task:0/device:GPU:1'] (current device ))

I ran distribute/examples/resnet with and without the change and it fixed the problem.

PiperOrigin-RevId: 194828672

6 years ago[TF:XLA] Bump open source llvm revision to r331173
Sanjoy Das [Mon, 30 Apr 2018 19:33:21 +0000 (12:33 -0700)]
[TF:XLA] Bump open source llvm revision to r331173

PiperOrigin-RevId: 194827639

6 years agoUse the default rewriter config instead of a custom one
Benoit Steiner [Mon, 30 Apr 2018 19:13:00 +0000 (12:13 -0700)]
Use the default rewriter config instead of a custom one

PiperOrigin-RevId: 194824761

6 years agoFix bugs in AssignOp:
A. Unique TensorFlower [Mon, 30 Apr 2018 19:01:35 +0000 (12:01 -0700)]
Fix bugs in AssignOp:
 1. Releasing the unique_ptr would "leak" a TensorBuffer refcount.
 2. The output shape is defined by rhs, not lhs.

PiperOrigin-RevId: 194822802

6 years ago-Miscellaneous code clean-up
A. Unique TensorFlower [Mon, 30 Apr 2018 18:51:03 +0000 (11:51 -0700)]
-Miscellaneous code clean-up

PiperOrigin-RevId: 194821201

6 years agoAdd --keep_going flag to bazel query in pip_smoke_test to bypass bazel query cannot...
Yifei Feng [Mon, 30 Apr 2018 18:26:52 +0000 (11:26 -0700)]
Add --keep_going flag to bazel query in pip_smoke_test to bypass bazel query cannot handle select statement.

PiperOrigin-RevId: 194816816

6 years agoAdd snippet illustrating discretized logistic mixture for WaveNet.
Dustin Tran [Mon, 30 Apr 2018 18:14:51 +0000 (11:14 -0700)]
Add snippet illustrating discretized logistic mixture for WaveNet.

Currently, the example manually centers the bins in order to capture ?rounding? intervals and not ?ceiling? intervals. In the future, we may simplify the example by expanding QuantizedDistribution with a binning argument.

PiperOrigin-RevId: 194814662

6 years agoSwitch install get_started link
Mark Daoust [Mon, 30 Apr 2018 18:01:54 +0000 (11:01 -0700)]
Switch install get_started link

PiperOrigin-RevId: 194811871

6 years agoPrepare nodes that will be allocated using ScopedAllocator.
Ayush Dubey [Mon, 30 Apr 2018 17:36:00 +0000 (10:36 -0700)]
Prepare nodes that will be allocated using ScopedAllocator.

This includes changes to Executor that (1) set scope_id on nodes that are
decorated with _scoped_allocator attribute, (2) mark such nodes to never
forward input.

PiperOrigin-RevId: 194807086

6 years agoRemove manifest_merger that is being removed from Bazel 0.13.0.
A. Unique TensorFlower [Mon, 30 Apr 2018 16:46:59 +0000 (09:46 -0700)]
Remove manifest_merger that is being removed from Bazel 0.13.0.

PiperOrigin-RevId: 194798790

6 years agoClarify return type for defun as zero or more `tf.Tensor`s.
Tom Hennigan [Mon, 30 Apr 2018 16:31:54 +0000 (09:31 -0700)]
Clarify return type for defun as zero or more `tf.Tensor`s.

PiperOrigin-RevId: 194796621

6 years agoFixes to tape gradient for providing outputs and having multiple targets.
Alexandre Passos [Mon, 30 Apr 2018 16:29:31 +0000 (09:29 -0700)]
Fixes to tape gradient for providing outputs and having multiple targets.

PiperOrigin-RevId: 194796304

6 years agoAdding a depthwise convolution kernel op (with label 'cudnn_grouped_convolution'...
A. Unique TensorFlower [Mon, 30 Apr 2018 13:59:23 +0000 (06:59 -0700)]
Adding a depthwise convolution kernel op (with label 'cudnn_grouped_convolution') which forwards to cuDNN grouped convolutions.

PiperOrigin-RevId: 194780352

6 years agoCleaning up tracing code.
A. Unique TensorFlower [Mon, 30 Apr 2018 11:21:09 +0000 (04:21 -0700)]
Cleaning up tracing code.

PiperOrigin-RevId: 194768567

6 years agoKeras: Supply `maximum_iterations` to the TF backend when possible.
Russell Power [Sun, 29 Apr 2018 22:37:12 +0000 (15:37 -0700)]
Keras: Supply `maximum_iterations` to the TF backend when possible.
PiperOrigin-RevId: 194723199

6 years agoAdd support for a clean checkpoint and shutdown in response to a termination notice.
Russell Power [Sun, 29 Apr 2018 22:30:22 +0000 (15:30 -0700)]
Add support for a clean checkpoint and shutdown in response to a termination notice.

PiperOrigin-RevId: 194722985

6 years agoAdded del_hparam(), the counter part of add_hparam.
Sherry Moore [Sun, 29 Apr 2018 16:56:16 +0000 (09:56 -0700)]
Added del_hparam(), the counter part of add_hparam.

PiperOrigin-RevId: 194711291

6 years agoUpdate the Swift for TensorFlow community page.
Richard Wei [Sun, 29 Apr 2018 06:51:28 +0000 (23:51 -0700)]
Update the Swift for TensorFlow community page.

PiperOrigin-RevId: 194687897

6 years ago[TF:XLA]
Dimitris Vardoulakis [Sun, 29 Apr 2018 05:19:22 +0000 (22:19 -0700)]
[TF:XLA]
- Require a module config when creating an HloModule.
- All tests using HloTestBase create a module using CreateNewModule.

PiperOrigin-RevId: 194684585

6 years agoInternally rewrite RevBlock to use @custom_gradient
A. Unique TensorFlower [Sun, 29 Apr 2018 02:47:42 +0000 (19:47 -0700)]
Internally rewrite RevBlock to use @custom_gradient

PiperOrigin-RevId: 194679657

6 years agoJava: Release 1.8.0
Asim Shankar [Sat, 28 Apr 2018 18:31:12 +0000 (11:31 -0700)]
Java: Release 1.8.0

PiperOrigin-RevId: 194663800

6 years ago[tf.data] Use core::ScopedUnref to avoid resource leakage.
Brennan Saeta [Sat, 28 Apr 2018 17:51:32 +0000 (10:51 -0700)]
[tf.data] Use core::ScopedUnref to avoid resource leakage.

If for whatever reason iterator_resource->set_iterator did not return Status::OK(), we would leak a reference on the iterator_resource. With this change, we won't leak the resource.

PiperOrigin-RevId: 194662412

6 years agoAllow not specifying eval_spec when evaluation is not necessarily run.
A. Unique TensorFlower [Sat, 28 Apr 2018 17:40:49 +0000 (10:40 -0700)]
Allow not specifying eval_spec when evaluation is not necessarily run.

PiperOrigin-RevId: 194661814

6 years agoThis is Part 1 of Swift<->TF sends/recvs: support sending tensors from TF to
Mingsheng Hong [Sat, 28 Apr 2018 15:55:08 +0000 (08:55 -0700)]
This is Part 1 of Swift<->TF sends/recvs: support sending tensors from TF to
Swift via direct session.

The changes are:

1. Added an experimental TF C API TF_DequeueNamedTensor() to consume the queued
tensors from a dequeue op. One use case is for the Swift host program to consume
tensors sent by TF, where the queue is a Fifo queue managed by TF.

Enqueuing tensors are done by running an enqueue op in a graph. The queued
tensors are not persisted, and will be lost if the process/machine dies. The
queue has a bounded capacity, to prevent producer from being unboundedly ahead
of consumer.

while caller of TF_DequeueNamedTensor() could have run the Fifo dequeue op
directly, the extra level of indirection provided by this API allows us to more
easily switch the queuing impl to another mechanism. If and once we stabilize on
the Fifo queue based impl, we can remove this API.

2. Added a new S4TF runtime API _TFCReceiveTensorHandle() that receives a tensor
  via TF_DequeueNamedTensor().

3. To support tensor receives in host program, taught PartitionCloner in
  TFPartition to insert SIL code to call _TFCReceiveTensorHandle().

4. To support tensor sends in accelerator program, taught TFGraphLowering in
  generate QueueEnqueueV2 nodes in the TF graphs, with appropriate control
  dependence to make sure these nodes get executed.

a) The enqueue produces no output tensor, and is executed only for its side
effect. To ensure it is executed properly, control dependence is wired up. The
general design is: before a TF_Function (can be a top level function or the body
function of a while op) produces an output tensor OT, make OT control dependent
on the enqueue op, so that enqueue gets run before the function returns.

b) If tensor send occurs in a while loop body, the body logic currently gets
lowered in 3 places: the while op cond function, the while op body function, and
the ops at the same level as the while op itself (for running the last loop
iteration). In this case, the correct TFGraph lowering is to run the enqueue in
the last 2 out of the 3 places above.

After this CL, the dual versions of the above (dequeuing via an op, and
enqueuing via C API) will be added.

PiperOrigin-RevId: 194658511

6 years agoRemoving hidden_ops.txt file.
Anna R [Sat, 28 Apr 2018 07:13:09 +0000 (00:13 -0700)]
Removing hidden_ops.txt file.

PiperOrigin-RevId: 194637892

6 years agoFix kernel creation bug, due to constant folding always use CPU.
A. Unique TensorFlower [Sat, 28 Apr 2018 06:35:42 +0000 (23:35 -0700)]
Fix kernel creation bug, due to constant folding always use CPU.

PiperOrigin-RevId: 194636076

6 years agoAdd test case on compiling dense layer node with XLA.
A. Unique TensorFlower [Sat, 28 Apr 2018 05:57:36 +0000 (22:57 -0700)]
Add test case on compiling dense layer node with XLA.

PiperOrigin-RevId: 194634563

6 years agoProperly export recurrent in contrib.
Patrick Nguyen [Sat, 28 Apr 2018 04:58:17 +0000 (21:58 -0700)]
Properly export recurrent in contrib.

The following symbols are available:
- tf.contrib.recurrent.bidirectional_functional_rnn
- tf.contrib.recurrent.functional_rnn
- tf.contrib.recurrent.Recurrent

PiperOrigin-RevId: 194632138

6 years agoHLO profiling for tfcompile.
Sanjoy Das [Sat, 28 Apr 2018 03:06:35 +0000 (20:06 -0700)]
HLO profiling for tfcompile.

This CL extends the --xla_hlo_profile knob to tfcompile.  tf_library rules can
now set enable_xla_hlo_profiling to True to:

 - Have the generated code update per-HLO profile counters as it executes.
 - Have tfcompile generate and serialize an instance HloProfilePrinterData with
   a compiled model that can be used to pretty-print the collected profile
   counters.

PiperOrigin-RevId: 194627272

6 years ago Add internal uint b stats to TfOpStats.
A. Unique TensorFlower [Sat, 28 Apr 2018 02:23:16 +0000 (19:23 -0700)]
  Add internal uint b stats to TfOpStats.

PiperOrigin-RevId: 194625155

6 years agoSplit up ElementaIrEmitter::MakeElementGenerator into smaller functions; NFC
Sanjoy Das [Sat, 28 Apr 2018 01:41:27 +0000 (18:41 -0700)]
Split up ElementaIrEmitter::MakeElementGenerator into smaller functions; NFC

PiperOrigin-RevId: 194622198

6 years ago[XLA] Fix bug in ShapeUtil::StripDegenerateDimensions
A. Unique TensorFlower [Sat, 28 Apr 2018 01:24:57 +0000 (18:24 -0700)]
[XLA] Fix bug in ShapeUtil::StripDegenerateDimensions

PiperOrigin-RevId: 194621163

6 years agoMake RetryingFileSystem a template.
Brennan Saeta [Sat, 28 Apr 2018 00:08:57 +0000 (17:08 -0700)]
Make RetryingFileSystem a template.

PiperOrigin-RevId: 194614877

6 years agoMinor fix to SDCAOptimizer documentation.
Petros Mol [Fri, 27 Apr 2018 23:22:43 +0000 (16:22 -0700)]
Minor fix to SDCAOptimizer documentation.

PiperOrigin-RevId: 194609850

6 years ago[TF:XLA:INTERPRETER] implement bfloat16 comparisons
Nick Desaulniers [Fri, 27 Apr 2018 23:14:49 +0000 (16:14 -0700)]
[TF:XLA:INTERPRETER] implement bfloat16 comparisons

PiperOrigin-RevId: 194608854

6 years agoFix broken ElementWiseFusionTest.
A. Unique TensorFlower [Fri, 27 Apr 2018 22:28:01 +0000 (15:28 -0700)]
Fix broken ElementWiseFusionTest.

PiperOrigin-RevId: 194602336

6 years agoMinor eager service proto clarification.
Akshay Modi [Fri, 27 Apr 2018 21:47:12 +0000 (14:47 -0700)]
Minor eager service proto clarification.

PiperOrigin-RevId: 194596337

6 years ago[XLA:CPU] Implement fusion for the Gather HLO
Sanjoy Das [Fri, 27 Apr 2018 21:36:24 +0000 (14:36 -0700)]
[XLA:CPU] Implement fusion for the Gather HLO

PiperOrigin-RevId: 194594759

6 years agoIf two identical functions are given different grad func,
A. Unique TensorFlower [Fri, 27 Apr 2018 21:28:12 +0000 (14:28 -0700)]
If two identical functions are given different grad func,
they should be named differently. Otherwise, tf.gradients
gets confused.

PiperOrigin-RevId: 194593519

6 years agoRemove whitespaces from tags in saved_model_cli.
A. Unique TensorFlower [Fri, 27 Apr 2018 21:05:46 +0000 (14:05 -0700)]
Remove whitespaces from tags in saved_model_cli.

This currently causes tags mismatch because a leading whitespace is added
within the saved_model_cli when doing ', '.join(tag_set).

PiperOrigin-RevId: 194590154

6 years ago[TF:XLA] Bump open source llvm revision to r330950
Sanjoy Das [Fri, 27 Apr 2018 20:55:35 +0000 (13:55 -0700)]
[TF:XLA] Bump open source llvm revision to r330950

PiperOrigin-RevId: 194588403

6 years agoRemove scope name from bfloat16
Sourabh Bajaj [Fri, 27 Apr 2018 20:01:44 +0000 (13:01 -0700)]
Remove scope name from bfloat16

PiperOrigin-RevId: 194580957

6 years agoeager: Improve error message when GradientTape is used incorrectly.
Asim Shankar [Fri, 27 Apr 2018 19:59:20 +0000 (12:59 -0700)]
eager: Improve error message when GradientTape is used incorrectly.

PiperOrigin-RevId: 194580654

6 years agoReplace GrapplerFunctionItem input with a constant.
A. Unique TensorFlower [Fri, 27 Apr 2018 19:46:46 +0000 (12:46 -0700)]
Replace GrapplerFunctionItem input with a constant.

PiperOrigin-RevId: 194579253

6 years agoInternally rewrite @recompute_grad to use @custom_gradient
A. Unique TensorFlower [Fri, 27 Apr 2018 18:41:21 +0000 (11:41 -0700)]
Internally rewrite @recompute_grad to use @custom_gradient

PiperOrigin-RevId: 194571125

6 years agoAdded string conversion operator to tensorflow::StringPiece.
A. Unique TensorFlower [Fri, 27 Apr 2018 16:25:52 +0000 (09:25 -0700)]
Added string conversion operator to tensorflow::StringPiece.
Marked ToString method as deprecated.

This will allow tensorflow::StringPiece to be replaced with absl::string_view (once the deprecated method is removed) as absl::string_view does not contain the ToString method.

PiperOrigin-RevId: 194551042

6 years agoFix bug in @custom_gradient in Eager mode with numpy inputs
A. Unique TensorFlower [Fri, 27 Apr 2018 14:21:37 +0000 (07:21 -0700)]
Fix bug in @custom_gradient in Eager mode with numpy inputs

PiperOrigin-RevId: 194538828

6 years ago[TF:XLA] Bump open source llvm revision to r330926
Sanjoy Das [Fri, 27 Apr 2018 12:31:38 +0000 (05:31 -0700)]
[TF:XLA] Bump open source llvm revision to r330926

PiperOrigin-RevId: 194530610

6 years agoAutomated g4 rollback of changelist 194306629
Yu-Cheng Ling [Fri, 27 Apr 2018 07:07:07 +0000 (00:07 -0700)]
Automated g4 rollback of changelist 194306629

PiperOrigin-RevId: 194507274

6 years agoReenable factorization_ops_test on ASAN after adding shard_count = 4. Tests now
A. Unique TensorFlower [Fri, 27 Apr 2018 05:06:36 +0000 (22:06 -0700)]
Reenable factorization_ops_test on ASAN after adding shard_count = 4. Tests now
finish with these stats: "max = 150.6s, min = 27.4s, avg = 66.3s, dev = 19.5s" over 1000 runs and this runtime distribution should be fairly safe for deadline of 300s.

PiperOrigin-RevId: 194500204

6 years agoImplement floor operator
A. Unique TensorFlower [Fri, 27 Apr 2018 02:35:10 +0000 (19:35 -0700)]
Implement floor operator

PiperOrigin-RevId: 194490433

6 years agoAutomated g4 rollback of changelist 194442428
A. Unique TensorFlower [Fri, 27 Apr 2018 01:24:48 +0000 (18:24 -0700)]
Automated g4 rollback of changelist 194442428

PiperOrigin-RevId: 194485227

6 years agoFree scratch memory in ~BaseGPUDevice.
A. Unique TensorFlower [Fri, 27 Apr 2018 01:03:50 +0000 (18:03 -0700)]
Free scratch memory in ~BaseGPUDevice.

PiperOrigin-RevId: 194483351

6 years agoImplements linear no-offset (aka symmetric) quantizer.
A. Unique TensorFlower [Fri, 27 Apr 2018 00:56:08 +0000 (17:56 -0700)]
Implements linear no-offset (aka symmetric) quantizer.

PiperOrigin-RevId: 194482547

6 years agoSplit out SaveableObjects into their own file
Allen Lavoie [Thu, 26 Apr 2018 23:40:16 +0000 (16:40 -0700)]
Split out SaveableObjects into their own file

Pulls a couple build rules out of tensorflow/python:training. I'd like to use a SaveableObject in :checkpointable (for saving some Python state by default), which means the file with SaveableObject has to be essientially dependency-free.

PiperOrigin-RevId: 194473987

6 years agoMore informative error message when loading a graph_def which uses unknown ops.
Malcolm Reynolds [Thu, 26 Apr 2018 23:24:51 +0000 (16:24 -0700)]
More informative error message when loading a graph_def which uses unknown ops.
Fixes #17014

PiperOrigin-RevId: 194472083

6 years agoFix some flakiness in test.
Shashi Shekhar [Thu, 26 Apr 2018 23:11:11 +0000 (16:11 -0700)]
Fix some flakiness in test.

PiperOrigin-RevId: 194470125

6 years agoInternal change.
A. Unique TensorFlower [Thu, 26 Apr 2018 23:01:00 +0000 (16:01 -0700)]
Internal change.

PiperOrigin-RevId: 194468535

6 years agoHandle variations in scoping of batch norms for correct unfused batch norm folding.
Raghuraman Krishnamoorthi [Thu, 26 Apr 2018 22:40:15 +0000 (15:40 -0700)]
Handle variations in scoping of batch norms for correct unfused batch norm folding.

PiperOrigin-RevId: 194465704

6 years agoRemove the inter-op thread pool
Sanjoy Das [Thu, 26 Apr 2018 22:33:38 +0000 (15:33 -0700)]
Remove the inter-op thread pool

Forgot about this in cl/194299356.  However, when I checked cl/194299356, I
found that we actually (incorrectly?) used the *intra* op thread pool in the
parallel CPU executable?  Does that mean the inter op thread pool was always
unused?

PiperOrigin-RevId: 194464734

6 years ago[tf.data] Adds support for adding scalar value to `StatsAggregator`.
Shivani Agrawal [Thu, 26 Apr 2018 22:24:44 +0000 (15:24 -0700)]
[tf.data] Adds support for adding scalar value to `StatsAggregator`.

PiperOrigin-RevId: 194463407

6 years ago[tf.data] Changes description for `bytes_produced_stats` and `latency_stats` in accor...
Shivani Agrawal [Thu, 26 Apr 2018 22:15:37 +0000 (15:15 -0700)]
[tf.data] Changes description for `bytes_produced_stats` and `latency_stats` in accordance with the breaking changes in cl/193432590.

PiperOrigin-RevId: 194461964

6 years ago- Default values of cov and inv variables are now 0. Zero-debiasing (as in Adam...
James Martens [Thu, 26 Apr 2018 22:13:48 +0000 (15:13 -0700)]
- Default values of cov and inv variables are now 0.  Zero-debiasing (as in Adam) is used for the cov matrices.  Note this this requires that cov variables, then inv variables, are all updated before the first training update is made.  All examples have been modified to do this. NOTE: you *may* have to increase the damping value you use at the start of optimization after this change (or throughout, if you are using a constant value).
- Changed the initial default approximation used for generic registrations to "diagonal"
- Convenience properties for ops and thunks have all been removed, along with "make_ops_and_vars". User should only interface with "make_vars_and_create_op_thunks" (or maybe "create_ops_and_vars_thunks").

PiperOrigin-RevId: 194461623

6 years agoAdd support for variables in tf.custom_gradient
A. Unique TensorFlower [Thu, 26 Apr 2018 22:08:24 +0000 (15:08 -0700)]
Add support for variables in tf.custom_gradient

PiperOrigin-RevId: 194460752

6 years agoDisable triangular_solve_test on ASAN due to flaky time outs.
A. Unique TensorFlower [Thu, 26 Apr 2018 22:07:43 +0000 (15:07 -0700)]
Disable triangular_solve_test on ASAN due to flaky time outs.

PiperOrigin-RevId: 194460641

6 years agoEdit tensorflow.org/community/swift page.
Daniel Zheng [Thu, 26 Apr 2018 22:02:53 +0000 (15:02 -0700)]
Edit tensorflow.org/community/swift page.

PiperOrigin-RevId: 194459754

6 years agoAdds optimization to convert division of sqrt to multiplication of rsqrt
A. Unique TensorFlower [Thu, 26 Apr 2018 21:59:29 +0000 (14:59 -0700)]
Adds optimization to convert division of sqrt to multiplication of rsqrt

PiperOrigin-RevId: 194459152

6 years agoDisable densenet_test on MSAN due to flaky time outs.
A. Unique TensorFlower [Thu, 26 Apr 2018 21:53:19 +0000 (14:53 -0700)]
Disable densenet_test on MSAN due to flaky time outs.

PiperOrigin-RevId: 194458270

6 years agoRemove unnecessary TF_NEED_GCP from build scripts.
A. Unique TensorFlower [Thu, 26 Apr 2018 20:53:17 +0000 (13:53 -0700)]
Remove unnecessary TF_NEED_GCP from build scripts.

PiperOrigin-RevId: 194448612

6 years agoAdding some slightly more exhaustive strided_slice test parameters.
A. Unique TensorFlower [Thu, 26 Apr 2018 20:35:35 +0000 (13:35 -0700)]
Adding some slightly more exhaustive strided_slice test parameters.

PiperOrigin-RevId: 194446000

6 years ago[TF:XLA] Add INTEL MKL_DNN Conv2d method to XLA/CPU backend
Tony Wang [Thu, 26 Apr 2018 20:30:15 +0000 (13:30 -0700)]
[TF:XLA] Add INTEL MKL_DNN Conv2d method to XLA/CPU backend

The INTEL MKL_DNN provides 32-bit Conv2d method. With INTEL_MKL flag set,
XLA backend emits runtime call to MKL_DNN Conv2d instead of Eigen.

PiperOrigin-RevId: 194445212

6 years agoRun 2 passes of rewrites by default
Benoit Steiner [Thu, 26 Apr 2018 20:19:39 +0000 (13:19 -0700)]
Run 2 passes of rewrites by default

PiperOrigin-RevId: 194443770

6 years agoDelay deleting RingReducer until group_size_tensor_ready_ has
A. Unique TensorFlower [Thu, 26 Apr 2018 20:15:55 +0000 (13:15 -0700)]
Delay deleting RingReducer until group_size_tensor_ready_ has
been notified.  Otherwise this can result in a bad pointer dereference
under some early abort conditions.

PiperOrigin-RevId: 194443206

6 years agoFix build by adding op_lib dependencies to trt_engine_op_loader, and remove
Guangda Lai [Thu, 26 Apr 2018 20:12:04 +0000 (13:12 -0700)]
Fix build by adding op_lib dependencies to trt_engine_op_loader, and remove
unnecessary dependency from the tf_gen_op_libs.

PiperOrigin-RevId: 194442728

6 years agoAutomated g4 rollback of changelist 194269675
A. Unique TensorFlower [Thu, 26 Apr 2018 20:10:05 +0000 (13:10 -0700)]
Automated g4 rollback of changelist 194269675

PiperOrigin-RevId: 194442428

6 years agogRPC worker cache owns a shared_ptr to the channel cache
Akshay Modi [Thu, 26 Apr 2018 20:05:55 +0000 (13:05 -0700)]
gRPC worker cache owns a shared_ptr to the channel cache

PiperOrigin-RevId: 194441794

6 years agoFor tf.gradients(), do not backpropagate through integer tensors.
A. Unique TensorFlower [Thu, 26 Apr 2018 19:42:54 +0000 (12:42 -0700)]
For tf.gradients(), do not backpropagate through integer tensors.
All integer tensors are now considered constant with respect to all `xs`.
This fixes a bug in gradients through tf.while_loop.

PiperOrigin-RevId: 194438529

6 years agoOptimize functions in the function library.
A. Unique TensorFlower [Thu, 26 Apr 2018 19:12:06 +0000 (12:12 -0700)]
Optimize functions in the function library.

PiperOrigin-RevId: 194434546

6 years agoMove */logging.cc into :platform_base since it already exposes the header loggging.h
A. Unique TensorFlower [Thu, 26 Apr 2018 19:10:34 +0000 (12:10 -0700)]
Move */logging.cc into :platform_base since it already exposes the header loggging.h

This also brings env_time.h and env_time.cc, because on the 'default' platform logging needs env_time.

Add helpers tf_platform_srcs and tf_platform_hdrs to deal with files
that are not necessarily available in all platforms.

PiperOrigin-RevId: 194434322

6 years agoSimplify, test and document logic in instruction fusion that decides whether we
A. Unique TensorFlower [Thu, 26 Apr 2018 18:40:46 +0000 (11:40 -0700)]
Simplify, test and document logic in instruction fusion that decides whether we
allow fusion when an operation needs to be duplicated.

PiperOrigin-RevId: 194429279

6 years agoRemoving @@ comments from core TensorFlow. They are no longer needed for exporting...
Anna R [Thu, 26 Apr 2018 18:25:43 +0000 (11:25 -0700)]
Removing @@ comments from core TensorFlow. They are no longer needed for exporting symbols to the TensorFlow API.

PiperOrigin-RevId: 194426855