platform/upstream/tensorflow.git
6 years agoeager: Export tf.enable_eager_execution() and tf.executing_eagerly()
Asim Shankar [Thu, 8 Mar 2018 00:44:11 +0000 (16:44 -0800)]
eager: Export tf.enable_eager_execution() and tf.executing_eagerly()

PiperOrigin-RevId: 188255674

6 years agoCheckpointable: Fix device placement when restoring name-based checkpoints.
Allen Lavoie [Wed, 7 Mar 2018 23:52:25 +0000 (15:52 -0800)]
Checkpointable: Fix device placement when restoring name-based checkpoints.

Just need to put the restore ops on a CPU.

PiperOrigin-RevId: 188248198

6 years agoAdded tf.contrib.data.make_batched_features_dataset as replacement of tf.contrib...
Katherine Wu [Wed, 7 Mar 2018 23:03:32 +0000 (15:03 -0800)]
Added tf.contrib.data.make_batched_features_dataset as replacement of tf.contrib.learn.io.read_batch_features. Added warning about the deprecation of tf.contrib.data.read_batch_features.

PiperOrigin-RevId: 188240046

6 years agoMigrate AIS chain into `tfp.mcmc` and modularize its interface to take a TransitionKe...
Joshua V. Dillon [Wed, 7 Mar 2018 23:00:43 +0000 (15:00 -0800)]
Migrate AIS chain into `tfp.mcmc` and modularize its interface to take a TransitionKernel.

PiperOrigin-RevId: 188239559

6 years agopy_func attaches full stack traces when an error is raised.
Eugene Brevdo [Wed, 7 Mar 2018 22:53:49 +0000 (14:53 -0800)]
py_func attaches full stack traces when an error is raised.

This should help debugging errors that occur inside a py_func.

PiperOrigin-RevId: 188238495

6 years agoRemove unused parameter from GetQuantizationParamsFromMinMax.
A. Unique TensorFlower [Wed, 7 Mar 2018 22:42:36 +0000 (14:42 -0800)]
Remove unused parameter from GetQuantizationParamsFromMinMax.

PiperOrigin-RevId: 188236536

6 years agoFix GCS uploads occasionally failing when retrying.
Jonathan Hseu [Wed, 7 Mar 2018 22:33:07 +0000 (14:33 -0800)]
Fix GCS uploads occasionally failing when retrying.

GCS returns 400, invalid argument because it thinks the body is not empty. cURL, by default, sets "Transfer-Encoding: Chunked", which causes the server to ignore "Content-Length: 0":
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding

The server considers the HTTP request incomplete and may non-deterministically fail.

PiperOrigin-RevId: 188235030

6 years agoDon't populate linear_ with a logical index
Sanjoy Das [Wed, 7 Mar 2018 22:32:28 +0000 (14:32 -0800)]
Don't populate linear_ with a logical index

We use linear_ to directly emit array element access in some cases so populating
it with the logical linear index seems incorrect.

PiperOrigin-RevId: 188234902

6 years agoCreate mobile testing rules for TF Lite known-portable targets
Austin Anderson [Wed, 7 Mar 2018 22:30:00 +0000 (14:30 -0800)]
Create mobile testing rules for TF Lite known-portable targets

This CL tags all known-already-portable TF Lite tests as portable, and
(from those tests) tags those known as not portable.

Adding tflite_portable_test_suite() to the bottom of a package marks all
previous cc_tests as "intended to be portable". I've included all tests
that I was able to naively make buildable on Android with my previous
change that created a custom logging.h library. Most tests are buildable
on Android already, but there is something in the common dependencies
for the kernel tests that is not compatible with iOS.

Outside of Google, this change does nothing except tag tests that are
known to not be buildable on certain platforms.

PiperOrigin-RevId: 188234489

6 years ago[TF:XLA] Bump open source llvm revision to r326829
Sanjoy Das [Wed, 7 Mar 2018 22:02:38 +0000 (14:02 -0800)]
[TF:XLA] Bump open source llvm revision to r326829

PiperOrigin-RevId: 188229669

6 years ago[tf.data] Optimize `Dataset.filter()` when the predicate returns one of its args.
Derek Murray [Wed, 7 Mar 2018 22:02:15 +0000 (14:02 -0800)]
[tf.data] Optimize `Dataset.filter()` when the predicate returns one of its args.

