platform/upstream/tensorflow.git
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

6 years ago[TPU Cluster Resolver]: Integrate with GKE
Brennan Saeta [Tue, 6 Mar 2018 03:15:13 +0000 (19:15 -0800)]
[TPU Cluster Resolver]: Integrate with GKE

This change integrates the TPUClusterResolver with GKE's support for Cloud TPUs

PiperOrigin-RevId: 187961802

6 years ago[tf.data] Fix uninitialized local variable in ParallelMapDataset.
Derek Murray [Tue, 6 Mar 2018 02:54:33 +0000 (18:54 -0800)]
[tf.data] Fix uninitialized local variable in ParallelMapDataset.

PiperOrigin-RevId: 187960354

6 years agoFixes a number of usability issues with model_to_estimator, in particular:
Francois Chollet [Tue, 6 Mar 2018 02:49:53 +0000 (18:49 -0800)]
Fixes a number of usability issues with model_to_estimator, in particular:
- make it possible to use a model that was compiled with a TF optimizer (do not require a Keras optimizer)
- do not require input to be dict (input_fn supports plain arrays)
- do not require `config` to be a RunConfig instance, can now be a dict (better UX)
- make it possible to use a subclassed model (caveat: weights are not preserved, yet)
- clear error message when model isn't compiled; improve various error messages

PiperOrigin-RevId: 187959927

6 years agoProperly recurse when checkpointing scopes.
A. Unique TensorFlower [Tue, 6 Mar 2018 02:36:46 +0000 (18:36 -0800)]
Properly recurse when checkpointing scopes.

PiperOrigin-RevId: 187958420

6 years agoAdd method for computing the maximal set of live LogicalBuffers in an allocation.
Mark Heffernan [Tue, 6 Mar 2018 02:07:12 +0000 (18:07 -0800)]
Add method for computing the maximal set of live LogicalBuffers in an allocation.

PiperOrigin-RevId: 187954755

6 years agodisabling flaky test in msan
Olivia Nordquist [Tue, 6 Mar 2018 01:37:29 +0000 (17:37 -0800)]
disabling flaky test in msan

PiperOrigin-RevId: 187951549

6 years agogradients: Export tf.custom_gradients
Asim Shankar [Tue, 6 Mar 2018 01:28:12 +0000 (17:28 -0800)]
gradients: Export tf.custom_gradients

(Moved from the tf.contrib.eager namespace)

PiperOrigin-RevId: 187950503

6 years agoImprove the accuracy of the upper-bound of the sum of the size of an
A. Unique TensorFlower [Tue, 6 Mar 2018 01:07:39 +0000 (17:07 -0800)]
Improve the accuracy of the upper-bound of the sum of the size of an
HLO and all its dependencies. The previous implementation computed the
size of an HLO as the sum of dependencies weighted by the number of
paths to the each dependency. In the previous implementation the
"size" of some HLO overflowed an int64 for dependence graphs with a
large number of distinct paths. The new implementation computes the
min of the previous overestimate and the sum of all HLO's
before-and-including the current HLO in a topological sort of the
graph.

Both the current and the previous implementations are linear
time. Since the sum of the size of all HLOs will never overflow, the
"total size" of each HLO will never overflow. The new upper-bound is
the min of the previous upper bound and a new heuristic, so it is
always at least as tight a bound as the old implementation.

RELNOTES: n/a
PiperOrigin-RevId: 187948221

6 years agodisabling msan flaky test
Olivia Nordquist [Tue, 6 Mar 2018 00:24:49 +0000 (16:24 -0800)]
disabling msan flaky test

PiperOrigin-RevId: 187942643

6 years agoRemove core:lib dependency in favor of Lite-specific logging helper
Austin Anderson [Tue, 6 Mar 2018 00:12:01 +0000 (16:12 -0800)]
Remove core:lib dependency in favor of Lite-specific logging helper

This CL makes an enormous swathe of TF Lite's tests buildable on Android
targets (and helps for many iOS tests, as well).

The only reason the tests dependended on tensorflow/core:lib was because lib was
the most common target that includes logging.h, which is necessary for
log-related tests.

This set of utilities may not be perfect (e.g. it still means that certain
TF-related test resources, like FLAGs, are not accessible), but it is an
improvement.

PiperOrigin-RevId: 187940806

6 years agoTests for running _Send and _Recv in eager.
Alexandre Passos [Tue, 6 Mar 2018 00:09:47 +0000 (16:09 -0800)]
Tests for running _Send and _Recv in eager.

PiperOrigin-RevId: 187940522

