platform/upstream/tensorflow.git
6 years agoSplit gpu_id.h and GpuIdManager out from build target //tensorflow/core:gpu_runtime...
Guangda Lai [Fri, 9 Feb 2018 20:20:38 +0000 (12:20 -0800)]
Split gpu_id.h and GpuIdManager out from build target //tensorflow/core:gpu_runtime, to reduce the size of dependencies, so when other lightweight libraries like grappler utils needs the TfToCudaGpuId translation function it doesn't need to depend on things like stream executor and cuda libraries.

PiperOrigin-RevId: 185175757

6 years ago[XLA] Add a test for reduce window with large minor dimension.
A. Unique TensorFlower [Fri, 9 Feb 2018 20:19:29 +0000 (12:19 -0800)]
[XLA] Add a test for reduce window with large minor dimension.

PiperOrigin-RevId: 185175593

6 years agoAdd dynamic_rnn support for CloudTPU Magenta RNN
A. Unique TensorFlower [Fri, 9 Feb 2018 19:33:00 +0000 (11:33 -0800)]
Add dynamic_rnn support for CloudTPU Magenta RNN

PiperOrigin-RevId: 185169370

6 years agoSimplify and extend the management of input-conditional losses and updates.
Francois Chollet [Fri, 9 Feb 2018 19:28:21 +0000 (11:28 -0800)]
Simplify and extend the management of input-conditional losses and updates.

Instead of keeping track of dependencies manually, we rely on the TF graph structure to find dependencies. The resulting implementation is cleaner and more robust.

This does not change any existing behavior. It extends the current behavior by allowing `get_updates_for(inputs)` and `get_losses_for(inputs)` to be called from *any* tensors upstream of the layer, not just the immediate layer's inputs.

PiperOrigin-RevId: 185168680

6 years agoFix lint warnings. NFC
Jacques Pienaar [Fri, 9 Feb 2018 19:17:51 +0000 (11:17 -0800)]
Fix lint warnings. NFC

PiperOrigin-RevId: 185167035

6 years agoAdd export calls for protos.
Anna R [Fri, 9 Feb 2018 19:16:01 +0000 (11:16 -0800)]
Add export calls for protos.

PiperOrigin-RevId: 185166764

6 years agoRemove the unneeded "tf" argument for utility functions.
A. Unique TensorFlower [Fri, 9 Feb 2018 19:14:03 +0000 (11:14 -0800)]
Remove the unneeded "tf" argument for utility functions.

PiperOrigin-RevId: 185166507

6 years agoFix some doc strings that were accidentally removed.
Suharsh Sivakumar [Fri, 9 Feb 2018 19:01:07 +0000 (11:01 -0800)]
Fix some doc strings that were accidentally removed.

PiperOrigin-RevId: 185164375

6 years ago regression_head accepts link_fn as parameter, so the use can use self defined link fn
A. Unique TensorFlower [Fri, 9 Feb 2018 18:45:56 +0000 (10:45 -0800)]
  regression_head accepts link_fn as parameter, so the use can use self defined link fn

PiperOrigin-RevId: 185161896

6 years agoTFTS: Better handling of exogenous features
Allen Lavoie [Fri, 9 Feb 2018 18:13:05 +0000 (10:13 -0800)]
TFTS: Better handling of exogenous features

Adds (dummy) exogenous features to the LSTM model-building example, and adds some small methods needed to support that (fetching the shape of embedded exogenous features).

Also makes it more automatic to export a SavedModel with exogenous features (placeholder shapes will be inferred from the given FeatureColumns), which makes the LSTM example friendlier.

PiperOrigin-RevId: 185157085

6 years agoTFTS: Add exporting to SavedModel to the LSTM example
Allen Lavoie [Fri, 9 Feb 2018 17:25:10 +0000 (09:25 -0800)]
TFTS: Add exporting to SavedModel to the LSTM example

Was previously not using a state manager, which among other issues prevented
exporting.

Fixes #16590.

PiperOrigin-RevId: 185150900

6 years agoUpdate for LLVM API change r324700
A. Unique TensorFlower [Fri, 9 Feb 2018 17:12:19 +0000 (09:12 -0800)]
Update for LLVM API change r324700

PiperOrigin-RevId: 185149198