This change avoids the overhead of function dispatch (~10--15us) when
the filter predicate simply returns one of its arguments directly. It
also adds a benchmark to track the performance of this optimization.

The checkpointing code required minor modifications to enable functions to be
instantiated in the `FilterDatasetOp::Compute()` method when an iterator is being
restored.

PiperOrigin-RevId: 188229570

6 years agoUpdate graph rewrites for host compute ops
A. Unique TensorFlower [Wed, 7 Mar 2018 21:56:05 +0000 (13:56 -0800)]
Update graph rewrites for host compute ops

PiperOrigin-RevId: 188228489

6 years ago[tpu.datasets]: Improve the performance of the StreamingFilesDataset.
Brennan Saeta [Wed, 7 Mar 2018 21:52:44 +0000 (13:52 -0800)]
[tpu.datasets]: Improve the performance of the StreamingFilesDataset.

In order to effectively pipeline the transfers, set num_parallel_calls=4.

PiperOrigin-RevId: 188227890

6 years agoFurther small support for quantized unfused LSTMs.
A. Unique TensorFlower [Wed, 7 Mar 2018 21:09:07 +0000 (13:09 -0800)]
Further small support for quantized unfused LSTMs.

PiperOrigin-RevId: 188221169

6 years agoInternal Change
A. Unique TensorFlower [Wed, 7 Mar 2018 20:38:18 +0000 (12:38 -0800)]
Internal Change

PiperOrigin-RevId: 188217110

6 years agoTFE_Context gets its local devices from the source instead of a session.
Alexandre Passos [Wed, 7 Mar 2018 20:30:47 +0000 (12:30 -0800)]
TFE_Context gets its local devices from the source instead of a session.

PiperOrigin-RevId: 188216178

6 years agoAdd support for padding tf.string tensors on CPU.
RJ Ryan [Wed, 7 Mar 2018 20:21:17 +0000 (12:21 -0800)]
Add support for padding tf.string tensors on CPU.

PiperOrigin-RevId: 188215092

6 years agoeager: Rename in_eager_mode to executing_eagerly and get rid of in_graph_mode.
Asim Shankar [Wed, 7 Mar 2018 20:03:56 +0000 (12:03 -0800)]
eager: Rename in_eager_mode to executing_eagerly and get rid of in_graph_mode.

This is in preparation to introduce one public, stable symbol: tf.executing_eagerly()
(i.e., part of moving APIs related to eager execution from "contrib" to a namespace
where we provide API stability guarantees)

PiperOrigin-RevId: 188212646

6 years agoConvert functions with multiple returns to use a single return.
A. Unique TensorFlower [Wed, 7 Mar 2018 20:01:42 +0000 (12:01 -0800)]
Convert functions with multiple returns to use a single return.

PiperOrigin-RevId: 188212324

6 years agoSupport for transpose convolution. Includes striding, and a reference implementation.
A. Unique TensorFlower [Wed, 7 Mar 2018 19:53:21 +0000 (11:53 -0800)]
Support for transpose convolution. Includes striding, and a reference implementation.

PiperOrigin-RevId: 188210975

6 years agoMaking sure that the proc FLR doesn't get deleted before lib_ (in FunctionBufferingRe...
Rohan Jain [Wed, 7 Mar 2018 19:27:12 +0000 (11:27 -0800)]
Making sure that the proc FLR doesn't get deleted before lib_ (in FunctionBufferingResource).

PiperOrigin-RevId: 188206611

6 years agoMove `tf.contrib.bayesflow.layers` to `tfp.layers`.
Joshua V. Dillon [Wed, 7 Mar 2018 19:12:11 +0000 (11:12 -0800)]
Move `tf.contrib.bayesflow.layers` to `tfp.layers`.

PiperOrigin-RevId: 188203941

6 years agoOptimizations to DepthwiseConv using 3x3 filters.
A. Unique TensorFlower [Wed, 7 Mar 2018 19:04:21 +0000 (11:04 -0800)]
Optimizations to DepthwiseConv using 3x3 filters.

PiperOrigin-RevId: 188202344

6 years agoProperly parse input strings in the dependency optimizer
Benoit Steiner [Wed, 7 Mar 2018 18:58:44 +0000 (10:58 -0800)]
Properly parse input strings in the dependency optimizer