6 years agoRemove unnecessary density functions.
A. Unique TensorFlower [Mon, 5 Mar 2018 23:53:43 +0000 (15:53 -0800)]
Remove unnecessary density functions.

distributions.py appropriately calls `log` or `exp` to compute missing cdf/prob functions.

PiperOrigin-RevId: 187938200

6 years agodisabling timed out test in asan
Olivia Nordquist [Mon, 5 Mar 2018 23:34:26 +0000 (15:34 -0800)]
disabling timed out test in asan

PiperOrigin-RevId: 187935309

6 years agoUpdate TensorBoard's tutorial on tensorflow.org with information on setting up as...
Chi Zeng [Mon, 5 Mar 2018 23:22:07 +0000 (15:22 -0800)]
Update TensorBoard's tutorial on tensorflow.org with information on setting up as well as how long the tutorial should take.

PiperOrigin-RevId: 187933027

6 years agoAdd objective functions for variational inference with Csiszar f-divergences.
A. Unique TensorFlower [Mon, 5 Mar 2018 23:17:24 +0000 (15:17 -0800)]
Add objective functions for variational inference with Csiszar f-divergences.

PiperOrigin-RevId: 187931921

6 years agoFix bug with multi_gpu_model / model.inputs.
Francois Chollet [Mon, 5 Mar 2018 23:17:06 +0000 (15:17 -0800)]
Fix bug with multi_gpu_model / model.inputs.

PiperOrigin-RevId: 187931852

6 years agoCorrect op::Attr usage in C++ gradient implementations.
A. Unique TensorFlower [Mon, 5 Mar 2018 22:45:28 +0000 (14:45 -0800)]
Correct op::Attr usage in C++ gradient implementations.

Also enabled TF_MUST_USE_RESULT for the generated Attr API, so we
can catch any new errors early.

Fixes #17360

PiperOrigin-RevId: 187925761

6 years agoAdds test_util.IsMklEnabled() that returns true if TensorFlow has been built with...
Tatiana Shpeisman [Mon, 5 Mar 2018 22:40:46 +0000 (14:40 -0800)]
Adds test_util.IsMklEnabled() that returns true if TensorFlow has been built with MKL support. Fixes the failure of tensorflow/python/tools:print_selective_registration_header_test by using 'Mkl' prefix for MatMul op name when MKL is enabled.

PiperOrigin-RevId: 187925038

6 years ago[XLA] Make HloEvaluator use wrap-around semantics for DynamicUpdateSlice.
Michael Kuperstein [Mon, 5 Mar 2018 22:33:22 +0000 (14:33 -0800)]
[XLA] Make HloEvaluator use wrap-around semantics for DynamicUpdateSlice.

PiperOrigin-RevId: 187923671

6 years agoAdd alternative paths for CUDA installation.
A. Unique TensorFlower [Mon, 5 Mar 2018 22:31:59 +0000 (14:31 -0800)]
Add alternative paths for CUDA installation.

This detects negativo17's CUDA packages for Fedora.

PiperOrigin-RevId: 187923472

6 years agoAdd sequence_indicator_column
A. Unique TensorFlower [Mon, 5 Mar 2018 22:14:01 +0000 (14:14 -0800)]
Add sequence_indicator_column

PiperOrigin-RevId: 187920673

6 years agoDisable both "no_mac" and "nomac" tags when building on osx.
Gunhan Gulsoy [Mon, 5 Mar 2018 22:08:37 +0000 (14:08 -0800)]
Disable both "no_mac" and "nomac" tags when building on osx.

PiperOrigin-RevId: 187919812

6 years agoFix the issue where gpu_option is not respected for keras estimator.
Yifei Feng [Mon, 5 Mar 2018 21:47:30 +0000 (13:47 -0800)]
Fix the issue where gpu_option is not respected for keras estimator.
Set keras backend session with the given config before any get_session call creates a new session.
Fix #14776.

PiperOrigin-RevId: 187916300

6 years agoAdd methods for extracting the shapes of the entry computation from an HloProto.
Mark Heffernan [Mon, 5 Mar 2018 21:44:42 +0000 (13:44 -0800)]
Add methods for extracting the shapes of the entry computation from an HloProto.

PiperOrigin-RevId: 187915821

6 years agoBenchmark regression
Alexandre Passos [Mon, 5 Mar 2018 21:36:30 +0000 (13:36 -0800)]
Benchmark regression

PiperOrigin-RevId: 187914657

6 years ago[XLA] Fix BF16 normalizer for CrossReplicaSum.
Yuanzhong Xu [Mon, 5 Mar 2018 20:54:27 +0000 (12:54 -0800)]
[XLA] Fix BF16 normalizer for CrossReplicaSum.