6 years agoComment update.
Sukriti Ramesh [Fri, 9 Feb 2018 15:55:46 +0000 (07:55 -0800)]
Comment update.

PiperOrigin-RevId: 185141668

6 years agoOnly convert format if input is of layout-agnostic type.
Yao Zhang [Fri, 9 Feb 2018 07:17:54 +0000 (23:17 -0800)]
Only convert format if input is of layout-agnostic type.

PiperOrigin-RevId: 185103227

6 years agoAdd tf_export decorators back to gen_*_ops.py files.
Anna R [Fri, 9 Feb 2018 01:02:48 +0000 (17:02 -0800)]
Add tf_export decorators back to gen_*_ops.py files.

PiperOrigin-RevId: 185075262

6 years agoExtended the Halton sequences to support randomization. Implemented the randomization...
A. Unique TensorFlower [Fri, 9 Feb 2018 00:47:58 +0000 (16:47 -0800)]
Extended the Halton sequences to support randomization. Implemented the randomization scheme described in arXiv:1706.02808.

PiperOrigin-RevId: 185073515

6 years agoAutomated g4 rollback of changelist 185006374
A. Unique TensorFlower [Fri, 9 Feb 2018 00:39:42 +0000 (16:39 -0800)]
Automated g4 rollback of changelist 185006374

PiperOrigin-RevId: 185072479

6 years agoFix bug in checkpointing DT_VARIANT tensors.
Saurabh Saxena [Fri, 9 Feb 2018 00:31:20 +0000 (16:31 -0800)]
Fix bug in checkpointing DT_VARIANT tensors.
Also add an integration test that runs and checkpoints multiple input pipelines in one graph.

PiperOrigin-RevId: 185071397

6 years agoImprove the flow to build TFLite iOS demo app
Yu-Cheng Ling [Fri, 9 Feb 2018 00:15:41 +0000 (16:15 -0800)]
Improve the flow to build TFLite iOS demo app

PiperOrigin-RevId: 185069356

6 years agoAdd our own "global step" called quantization_step to avoid needing to reset the...
Suharsh Sivakumar [Fri, 9 Feb 2018 00:11:03 +0000 (16:11 -0800)]
Add our own "global step" called quantization_step to avoid needing to reset the global step before running the graph rewrite.

PiperOrigin-RevId: 185068631

6 years agoAllow C64 infeeds.
Brian Patton [Fri, 9 Feb 2018 00:09:05 +0000 (16:09 -0800)]
Allow C64 infeeds.

PiperOrigin-RevId: 185068327

6 years agoMake SavedModelTest.testStripDefaultAttrsInconsistentConsumerDefaults work with C...
Skye Wanderman-Milne [Fri, 9 Feb 2018 00:05:31 +0000 (16:05 -0800)]
Make SavedModelTest.testStripDefaultAttrsInconsistentConsumerDefaults work with C API.

The test originally altered the Python version of the op registry,
which is not reflected in the C API. This changes the test to alter
the serialized node def instead of the op def, and renames the test to
testInconsistentConsumerDefaultAttrs.

PiperOrigin-RevId: 185067838

6 years agoChanges behavior of optimizer.minimize(loss) when loss is a function.
Alexandre Passos [Thu, 8 Feb 2018 23:36:04 +0000 (15:36 -0800)]
Changes behavior of optimizer.minimize(loss) when loss is a function.

Now supports both eager and graph mode, and loss is always a callable
with no arguments. Supports variables and non-variables in var_list.