PiperOrigin-RevId: 188201284

6 years agoDocs: Add simple_save section to SavedModel APIs, and add
Billy Lamberta [Wed, 7 Mar 2018 18:47:57 +0000 (10:47 -0800)]
Docs: Add simple_save section to SavedModel APIs, and add
to article intro. Rename headers to make consistent.

PiperOrigin-RevId: 188199437

6 years agoMigrate Halton Sequence sampler into tensorflow_probability.
Joshua V. Dillon [Wed, 7 Mar 2018 17:58:22 +0000 (09:58 -0800)]
Migrate Halton Sequence sampler into tensorflow_probability.

PiperOrigin-RevId: 188191091

6 years agoboosted_trees: fix the comments about gain by removing a confusing dash.
A. Unique TensorFlower [Wed, 7 Mar 2018 17:57:48 +0000 (09:57 -0800)]
boosted_trees: fix the comments about gain by removing a confusing dash.

PiperOrigin-RevId: 188191012

6 years ago[tf.data] Improve docstring for `tf.data.Dataset.padded_batch()`.
Derek Murray [Wed, 7 Mar 2018 17:53:52 +0000 (09:53 -0800)]
[tf.data] Improve docstring for `tf.data.Dataset.padded_batch()`.

PiperOrigin-RevId: 188190458

6 years agoSwitch the eager GAN MNIST example to object-based checkpointing
Allen Lavoie [Wed, 7 Mar 2018 17:51:14 +0000 (09:51 -0800)]
Switch the eager GAN MNIST example to object-based checkpointing

- Removes variable_scopes, since they're no longer necessary (duplicate variable names are OK)
- Switches up the counters a bit (global_step -> step_counter, checkpoint the epoch counter)

PiperOrigin-RevId: 188190128

6 years agoAdd missing equality assertion between the shape of the 2 inputs to the tile op.
Benoit Steiner [Wed, 7 Mar 2018 17:50:46 +0000 (09:50 -0800)]
Add missing equality assertion between the shape of the 2 inputs to the tile op.

PiperOrigin-RevId: 188190067

6 years agoAdd instrumentation interfaces to the GCS file system.
Brennan Saeta [Wed, 7 Mar 2018 17:34:44 +0000 (09:34 -0800)]
Add instrumentation interfaces to the GCS file system.

PiperOrigin-RevId: 188187793

6 years agoFix tf.train.Saver's max_to_keep when executing eagerly.
Allen Lavoie [Wed, 7 Mar 2018 17:31:48 +0000 (09:31 -0800)]
Fix tf.train.Saver's max_to_keep when executing eagerly.

It was keeping everything, since the list of things to delete was reset in
build() and build() was called every save.

PiperOrigin-RevId: 188187349

6 years ago[tf.data] Expose `tf.contrib.data.SqlDataset`.
Derek Murray [Wed, 7 Mar 2018 17:16:32 +0000 (09:16 -0800)]
[tf.data] Expose `tf.contrib.data.SqlDataset`.

PiperOrigin-RevId: 188185438

6 years agoAdd a template helper that generates expressions from single-statement nodes.
A. Unique TensorFlower [Wed, 7 Mar 2018 17:08:27 +0000 (09:08 -0800)]
Add a template helper that generates expressions from single-statement nodes.

PiperOrigin-RevId: 188184507

6 years agoAdd support for the "DEQUANTIZE" op. This cover only ops that are generated by TOCO
A. Unique TensorFlower [Wed, 7 Mar 2018 16:52:39 +0000 (08:52 -0800)]
Add support for the "DEQUANTIZE" op. This cover only ops that are generated by TOCO
in order to handle UINT8 input to floating-point models.

PiperOrigin-RevId: 188182372

6 years agoMake sure the string returned is a string in Python 3 because of different string...
Frank Chen [Wed, 7 Mar 2018 16:33:46 +0000 (08:33 -0800)]
Make sure the string returned is a string in Python 3 because of different string handling processes.

PiperOrigin-RevId: 188180206

6 years agoUpdate the code to play more nicely with Python3.
A. Unique TensorFlower [Wed, 7 Mar 2018 14:30:08 +0000 (06:30 -0800)]
Update the code to play more nicely with Python3.

PiperOrigin-RevId: 188167618