1. It may produce incorrect result when mixed precision is not supported and
BF16 is not support only for a particular operand. Then the pass may introduce
new mixed precision for an all-BF16 CRS. This is unlikely in practical
settings, but removing this constraint can enable auto-generating corner case
tests using this pass.

2. A cycle can be introduced in the tuple-shaped output output. This wasn't
caught by the test because the DFS happened to succeed. Now add verifier
explicitly.

PiperOrigin-RevId: 187908099

6 years agoSimplify softmax_centered implementation.
A. Unique TensorFlower [Mon, 5 Mar 2018 20:46:30 +0000 (12:46 -0800)]
Simplify softmax_centered implementation.

This also resolves a bug with softmax_centered.inverse not working on inputs with
partially known.

PiperOrigin-RevId: 187907026

6 years agoMake variable creator scope thread local (always).
Priya Gupta [Mon, 5 Mar 2018 20:28:07 +0000 (12:28 -0800)]
Make variable creator scope thread local (always).

PiperOrigin-RevId: 187904394

6 years ago[XLA] Mark xla_internal_test_main as alwayslink.
Justin Lebar [Mon, 5 Mar 2018 20:22:35 +0000 (12:22 -0800)]
[XLA] Mark xla_internal_test_main as alwayslink.

PiperOrigin-RevId: 187903623

6 years agoReturn ComputationLayout as a reference from the HLO module.
Mark Heffernan [Mon, 5 Mar 2018 20:01:37 +0000 (12:01 -0800)]
Return ComputationLayout as a reference from the HLO module.

PiperOrigin-RevId: 187900559

6 years ago[XLA] Whitelist send/recv in BF16 passes.
Yuanzhong Xu [Mon, 5 Mar 2018 19:57:04 +0000 (11:57 -0800)]
[XLA] Whitelist send/recv in BF16 passes.

PiperOrigin-RevId: 187899955

6 years agoShape function bug in tensor_list_stack
Alexandre Passos [Mon, 5 Mar 2018 19:33:20 +0000 (11:33 -0800)]
Shape function bug in tensor_list_stack

PiperOrigin-RevId: 187896505

6 years agoDon't log an error if we can't set HTTP/2.
Jonathan Hseu [Mon, 5 Mar 2018 19:28:17 +0000 (11:28 -0800)]
Don't log an error if we can't set HTTP/2.

PiperOrigin-RevId: 187895652

6 years agoExtract the EvaluateConstantTensorForEdge method from ShapeRefiner.
Skye Wanderman-Milne [Mon, 5 Mar 2018 19:23:29 +0000 (11:23 -0800)]
Extract the EvaluateConstantTensorForEdge method from ShapeRefiner.

This change introduces a new stand-alone function, EvaluateConstantTensor,
pulled from ShapeRefiner. ShapeRefiner now calls this new function and the
old functions are removed.

I'm still depending on shape_refiner_test.cc for test coverage.

This is the first step towards making smart_cond better able to evaluate
constant tensors.

PiperOrigin-RevId: 187894976

6 years ago[XLA] Allocate and track memory in replicas separately.
A. Unique TensorFlower [Mon, 5 Mar 2018 19:20:28 +0000 (11:20 -0800)]
[XLA] Allocate and track memory in replicas separately.

PiperOrigin-RevId: 187894473

6 years ago[XLA:GPU] Allow merging into input fusion nodes in FusionMerger.
Justin Lebar [Mon, 5 Mar 2018 19:10:42 +0000 (11:10 -0800)]
[XLA:GPU] Allow merging into input fusion nodes in FusionMerger.

Seems to have been an oversight.  "Input fusion" means that the *output*
of the fusion node is the "real hero".  The inputs aren't special; we
can fuse more stuff in.

PiperOrigin-RevId: 187892975

6 years agoFix documentation of image size for inception-v3 (299 * 299)
A. Unique TensorFlower [Mon, 5 Mar 2018 18:47:24 +0000 (10:47 -0800)]
Fix documentation of image size for inception-v3 (299 * 299)

PiperOrigin-RevId: 187889122

6 years agoMake SavedModel builder validation accept signatures involving sparse tensors.
David Soergel [Mon, 5 Mar 2018 18:11:20 +0000 (10:11 -0800)]
Make SavedModel builder validation accept signatures involving sparse tensors.

PiperOrigin-RevId: 187883080

6 years agoExposes poisson_regression_head in tf.contrib.estimator.
A. Unique TensorFlower [Mon, 5 Mar 2018 18:07:27 +0000 (10:07 -0800)]
Exposes poisson_regression_head in tf.contrib.estimator.