PiperOrigin-RevId: 185063691

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 23:28:30 +0000 (15:28 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185062323

6 years agoUpdate fake quant op to support bitwidths in the range 2 to 16, from 2 to 8.
Raghuraman Krishnamoorthi [Thu, 8 Feb 2018 23:21:22 +0000 (15:21 -0800)]
Update fake quant op to support bitwidths in the range 2 to 16, from 2 to 8.

PiperOrigin-RevId: 185061307

6 years agoObject based saving prototype: create ResourceVariables directly by default.
Allen Lavoie [Thu, 8 Feb 2018 23:18:31 +0000 (15:18 -0800)]
Object based saving prototype: create ResourceVariables directly by default.

This avoids variable reuse errors when building a graph. Where necessary for compatibility, we can still use get_variable.

PiperOrigin-RevId: 185060891

6 years agoAdd memory usage report to cost analyzer tool; run all default optimizations.
Yao Zhang [Thu, 8 Feb 2018 23:06:57 +0000 (15:06 -0800)]
Add memory usage report to cost analyzer tool; run all default optimizations.

PiperOrigin-RevId: 185058999

6 years agoAdd more vlogging to op level estimator.
Yao Zhang [Thu, 8 Feb 2018 23:06:54 +0000 (15:06 -0800)]
Add more vlogging to op level estimator.

PiperOrigin-RevId: 185058989

6 years ago[TF contrib RNN] Expose some rnn classes and functionality in contrib.
Eugene Brevdo [Thu, 8 Feb 2018 23:01:49 +0000 (15:01 -0800)]
[TF contrib RNN] Expose some rnn classes and functionality in contrib.

PiperOrigin-RevId: 185057994

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 8 Feb 2018 22:57:46 +0000 (14:57 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 185057233

6 years agoAdd a _TensorProcessor for computing gradients but not applying them.
A. Unique TensorFlower [Thu, 8 Feb 2018 22:55:09 +0000 (14:55 -0800)]
Add a _TensorProcessor for computing gradients but not applying them.

PiperOrigin-RevId: 185056764

6 years agoUpdated API for quantize_graph: Programmable quant_delay to determine start of quanti...
Raghuraman Krishnamoorthi [Thu, 8 Feb 2018 22:50:54 +0000 (14:50 -0800)]
Updated API for quantize_graph: Programmable quant_delay to determine start of quantization in training.
Remove delay_requested parameter in _InsertQuantOp, presence or absence of quant_delay
is directly inferred from value of quant_delay. Any positive value causes insertion of
delayed quantization into the graph.

Experimental APIs for quantization with more programmability, including bitwidths for weights and activations.

PiperOrigin-RevId: 185056081

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 22:47:28 +0000 (14:47 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185055497

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 8 Feb 2018 22:27:03 +0000 (14:27 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 185052000

6 years agoUpdates to fastpath execution code
Akshay Modi [Thu, 8 Feb 2018 22:23:25 +0000 (14:23 -0800)]
Updates to fastpath execution code

- Add default value shape handling
- Add default value func handling (including adding a new function for this in
  the eager C API)
- Update callback execution interface to match record_gradient call

PiperOrigin-RevId: 185051447

6 years agoObject-based saving prototype: allow only named edges
Allen Lavoie [Thu, 8 Feb 2018 22:19:23 +0000 (14:19 -0800)]
Object-based saving prototype: allow only named edges

Simplifies the logic a bit, and removes one source of potential checkpoint
incompatibilities.

Classes like Sequential which need anonymous references to other objects may
generate string names containing numbers.

PiperOrigin-RevId: 185050714

6 years agoDon't fail if control dependency is on an input of the function.
Akshay Modi [Thu, 8 Feb 2018 22:10:51 +0000 (14:10 -0800)]
Don't fail if control dependency is on an input of the function.

PiperOrigin-RevId: 185049319

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 21:43:20 +0000 (13:43 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185044705

6 years agoPrototype object-based save/restore syntax sugar
Allen Lavoie [Thu, 8 Feb 2018 21:38:50 +0000 (13:38 -0800)]
Prototype object-based save/restore syntax sugar

- Overrides __setattr__ to allow implicit dependencies
- Supports any valid Python 2 identifier as a Checkpointable dependency name (was messing with underscore prefixes)

PiperOrigin-RevId: 185044022

6 years agoPlumbs a variable from the batching function decorator to the queue depth control...
A. Unique TensorFlower [Thu, 8 Feb 2018 21:37:48 +0000 (13:37 -0800)]
Plumbs a variable from the batching function decorator to the queue depth control option in the underlying BatchingQueue. It defaults to 10 if not set, which was the original default value in the BatchingQueue options struct.

PiperOrigin-RevId: 185043844

6 years agoInternal functional _If and _While ops.
Alexandre Passos [Thu, 8 Feb 2018 21:30:17 +0000 (13:30 -0800)]
Internal functional _If and _While ops.

PiperOrigin-RevId: 185042663

6 years agoC API: Fixes #7394
Asim Shankar [Thu, 8 Feb 2018 21:17:53 +0000 (13:17 -0800)]
C API: Fixes #7394

Ideally, when TF_NewTensor is provided with invalid arguments it would provide
a detailed error message. However, for now, to keep the existing API, signal
failure by returning nullptr.

PiperOrigin-RevId: 185040858

6 years ago[TF:XLA] Handle fusion instructions in HloInstruction equality comparison.
A. Unique TensorFlower [Thu, 8 Feb 2018 21:00:09 +0000 (13:00 -0800)]
[TF:XLA] Handle fusion instructions in HloInstruction equality comparison.

Two fusion instructions are equal iff the fusion kind matches and the fused subcomputations are structurally equal.

PiperOrigin-RevId: 185038129

6 years agoBug fix in buffer assignment for colocated buffers
HyoukJoong Lee [Thu, 8 Feb 2018 20:30:28 +0000 (12:30 -0800)]
Bug fix in buffer assignment for colocated buffers

PiperOrigin-RevId: 185034095

6 years ago[XLA] Improve comment about why we can't unroll loops with static trip count of 1...
Justin Lebar [Thu, 8 Feb 2018 20:29:56 +0000 (12:29 -0800)]
[XLA] Improve comment about why we can't unroll loops with static trip count of 1 if they contain side-effecting ops.

PiperOrigin-RevId: 185034032

6 years agoAdd effective_sample_size to tf.contrib.bayesflow.mcmc_diagnostics.
Ian Langmore [Thu, 8 Feb 2018 20:15:32 +0000 (12:15 -0800)]
Add effective_sample_size to tf.contrib.bayesflow.mcmc_diagnostics.
Also, start dealing with list args in a more regular manner.

PiperOrigin-RevId: 185032115

6 years agoExpose python:platform build target.
A. Unique TensorFlower [Thu, 8 Feb 2018 20:04:37 +0000 (12:04 -0800)]
Expose python:platform build target.

PiperOrigin-RevId: 185030536

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Thu, 8 Feb 2018 19:40:28 +0000 (11:40 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 185026527

6 years agoChanging ".lite" to ".tflite" in documents.
Yu-Cheng Ling [Thu, 8 Feb 2018 19:40:05 +0000 (11:40 -0800)]
Changing ".lite" to ".tflite" in documents.

PiperOrigin-RevId: 185026484

6 years agoUpdate llvm revision to r324405, which introduces an Orc API change.
A. Unique TensorFlower [Thu, 8 Feb 2018 19:31:09 +0000 (11:31 -0800)]
Update llvm revision to r324405, which introduces an Orc API change.

PiperOrigin-RevId: 185025122

6 years ago[tf.data] Remove deprecated `tf.contrib.data.Iterator` alias.
Derek Murray [Thu, 8 Feb 2018 19:28:55 +0000 (11:28 -0800)]
[tf.data] Remove deprecated `tf.contrib.data.Iterator` alias.

This change removes the following class:
* `tf.contrib.data.Iterator`.

IF THIS BREAKS YOU: Replace `tf.contrib.data.Iterator` with `tf.data.Iterator`
when explicitly constructing an iterator. The API for the resulting object is
identical.

PiperOrigin-RevId: 185024771

6 years agoPreserving order when removing nodes.
A. Unique TensorFlower [Thu, 8 Feb 2018 19:20:39 +0000 (11:20 -0800)]
Preserving order when removing nodes.

PiperOrigin-RevId: 185023366

6 years agoUpdate the wrapper gen code to call out to the fastpath function.
Akshay Modi [Thu, 8 Feb 2018 18:42:01 +0000 (10:42 -0800)]
Update the wrapper gen code to call out to the fastpath function.

PiperOrigin-RevId: 185016979

6 years agoFix minor bug with tf.keras model calling (related to mask caching).
Francois Chollet [Thu, 8 Feb 2018 18:41:37 +0000 (10:41 -0800)]
Fix minor bug with tf.keras model calling (related to mask caching).

PiperOrigin-RevId: 185016910

6 years ago[tf.data] Remove deprecated reader dataset classes in `tf.contrib.data`.
Derek Murray [Thu, 8 Feb 2018 18:39:32 +0000 (10:39 -0800)]
[tf.data] Remove deprecated reader dataset classes in `tf.contrib.data`.

This change removes the following classes:
* `tf.contrib.data.FixedLengthRecordDataset`
* `tf.contrib.data.TextLineDataset`
* `tf.contrib.data.TFRecordDataset`

IF THIS BREAKS YOU: Replace `tf.contrib.data` with `tf.data` when constructing a
`FixedLengthRecordDataset`, `TextLineDataset`, or `TFRecordDataset`. Note that
you may have to modify downstream transformations to use the core API. See
"tensorflow/contrib/data/README.md" for details of how to update your code to use
the core API.

PiperOrigin-RevId: 185016587

6 years agoUpdate for LLVM API change r324405
A. Unique TensorFlower [Thu, 8 Feb 2018 18:37:40 +0000 (10:37 -0800)]
Update for LLVM API change r324405

PiperOrigin-RevId: 185016276

6 years agoRemove cudnn_type parameter from a few template member functions in class
Bixia Zheng [Thu, 8 Feb 2018 18:22:16 +0000 (10:22 -0800)]
Remove cudnn_type parameter from a few template member functions in class
CudnnSupport.

The cudnn_type value in those functions is implied by the device memory
type DeviceMemory<T> and is a compile-time constant.

PiperOrigin-RevId: 185013909

6 years agoMake MklCpuAllocator a VisitableAllocator, instead of just an Allocator.
A. Unique TensorFlower [Thu, 8 Feb 2018 18:20:26 +0000 (10:20 -0800)]
Make MklCpuAllocator a VisitableAllocator, instead of just an Allocator.
This allows it to work more efficiently with RDMA networking.

PiperOrigin-RevId: 185013628

6 years agoMake quantization rewrites happen in place.
Suharsh Sivakumar [Thu, 8 Feb 2018 17:34:49 +0000 (09:34 -0800)]
Make quantization rewrites happen in place.

If no graph is provided, then the default graph is used.

PiperOrigin-RevId: 185007107

6 years agoEnable algebraic optimizations for operations with neutral and absorbing elements...
A. Unique TensorFlower [Thu, 8 Feb 2018 17:29:32 +0000 (09:29 -0800)]
Enable algebraic optimizations for operations with neutral and absorbing elements by default - not only when feeds are absent or in aggressive mode.

PiperOrigin-RevId: 185006374

6 years agoMore updates:
A. Unique TensorFlower [Thu, 8 Feb 2018 17:03:30 +0000 (09:03 -0800)]
More updates:
 * add a verbose flag, useful for debugging
 * fix the canonicalization of old-style print statement
 * fix broken py_func wrapper
 * expand the conditional statement to return a dummy value if we cannot fine any return values, and call without an assignment so that the side effect guards catch it instead
 * streamline the converter tests a bit more
 * avoid aliasing "tf" and "self" in the side effect guards
 * improve the namer to generate shorter names

PiperOrigin-RevId: 185002802

6 years agoEmitting type-dependent cond and while_loop code.
A. Unique TensorFlower [Thu, 8 Feb 2018 15:36:03 +0000 (07:36 -0800)]
Emitting type-dependent cond and while_loop code.

PiperOrigin-RevId: 184993166

6 years agoPatch cub on download to fix compilation error with clang.
Ilya Biryukov [Thu, 8 Feb 2018 12:18:40 +0000 (04:18 -0800)]
Patch cub on download to fix compilation error with clang.

The same patch was sent via PR to cub upstream:
https://github.com/NVlabs/cub/pull/125

PiperOrigin-RevId: 184975304

6 years agoAutomated g4 rollback of changelist 184303789
A. Unique TensorFlower [Thu, 8 Feb 2018 11:18:36 +0000 (03:18 -0800)]
Automated g4 rollback of changelist 184303789

PiperOrigin-RevId: 184970903

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 8 Feb 2018 06:18:45 +0000 (22:18 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 184947099

6 years agoSwitch to using ResourceVariable in Keras for full Eager-mode compatibility.
Francois Chollet [Thu, 8 Feb 2018 05:56:28 +0000 (21:56 -0800)]
Switch to using ResourceVariable in Keras for full Eager-mode compatibility.

PiperOrigin-RevId: 184945626

6 years agoFixing the anchor link for the Math ops guide on Segmentation (it's a capital S but...
A. Unique TensorFlower [Thu, 8 Feb 2018 05:11:56 +0000 (21:11 -0800)]
Fixing the anchor link for the Math ops guide on Segmentation (it's a capital S but our docs link to a lowercase s).

PiperOrigin-RevId: 184942994

6 years agoTemporarily weaken Identity pruning in model_pruner while investigating test failure...
A. Unique TensorFlower [Thu, 8 Feb 2018 05:05:41 +0000 (21:05 -0800)]
Temporarily weaken Identity pruning in model_pruner while investigating test failure of //robotics/learning/sensor_predict:utils_multi_sensor_rnn_test.

PiperOrigin-RevId: 184942554

6 years agoMove TPU doc to "using_tpu". Add short titles to some docs.
Mark Daoust [Thu, 8 Feb 2018 04:50:09 +0000 (20:50 -0800)]
Move TPU doc to "using_tpu". Add short titles to some docs.

PiperOrigin-RevId: 184941101

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 8 Feb 2018 04:49:37 +0000 (20:49 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 184941052

6 years ago[tf.data] Move C++ code backing `tf.contrib.data.ignore_errors()` to contrib.
Derek Murray [Thu, 8 Feb 2018 04:17:11 +0000 (20:17 -0800)]
[tf.data] Move C++ code backing `tf.contrib.data.ignore_errors()` to contrib.

This change moves the `OpKernel` and `DatasetBase` implementations to
"tensorflow/contrib/data/kernels", where they are packaged as a custom
op library. This demonstrates (and enforces by continuous integration)
the ability to build a C++ Dataset implementation in a custom op
library.

Other contrib Dataset implementations will move in subsequent changes.

PiperOrigin-RevId: 184938885

6 years ago[XLA:CPU] Fix tfcompile's use of freeze_graph.py
Sanjoy Das [Thu, 8 Feb 2018 03:24:57 +0000 (19:24 -0800)]
[XLA:CPU] Fix tfcompile's use of freeze_graph.py

Not sure if I am holding it wrong, but I could not make the existing
FLAGS.check_version work.

PiperOrigin-RevId: 184935374

6 years agoReduce the number of concats to avoid test timeout.
Yao Zhang [Thu, 8 Feb 2018 02:11:51 +0000 (18:11 -0800)]
Reduce the number of concats to avoid test timeout.

PiperOrigin-RevId: 184929151

6 years agoRemove note about accumulator variables, since those are not added to TRAINABLE_VARIA...
A. Unique TensorFlower [Thu, 8 Feb 2018 01:16:32 +0000 (17:16 -0800)]
Remove note about accumulator variables, since those are not added to TRAINABLE_VARIABLES.

PiperOrigin-RevId: 184922273

6 years agoAdd operation to forward log messages from remote workers to a local system.
Russell Power [Thu, 8 Feb 2018 01:12:01 +0000 (17:12 -0800)]
Add operation to forward log messages from remote workers to a local system.

PiperOrigin-RevId: 184921657

6 years ago[XLA:CPU] Fix test case for vectorized Exp and Tanh to actually vectorize
Sanjoy Das [Thu, 8 Feb 2018 00:48:45 +0000 (16:48 -0800)]
[XLA:CPU] Fix test case for vectorized Exp and Tanh to actually vectorize

I just noticed that the test case for ArrayElementwiseOpTest::ExpF32sVector and
possibly for ArrayElementwiseOpTest::ExpF32sVector does not actually vectorize
the intrinsic calls.  This is most likely a very recent regression because I
remember fixing at least one issue in the emitter demonstrated by the test.
Despite that I think the current approach is better since we have unit tests
that check that we at least vectorize the vector-of-F32's case.

PiperOrigin-RevId: 184918373

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 8 Feb 2018 00:34:57 +0000 (16:34 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 184916250

6 years agoDisable internally failing array_ops test.
Michael Case [Thu, 8 Feb 2018 00:26:55 +0000 (16:26 -0800)]
Disable internally failing array_ops test.

PiperOrigin-RevId: 184915141

6 years agoRemove tf.contrib.ndlstm as it is not maintained and barely used.
Eugene Brevdo [Thu, 8 Feb 2018 00:24:34 +0000 (16:24 -0800)]
Remove tf.contrib.ndlstm as it is not maintained and barely used.

Users can find an external implementation by the original author at:

https://github.com/tmbarchive/tfndlstm

PiperOrigin-RevId: 184914822

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Wed, 7 Feb 2018 23:08:24 +0000 (15:08 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 184903402

6 years ago[XLA] Keep the number of HloPasses minimum for the interpreter backend.
Kay Zhu [Wed, 7 Feb 2018 22:51:03 +0000 (14:51 -0800)]
[XLA] Keep the number of HloPasses minimum for the interpreter backend.

This would be useful to identify bugs for these HLO passes.

PiperOrigin-RevId: 184900236

6 years agoMerge changes from github.
Michael Case [Wed, 7 Feb 2018 22:36:00 +0000 (14:36 -0800)]
Merge changes from github.

PiperOrigin-RevId: 184897758

6 years agoBetter documentation for contrib summaries.
Alexandre Passos [Wed, 7 Feb 2018 22:13:05 +0000 (14:13 -0800)]
Better documentation for contrib summaries.

Also all_summary_ops returns None in eager mode instead of error.

PiperOrigin-RevId: 184893777

6 years agoGeneralize quantization rewrite to not rely on names.
Suharsh Sivakumar [Wed, 7 Feb 2018 21:47:02 +0000 (13:47 -0800)]
Generalize quantization rewrite to not rely on names.

It should now work with most graphs regardless if they were built slim or not.

PiperOrigin-RevId: 184889280

6 years agoChange output of slim.learning.train to total_loss = None, if no training step was...
A. Unique TensorFlower [Wed, 7 Feb 2018 21:46:29 +0000 (13:46 -0800)]
Change output of slim.learning.train to total_loss = None, if no training step was actually performed.

PiperOrigin-RevId: 184889196

6 years ago[tf.data] Move the C++ Dataset class implementations to the framework library.
Derek Murray [Wed, 7 Feb 2018 21:44:30 +0000 (13:44 -0800)]
[tf.data] Move the C++ Dataset class implementations to the framework library.

This enables the use of the `DatasetOpKernel` subclasses in custom op library
code. A subsequent change will move `tf.contrib.data` kernel implementations
to a custom op library.

Implementation note: This change moves some classes from
"tensorflow/core/graph/..." into the framework library, which does not
include any code in "tensorflow/core/common_runtime/...". To break the
dependency from "tensorflow/core/framework/dataset.cc" to
"tensorflow/core/common_runtime/...", the `GraphDefBuilderToGraph()`
method has been split out from the `GraphDefBuilder` class (where it
was previously exposed as the `GraphDefBuilder::ToGraph()` utility
method) and added to a new
"tensorflow/core/graph/graph_def_builder_util.h" module.  This method
depends on ".../graph/graph_constructor.cc", which depends directly on
".../common_runtime/shape_refiner.h" and indirectly on
".../common_runtime/graph_runner.h". Since this method was used only
in tests, these have been updated to point to the new utility method.

PiperOrigin-RevId: 184888903

6 years agoMakefile flag to use Apple Accelerate for Conv on iOS.
Yu-Cheng Ling [Wed, 7 Feb 2018 21:39:01 +0000 (13:39 -0800)]
Makefile flag to use Apple Accelerate for Conv on iOS.

PiperOrigin-RevId: 184888096

6 years agoAdd BatchMatMul support and improve tensorflow graphdef export by adding ops and...
A. Unique TensorFlower [Wed, 7 Feb 2018 20:32:53 +0000 (12:32 -0800)]
Add BatchMatMul support and improve tensorflow graphdef export by adding ops and fixing typing and resolving constant Transpose ops.

PiperOrigin-RevId: 184878663

6 years agoSet the number of warmup steps for building the cost model.
Yao Zhang [Wed, 7 Feb 2018 20:29:25 +0000 (12:29 -0800)]
Set the number of warmup steps for building the cost model.

PiperOrigin-RevId: 184878186

6 years agoInitial XLA support for TF eager. This is prerequisite for TF compiler's XLA support.
Mingsheng Hong [Wed, 7 Feb 2018 20:22:55 +0000 (12:22 -0800)]
Initial XLA support for TF eager. This is prerequisite for TF compiler's XLA support.

This CL adds XLA support for the following TFE_Op's:

1. A TF op such as MatMul, with full support of constant and resource params.

2. A TF_Function as TFE_Op, where the function must have no constant and
resource params. Removing this restriction requires more discussion and will be
deferred to a later time.

PiperOrigin-RevId: 184877345

6 years agoUpdate TFLite iOS Camera Example app to use TFLite CocoaPod.
Yu-Cheng Ling [Wed, 7 Feb 2018 20:05:01 +0000 (12:05 -0800)]
Update TFLite iOS Camera Example app to use TFLite CocoaPod.

PiperOrigin-RevId: 184874871

6 years agoUpdate to type-dependent while loop, and tests for it.
A. Unique TensorFlower [Wed, 7 Feb 2018 20:01:40 +0000 (12:01 -0800)]
Update to type-dependent while loop, and tests for it.

PiperOrigin-RevId: 184874151

6 years agoPrototype for object-based save/restore
Allen Lavoie [Wed, 7 Feb 2018 19:48:15 +0000 (11:48 -0800)]
Prototype for object-based save/restore

Includes deferred restoration (mostly useful for eager execution).

Slot variables are created with their checkpointed values as soon as the variable they're slotting for is restored, so there's no need to override slot creation (optimizers already check for existing slot variables before creating a new one).

Changes the behavior of unnamed Checkpointable dependencies so that only other unnamed dependencies can interfere (named dependencies do not get a number). This should be a bit more robust, and will support property assignment syntax sugar in a future CL. It does mean that removing a name from a dependency will break the checkpoint (just like changing its name would).

One minor fix for slot creation eager compatibility.

PiperOrigin-RevId: 184871747

6 years agomake calling NNAPI work again
A. Unique TensorFlower [Wed, 7 Feb 2018 19:17:01 +0000 (11:17 -0800)]
make calling NNAPI work again
(this a copy of #16256 which apparently got lost in the one of the merges)

PiperOrigin-RevId: 184866202

6 years agoImprove model_pruner:
A. Unique TensorFlower [Wed, 7 Feb 2018 18:30:39 +0000 (10:30 -0800)]
Improve model_pruner:
  * Actually remove nodes marked for removal if fetches are known.
  * Remove trivial nodes even in the presence of control inputs, except
    for Identity nodes when
      a) they are anchored on an Identity following a Switch node and
         removal would require anchoring a control identity on the Switch, or
      b) they have control inputs and feed a Merge node.
  * Remove nodes only when in_degree * out_degree <= in_degree + out_degree.

Move input deduping utility function to utils.{h,cc}.

PiperOrigin-RevId: 184858685

6 years ago[XLA:CPU] Fix/suppress issues caught by the C++ linter
Sanjoy Das [Wed, 7 Feb 2018 18:18:53 +0000 (10:18 -0800)]
[XLA:CPU] Fix/suppress issues caught by the C++ linter

PiperOrigin-RevId: 184856538

6 years agoMake TypeError more explicit on _assertAllCloseRecursive
A. Unique TensorFlower [Wed, 7 Feb 2018 17:08:51 +0000 (09:08 -0800)]
Make TypeError more explicit on _assertAllCloseRecursive

PiperOrigin-RevId: 184846656

6 years agoAdding support for standalone Tanh operator.
A. Unique TensorFlower [Wed, 7 Feb 2018 17:01:44 +0000 (09:01 -0800)]
Adding support for standalone Tanh operator.

PiperOrigin-RevId: 184845130

6 years agoRefactor score definition in GMM operations. This is simplified to be the per-sample...
A. Unique TensorFlower [Wed, 7 Feb 2018 16:48:05 +0000 (08:48 -0800)]
Refactor score definition in GMM operations. This is simplified to be the per-sample likelihood of the data.

PiperOrigin-RevId: 184843634

6 years agoUtilities for type checking and multiple dispatch.
A. Unique TensorFlower [Wed, 7 Feb 2018 15:16:17 +0000 (07:16 -0800)]
Utilities for type checking and multiple dispatch.

PiperOrigin-RevId: 184834434