6 years ago[XLA:GPU] Fuse broadcasts into reduction fusions
Benjamin Kramer [Wed, 7 Mar 2018 14:28:00 +0000 (06:28 -0800)]
[XLA:GPU] Fuse broadcasts into reduction fusions

We didn't do this because reconstructing a layout was hard. With
layout_assignment before fusion this becomes much easier. Remove the
limitations.

PiperOrigin-RevId: 188167436

6 years ago[XLA:GPU] Move layout_assignment before fusion
Benjamin Kramer [Wed, 7 Mar 2018 12:22:40 +0000 (04:22 -0800)]
[XLA:GPU] Move layout_assignment before fusion

This will allow code simplification and opens up new optimization. Currently we
don't emit layouts inside of fusion and tracing layouts through fusion is very
hard. Changing the pipeline sidesteps this issue. This is mostly perf-neutral.

PiperOrigin-RevId: 188158481

6 years agoFix ShapeUtil::CompatibleIgnoringElementType for scalar vs tuple comparision
A. Unique TensorFlower [Wed, 7 Mar 2018 11:44:48 +0000 (03:44 -0800)]
Fix ShapeUtil::CompatibleIgnoringElementType for scalar vs tuple comparision

Previously if the lhs was a scalar and the rhs was a tuple of arbitrary
shape it reported them as compatible what is clearly wrong.

PiperOrigin-RevId: 188155575

6 years ago[XLA:GPU] Rewrite elemental emission of bitcasts
Benjamin Kramer [Wed, 7 Mar 2018 11:37:07 +0000 (03:37 -0800)]
[XLA:GPU] Rewrite elemental emission of bitcasts

My first attempt at this only handled bitcasts that implement a reshape
operation, now transposes or mixed bitcasts are handled as well. There is
probably some optimization potential to reduce the amount of address arithmetic
emitted to IR for a follow-up.

This is already tested fairly well with the existing test suite, there are
failing tests with layout_assignment before fusion without this change.

PiperOrigin-RevId: 188155082

6 years agoBuild definition cleanup.
A. Unique TensorFlower [Wed, 7 Mar 2018 07:42:36 +0000 (23:42 -0800)]
Build definition cleanup.

PiperOrigin-RevId: 188135683