PiperOrigin-RevId: 187882494

6 years ago[XLA:GPU] Add some VLOGs to FusionMerger.
Justin Lebar [Mon, 5 Mar 2018 17:51:38 +0000 (09:51 -0800)]
[XLA:GPU] Add some VLOGs to FusionMerger.

Also use c_any_of and friends instead of std::any_of &c, and make some
minor whitespace fixes in comments.

No functional change.

PiperOrigin-RevId: 187880113

6 years agoChange the default ps_ops to STANDARD_PS_OPS
Jianwei Xie [Mon, 5 Mar 2018 17:18:24 +0000 (09:18 -0800)]
Change the default ps_ops to STANDARD_PS_OPS

PiperOrigin-RevId: 187875797

6 years agoFix a case in SparseSegmentReduction ops with missing segment IDs, where all segment...
A. Unique TensorFlower [Mon, 5 Mar 2018 17:01:22 +0000 (09:01 -0800)]
Fix a case in SparseSegmentReduction ops with missing segment IDs, where all segment IDs are empty. Added a test for this case.

PiperOrigin-RevId: 187873356

6 years agoInternal change.
A. Unique TensorFlower [Mon, 5 Mar 2018 15:43:58 +0000 (07:43 -0800)]
Internal change.

PiperOrigin-RevId: 187865303

6 years agoImprove LinearValidOnShape.
A. Unique TensorFlower [Mon, 5 Mar 2018 14:51:33 +0000 (06:51 -0800)]
Improve LinearValidOnShape.

It actually only needs to check that the operation is a bitcast (ignoring
element_type). So far, the check was more restrictive, which made this function
always return false for a non-trivial reshape operation.
However we still fail to make use of this less strict checking, because for
reshapes inside a fusion node, we don't have a layout and can therefore not
check if it is a bitcast or not.
Also add a disabled test that will be enabled once the layout issue is fixed.

PiperOrigin-RevId: 187860440

6 years agoAutomated g4 rollback of changelist 185073515
A. Unique TensorFlower [Mon, 5 Mar 2018 13:18:24 +0000 (05:18 -0800)]
Automated g4 rollback of changelist 185073515

PiperOrigin-RevId: 187852929

6 years ago[XLA] Minor comment fixes in instruction_fusion.cc.
Justin Lebar [Mon, 5 Mar 2018 13:10:40 +0000 (05:10 -0800)]
[XLA] Minor comment fixes in instruction_fusion.cc.

No functional change.

PiperOrigin-RevId: 187852483

6 years agoAdds checks to tf.nn.sparse_softmax_cross_entropy_with_logits to make sure that shape...
A. Unique TensorFlower [Mon, 5 Mar 2018 10:45:58 +0000 (02:45 -0800)]
Adds checks to tf.nn.sparse_softmax_cross_entropy_with_logits to make sure that shapes for labels and logits (except last dimension) match. First, the static dimensions are checked, and only if the result is inconclusive a dynamic check is added.

In sparse_softmax_cross_entropy_with_logits the input dimensions are flattened, which can lead to unexpected bugs if the order of dimensions does not match (e.g. if one is time-major and the other is batch-major). This prevents such mistakes.

PiperOrigin-RevId: 187841750

6 years agoPrevent accidental re-use of removed field.
Patrick Nguyen [Sun, 4 Mar 2018 21:47:57 +0000 (13:47 -0800)]
Prevent accidental re-use of removed field.

PiperOrigin-RevId: 187798953

6 years agoFix nested bullets in docs. (Need 4 spaces indent)
Priya Gupta [Sun, 4 Mar 2018 06:12:24 +0000 (22:12 -0800)]
Fix nested bullets in docs. (Need 4 spaces indent)

PiperOrigin-RevId: 187763978

6 years agoFix broken links in docs.
Priya Gupta [Sun, 4 Mar 2018 02:31:07 +0000 (18:31 -0800)]
Fix broken links in docs.

PiperOrigin-RevId: 187755567

6 years agoInternal change.
A. Unique TensorFlower [Sat, 3 Mar 2018 23:49:05 +0000 (15:49 -0800)]
Internal change.

PiperOrigin-RevId: 187749767

6 years agoWill open source this part of code.
A. Unique TensorFlower [Sat, 3 Mar 2018 22:26:21 +0000 (14:26 -0800)]
Will open source this part of code.

PiperOrigin-RevId: 187747019

6 years agoInternal Change.
Michael Case [Sat, 3 Mar 2018 18:04:35 +0000 (10:04 -0800)]
Internal Change.

PiperOrigin-RevId: 187738384