6 years agoTypo correction, no method `set_stats_aggregator_op(..)` to associate `StatsAggregato...
Shivani Agrawal [Wed, 7 Mar 2018 06:53:43 +0000 (22:53 -0800)]
Typo correction, no method `set_stats_aggregator_op(..)` to associate `StatsAggregator` with `iterator`.

PiperOrigin-RevId: 188132675

6 years agoMinor fixes to tutorials/index.md and programmers_guide/index.md
Mark Daoust [Wed, 7 Mar 2018 05:46:08 +0000 (21:46 -0800)]
Minor fixes to tutorials/index.md and programmers_guide/index.md

PiperOrigin-RevId: 188128441

6 years agoMakes GLSTMCell accept input of any compatible dimension.
A. Unique TensorFlower [Wed, 7 Mar 2018 04:38:27 +0000 (20:38 -0800)]
Makes GLSTMCell accept input of any compatible dimension.

Currently, GLSTMCell requires that the input dimension is is the same as the output dimension.  After this change, the input can be any compatible dimension---i.e., anything divisible by the number of groups.  The input size is still assumed to be the output size in the case where the innermost dimension of the input is not statically-defined.

PiperOrigin-RevId: 188123536

6 years ago[TF:XLA] Bump open source llvm revision to r326687
Sanjoy Das [Wed, 7 Mar 2018 04:28:00 +0000 (20:28 -0800)]
[TF:XLA] Bump open source llvm revision to r326687

PiperOrigin-RevId: 188122825

6 years agoMade sure all the nodes in the body of an inlined function run in the same frame
Benoit Steiner [Wed, 7 Mar 2018 04:12:55 +0000 (20:12 -0800)]
Made sure all the nodes in the body of an inlined function run in the same frame

PiperOrigin-RevId: 188121852

6 years agoAdd basic support for explicit type annotations. This is done by inserting a no-op...
A. Unique TensorFlower [Wed, 7 Mar 2018 03:57:12 +0000 (19:57 -0800)]
Add basic support for explicit type annotations. This is done by inserting a no-op function call. Note that this is meant as fallback, and we prefer the following alternatives (in their order) for inferring the type:
 1. Automatic from context, e.g. the type of a list based on the elements added to it (WIP)
 2. Type annotations (Python 3.6+ only)

PiperOrigin-RevId: 188120527

6 years agoAdd helper function for Xor in HLO.
A. Unique TensorFlower [Wed, 7 Mar 2018 03:41:00 +0000 (19:41 -0800)]
Add helper function for Xor in HLO.

RELNOTES: n/a
PiperOrigin-RevId: 188119450

6 years agoAvoid merging colocation sets that include parameter/result buffers
HyoukJoong Lee [Wed, 7 Mar 2018 03:05:58 +0000 (19:05 -0800)]
Avoid merging colocation sets that include parameter/result buffers

PiperOrigin-RevId: 188117187

6 years agoPiperOrigin-RevId: 188112759
Bjarke Hammersholt Roune [Wed, 7 Mar 2018 02:13:13 +0000 (18:13 -0800)]
PiperOrigin-RevId: 188112759

6 years agoAdding support for subscripts to qualified names. This also removes the QN copy...
A. Unique TensorFlower [Wed, 7 Mar 2018 02:06:08 +0000 (18:06 -0800)]
Adding support for subscripts to qualified names.  This also removes the QN copy constructor and adds an assert to ensure that the no attribute/no subscript QN constructor does not receive any strings with '.', '[', or ']'.  Additionally this changes the self.qn construction to be a tuple of (base QN, attribute/subscript) instead of a concatenation of the base QN and attribute/subscript so that the has_attr and has_subscript fields are handled properly.  Constant subscripts are not yet supported.

PiperOrigin-RevId: 188111933

6 years agoRemove dead code. We're guaranteed to have CURLE_OK because we return early above.
Jonathan Hseu [Wed, 7 Mar 2018 01:53:08 +0000 (17:53 -0800)]
Remove dead code. We're guaranteed to have CURLE_OK because we return early above.

PiperOrigin-RevId: 188110480

6 years agoFix build.
Shashi Shekhar [Wed, 7 Mar 2018 01:39:01 +0000 (17:39 -0800)]
Fix build.

PiperOrigin-RevId: 188109002

6 years agoMake graph construction work while graph is being concurrently run.
Skye Wanderman-Milne [Wed, 7 Mar 2018 01:19:36 +0000 (17:19 -0800)]
Make graph construction work while graph is being concurrently run.

The overall approach is to use Graph._lock to synchronize Session.run calls and construction methods that rely on graph mutation. We don't want to synchronize the actual running of the graph, only the Extend call, so this change exposes an ExtendSession method to the Python API and disables extending automatically in TF_SessionRun.

PiperOrigin-RevId: 188106818

6 years agoAdd metadata for gathering information about host compute transfers while compiling...
A. Unique TensorFlower [Wed, 7 Mar 2018 00:46:54 +0000 (16:46 -0800)]
Add metadata for gathering information about host compute transfers while compiling XLA.

PiperOrigin-RevId: 188102740

6 years agoRe-enable math_utils_test msan
Allen Lavoie [Wed, 7 Mar 2018 00:44:20 +0000 (16:44 -0800)]
Re-enable math_utils_test msan

PiperOrigin-RevId: 188102388

6 years ago[XLA] Store the program shape in the HloModuleProto and HloComputationProto.
A. Unique TensorFlower [Wed, 7 Mar 2018 00:29:33 +0000 (16:29 -0800)]
[XLA] Store the program shape in the HloModuleProto and HloComputationProto.

PiperOrigin-RevId: 188100425

6 years agopython3 fix
Alexandre Passos [Wed, 7 Mar 2018 00:27:56 +0000 (16:27 -0800)]
python3 fix

PiperOrigin-RevId: 188100221

6 years agoInternal change.
Mingsheng Hong [Wed, 7 Mar 2018 00:27:35 +0000 (16:27 -0800)]
Internal change.

PiperOrigin-RevId: 188100164

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 7 Mar 2018 00:18:11 +0000 (16:18 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 188098602

6 years agoExtend tensor_list with basic support for appending to TensorArrays. This allows...
A. Unique TensorFlower [Tue, 6 Mar 2018 23:50:13 +0000 (15:50 -0800)]
Extend tensor_list with basic support for appending to TensorArrays. This allows handling list-type operations on lists that we haven't created, e.g. received as parameters.

PiperOrigin-RevId: 188094077

6 years agoRemoteCall: Cache function handles.
Brennan Saeta [Tue, 6 Mar 2018 23:44:15 +0000 (15:44 -0800)]
RemoteCall: Cache function handles.

Currently, whenever a functional_ops.remote_call(...) is executed against a remote worker, the function will be instantiated each and every time against the remote worker causing a memory leak on both the caller and the callee. Instead, we cache the function handles and reuse them.

PiperOrigin-RevId: 188093266

6 years agoRemove clipping on BoundedTensorSpec range.
A. Unique TensorFlower [Tue, 6 Mar 2018 23:20:58 +0000 (15:20 -0800)]
Remove clipping on BoundedTensorSpec range.

PiperOrigin-RevId: 188089885

6 years agoAdd Kullback-Leibler for Independent distribution(s).
A. Unique TensorFlower [Tue, 6 Mar 2018 23:07:27 +0000 (15:07 -0800)]
Add Kullback-Leibler for Independent distribution(s).

PiperOrigin-RevId: 188087902

6 years agoIntroduce API `keras.backend.learning_phase_scope(value)` (internal for now).
Francois Chollet [Tue, 6 Mar 2018 22:59:21 +0000 (14:59 -0800)]
Introduce API `keras.backend.learning_phase_scope(value)` (internal for now).
Primary goal is to avoid side effects when setting the learning phase in eager training.

PiperOrigin-RevId: 188086280

6 years agoFix bug in importing MetaGraphDefs containing nested conds.
Skye Wanderman-Milne [Tue, 6 Mar 2018 22:43:10 +0000 (14:43 -0800)]
Fix bug in importing MetaGraphDefs containing nested conds.

This change makes CondContext._external_values more consistently store
Tensors external this context. These values are then not added to the
context when it's imported. This also removes the workaround I added
earlier to manually remove the predicate and pivot Tensors from the
context, instead adding them to _external_values were they're
automatically excluded.

PiperOrigin-RevId: 188083780

6 years agoAdd link to tflite codelab
Mark Daoust [Tue, 6 Mar 2018 22:41:02 +0000 (14:41 -0800)]
Add link to tflite codelab

PiperOrigin-RevId: 188083446

6 years agotpu_estimator gives us unstable input shapes when inputs are labeled with names....
Yunxing Dai [Tue, 6 Mar 2018 22:36:36 +0000 (14:36 -0800)]
tpu_estimator gives us unstable input shapes when inputs are labeled with names. Sorting the input keys solves the issue.

PiperOrigin-RevId: 188082738

6 years agoInternal change
A. Unique TensorFlower [Tue, 6 Mar 2018 22:07:23 +0000 (14:07 -0800)]
Internal change

PiperOrigin-RevId: 188078128

6 years agoAutomated g4 rollback of changelist 185842713
Martin Wicke [Tue, 6 Mar 2018 22:03:16 +0000 (14:03 -0800)]
Automated g4 rollback of changelist 185842713

PiperOrigin-RevId: 188077387

6 years agoDocs: Fix prefix for the fancy-linker.
Billy Lamberta [Tue, 6 Mar 2018 21:51:07 +0000 (13:51 -0800)]
Docs: Fix prefix for the fancy-linker.

PiperOrigin-RevId: 188075262

6 years agoFix README formatting.
Suharsh Sivakumar [Tue, 6 Mar 2018 21:40:16 +0000 (13:40 -0800)]
Fix README formatting.

PiperOrigin-RevId: 188073454

6 years agoAdd TF_TryEvaluateConstant to the C API and have smart_cond call it.
Skye Wanderman-Milne [Tue, 6 Mar 2018 21:38:56 +0000 (13:38 -0800)]
Add TF_TryEvaluateConstant to the C API and have smart_cond call it.

This effectively plumbs EvaluateConstantTensor to smart_cond. This makes smart_cond even smarter by trying to evaluate the predicate
if it can't statically infer it.

PiperOrigin-RevId: 188073244

6 years agoIteratorContext might be dead while GetNext is being called for the ThreadPoolDataset...
Rohan Jain [Tue, 6 Mar 2018 21:12:17 +0000 (13:12 -0800)]
IteratorContext might be dead while GetNext is being called for the ThreadPoolDataset. Making sure we don't capture that.

PiperOrigin-RevId: 188069516

6 years agodisabling flaky test in msan
Olivia Nordquist [Tue, 6 Mar 2018 21:08:34 +0000 (13:08 -0800)]
disabling flaky test in msan

PiperOrigin-RevId: 188069046

6 years agodisabling timing out test on msan
Olivia Nordquist [Tue, 6 Mar 2018 21:07:53 +0000 (13:07 -0800)]
disabling timing out test on msan

PiperOrigin-RevId: 188068963

6 years agoImprovement to eager linear regression benchmark
Akshay Modi [Tue, 6 Mar 2018 21:06:53 +0000 (13:06 -0800)]
Improvement to eager linear regression benchmark

Before:
entry {
  name: "EagerLinearRegressionBenchmark.eager_train_cpu"
  iters: 2000
  wall_time: 2.45178794861
  extras {
    key: "examples_per_sec"
    value {
      double_value: 52206.7987456
    }
  }
}

After:
entry {
  name: "EagerLinearRegressionBenchmark.eager_train_cpu"
  iters: 2000
  wall_time: 1.9873790741
  extras {
    key: "examples_per_sec"
    value {
      double_value: 64406.4344182
    }
  }
}
PiperOrigin-RevId: 188068838

6 years agoCreate OSS-compatible TF Lite portable test suite rule
Austin Anderson [Tue, 6 Mar 2018 20:33:50 +0000 (12:33 -0800)]
Create OSS-compatible TF Lite portable test suite rule

Adding the new rule tflite_portable_test_suite to the bottom of a package in TF
Lite will indicate that all previous cc_test rules in the package are supposed
to be portable, unless excluded by a tag.

Outside of Google, tflite_portable_test_suite is a no-op, which may
change in the future as mobile testing infrastructure improves.

PiperOrigin-RevId: 188063712

6 years agoAdd HLO evaluator support for Gather
Sanjoy Das [Tue, 6 Mar 2018 20:15:47 +0000 (12:15 -0800)]
Add HLO evaluator support for Gather

This isn't optimal -- it copies element by element -- but I figured, at least
for bringup, it will be helpful to have the HLO evaluator follow the spec
closely.

PiperOrigin-RevId: 188061274

6 years agokeras: Fix typo
Asim Shankar [Tue, 6 Mar 2018 20:06:01 +0000 (12:06 -0800)]
keras: Fix typo

PiperOrigin-RevId: 188059457

6 years agoLayers bind to a graph when first called, not at __init__.
A. Unique TensorFlower [Tue, 6 Mar 2018 20:04:06 +0000 (12:04 -0800)]
Layers bind to a graph when first called, not at __init__.

PiperOrigin-RevId: 188059096

6 years agoMigrate MCMC diagnostics and Halton Sequence sampler into
Joshua V. Dillon [Tue, 6 Mar 2018 19:55:08 +0000 (11:55 -0800)]
Migrate MCMC diagnostics and Halton Sequence sampler into
tensorflow_probability.

PiperOrigin-RevId: 188057302

6 years agolib_ might get destroyed when there are 2 different graphs using the same FunctionBuf...
Rohan Jain [Tue, 6 Mar 2018 19:26:18 +0000 (11:26 -0800)]
lib_ might get destroyed when there are 2 different graphs using the same FunctionBufferingResource. As a result, making a clone of lib_.

Also, fixing the LookupOrCreate call in the handle op to run only once for initialization.

PiperOrigin-RevId: 188052319

6 years agoSequence versions of remaining categorical columns
A. Unique TensorFlower [Tue, 6 Mar 2018 19:23:41 +0000 (11:23 -0800)]
Sequence versions of remaining categorical columns

PiperOrigin-RevId: 188051821

6 years agoFix broken test (invalid string comparison in py3)
Christopher Suter [Tue, 6 Mar 2018 19:21:20 +0000 (11:21 -0800)]
Fix broken test (invalid string comparison in py3)

PiperOrigin-RevId: 188051422

6 years agoAdd a helper function to copy annotations between nodes.
A. Unique TensorFlower [Tue, 6 Mar 2018 19:00:46 +0000 (11:00 -0800)]
Add a helper function to copy annotations between nodes.

PiperOrigin-RevId: 188047677

6 years agoRemove accidental pdb import
A. Unique TensorFlower [Tue, 6 Mar 2018 18:52:26 +0000 (10:52 -0800)]
Remove accidental pdb import

PiperOrigin-RevId: 188046246

6 years agoAdd mask keyword to ensure that we don't pass masks in place of training.
Anjali Sridhar [Tue, 6 Mar 2018 18:35:56 +0000 (10:35 -0800)]
Add mask keyword to ensure that we don't pass masks in place of training.

PiperOrigin-RevId: 188043473

6 years agoFixed the bug that predict input_fn requires the labels.
Jianwei Xie [Tue, 6 Mar 2018 18:31:07 +0000 (10:31 -0800)]
Fixed the bug that predict input_fn requires the labels.

PiperOrigin-RevId: 188042708

6 years agoChecks that sequence_length is equal among sequence feature columns.
A. Unique TensorFlower [Tue, 6 Mar 2018 18:29:35 +0000 (10:29 -0800)]
Checks that sequence_length is equal among sequence feature columns.

PiperOrigin-RevId: 188042426

6 years agoAdd HloModuleGroupMetadata and HloModuleGroupUtil
HyoukJoong Lee [Tue, 6 Mar 2018 18:24:45 +0000 (10:24 -0800)]
Add HloModuleGroupMetadata and HloModuleGroupUtil

PiperOrigin-RevId: 188041608

6 years agoInternal change.
Alexandre Passos [Tue, 6 Mar 2018 18:20:33 +0000 (10:20 -0800)]
Internal change.

PiperOrigin-RevId: 188040866

6 years agoInclude spectral_ops_test_util in python deps.
Joshua V. Dillon [Tue, 6 Mar 2018 18:00:43 +0000 (10:00 -0800)]
Include spectral_ops_test_util in python deps.

PiperOrigin-RevId: 188037439

6 years agoImplementation of tf.cast in TfLite
A. Unique TensorFlower [Tue, 6 Mar 2018 17:54:36 +0000 (09:54 -0800)]
Implementation of tf.cast in TfLite

PiperOrigin-RevId: 188036286

6 years agoStreamExecutor support for float64 convolutions and backprop.
Brian Patton [Tue, 6 Mar 2018 16:23:04 +0000 (08:23 -0800)]
StreamExecutor support for float64 convolutions and backprop.

PiperOrigin-RevId: 188025477

6 years agoImplements MaxPoolGradGrad in tf2xla using bitwise trickery. Further detail covered...
Brian Patton [Tue, 6 Mar 2018 16:21:10 +0000 (08:21 -0800)]
Implements MaxPoolGradGrad in tf2xla using bitwise trickery. Further detail covered by a comment inside pooling_ops.cc.

Retains 32 bits of gradient precision, but can confuse the backprop source for input cells that are equally maximal at 16 bits. We could in principle be accurate up to 31 bits of input, if we were willing to find gradients one bit at a time, or 24 bits of input 8 gradient bits at a time, etc.

PiperOrigin-RevId: 188025278

6 years ago[XLA:GPU] Mark bitcasts as eligible for fusion.
Benjamin Kramer [Tue, 6 Mar 2018 11:31:45 +0000 (03:31 -0800)]
[XLA:GPU] Mark bitcasts as eligible for fusion.

Currently this never happens because we only turn rehaspes into bitcasts after
layout assignment. This changes when layout assignment runs before fusion. Once
layouts are available the pipeline turns reshapes into bitcasts, which would be
left unfused without this change.

PiperOrigin-RevId: 187999864

6 years agoAdd BatchNorm bijector.
A. Unique TensorFlower [Tue, 6 Mar 2018 06:51:17 +0000 (22:51 -0800)]
Add BatchNorm bijector.

PiperOrigin-RevId: 187975255

6 years agoLower logging levels of acceptable conditions
Brennan Saeta [Tue, 6 Mar 2018 03:15:15 +0000 (19:15 -0800)]
Lower logging levels of acceptable conditions

When using remote function invocation, these two conditions are okay, and are not cause for alarm. This change reduces them to VLOG's so they do not pollute the logs unnecessarily.

PiperOrigin-RevId: 187961803