platform/upstream/tensorflow.git
6 years agoAdd a function that allows to dynamically verify whether a function is white listed...
A. Unique TensorFlower [Mon, 26 Feb 2018 22:25:37 +0000 (14:25 -0800)]
Add a function that allows to dynamically verify whether a function is white listed for graph mode.

PiperOrigin-RevId: 187080654

6 years ago1st version of sequential feature columns.
A. Unique TensorFlower [Mon, 26 Feb 2018 22:25:30 +0000 (14:25 -0800)]
1st version of sequential feature columns.

PiperOrigin-RevId: 187080635

6 years ago[XLA] GTE of a certain element of the tuple does not need not keep other elements...
Michael Kuperstein [Mon, 26 Feb 2018 22:19:56 +0000 (14:19 -0800)]
[XLA] GTE of a certain element of the tuple does not need not keep other elements alive.

This achieves two things:
1. Heap simulation runtime is no longer quadratic in the number of tuple elements (as we don't add each GetTupleElement to the liveset of each buffer defined by the tuple).
2. A reduction in the heap memory footprint.

PiperOrigin-RevId: 187079787

6 years agoAdding documentation for dataset/iterator checkpointing.
Shivani Agrawal [Mon, 26 Feb 2018 22:11:08 +0000 (14:11 -0800)]
Adding documentation for dataset/iterator checkpointing.

PiperOrigin-RevId: 187078347

6 years agoTFTS: Switch to using core feature columns
Allen Lavoie [Mon, 26 Feb 2018 22:00:07 +0000 (14:00 -0800)]
TFTS: Switch to using core feature columns

This fixes some shape issues that came up when using the tf.contrib.layers
parsing functions.

Adds a string -> embedding column API example to the LSTM example.

PiperOrigin-RevId: 187076400

6 years agoUpdate eager uniform replay buffer microbenchmarks to compare against graph functions...
Akshay Agrawal [Mon, 26 Feb 2018 21:54:02 +0000 (13:54 -0800)]
Update eager uniform replay buffer microbenchmarks to compare against graph functions when possible.

PiperOrigin-RevId: 187075418

6 years agoInclude c_api_experimental in libtensorflow.so's dependencies.
Richard Wei [Mon, 26 Feb 2018 21:06:59 +0000 (13:06 -0800)]
Include c_api_experimental in libtensorflow.so's dependencies.

PiperOrigin-RevId: 187068103

6 years agoMaintain a cache of output dtypes of ops in TFE_Context.
A. Unique TensorFlower [Mon, 26 Feb 2018 20:33:17 +0000 (12:33 -0800)]
Maintain a cache of output dtypes of ops in TFE_Context.

PiperOrigin-RevId: 187062992

6 years agoInternal change.
Jeremy Lau [Mon, 26 Feb 2018 20:23:36 +0000 (12:23 -0800)]
Internal change.

PiperOrigin-RevId: 187061863

6 years agoFix bug calling gradients_function inside custom_gradient
Alexandre Passos [Mon, 26 Feb 2018 20:10:01 +0000 (12:10 -0800)]
Fix bug calling gradients_function inside custom_gradient

PiperOrigin-RevId: 187059871

6 years agoUse optimized ops to handle GPU memory swapping: this avoids the need for 2
Benoit Steiner [Mon, 26 Feb 2018 19:57:30 +0000 (11:57 -0800)]
Use optimized ops to handle GPU memory swapping: this avoids the need for 2
pairs of extra _send/_recv nodes which speeds things up a bit. This also
ensures that performance doesn't depend on the recv scheduling built in TF,
which isn't always optimal.

PiperOrigin-RevId: 187057831

6 years agoInternal change.
Anna R [Mon, 26 Feb 2018 19:52:26 +0000 (11:52 -0800)]
Internal change.

PiperOrigin-RevId: 187056963

6 years agoAdd the internal module name prefix to the white list.
A. Unique TensorFlower [Mon, 26 Feb 2018 19:50:49 +0000 (11:50 -0800)]
Add the internal module name prefix to the white list.

PiperOrigin-RevId: 187056701

6 years agoActually expose smart_cond and smart_constant_value in tf.contrib.framework
Skye Wanderman-Milne [Mon, 26 Feb 2018 19:43:14 +0000 (11:43 -0800)]
Actually expose smart_cond and smart_constant_value in tf.contrib.framework

Also moves these methods into their own file in python/framework. This avoids further bloating control_flow_ops.py and makes the BUILD deps easier for a future change I'm working on.

PiperOrigin-RevId: 187055501

6 years agoTFLite: Ensures pointers to tensors won't be invalidated unless 16+ tensors are added.
Yu-Cheng Ling [Mon, 26 Feb 2018 19:22:43 +0000 (11:22 -0800)]
TFLite: Ensures pointers to tensors won't be invalidated unless 16+ tensors are added.
PiperOrigin-RevId: 187052100

6 years agoAdded const to Node* in various parts of the code base.
Mingsheng Hong [Mon, 26 Feb 2018 19:13:09 +0000 (11:13 -0800)]
Added const to Node* in various parts of the code base.

PiperOrigin-RevId: 187050526

6 years agoAdd support for parsing the "gather" HLO
Sanjoy Das [Mon, 26 Feb 2018 19:12:04 +0000 (11:12 -0800)]
Add support for parsing the "gather" HLO

PiperOrigin-RevId: 187050345

6 years agoeager/examples/resnet50: Fix breakage.
Asim Shankar [Mon, 26 Feb 2018 19:10:20 +0000 (11:10 -0800)]
eager/examples/resnet50: Fix breakage.

PiperOrigin-RevId: 187050075

6 years agoBring in `isbuiltin`.
A. Unique TensorFlower [Mon, 26 Feb 2018 19:08:54 +0000 (11:08 -0800)]
Bring in `isbuiltin`.

PiperOrigin-RevId: 187049824

6 years agoAutomated g4 rollback of changelist 185324160
Guangda Lai [Mon, 26 Feb 2018 18:59:54 +0000 (10:59 -0800)]
Automated g4 rollback of changelist 185324160

PiperOrigin-RevId: 187048135

6 years agoIntegrate ClusterResolvers with TPUEstimator.
Brennan Saeta [Mon, 26 Feb 2018 18:54:31 +0000 (10:54 -0800)]
Integrate ClusterResolvers with TPUEstimator.

PiperOrigin-RevId: 187047094

6 years ago[XLA] Do not recompute flattened sets inside layout assignment.
Michael Kuperstein [Mon, 26 Feb 2018 18:52:05 +0000 (10:52 -0800)]
[XLA] Do not recompute flattened sets inside layout assignment.

Cache the flattened sets instead of recomputing them. This matters for large graphs, since we may request the flattened set thousands of times on the same instruction, and it may be fairly expensive to construct for large tuples.

PiperOrigin-RevId: 187046642

6 years ago[XLA] Add kConvert to EffectiveOperandPrecisionIsOutputPrecision list.
Yuanzhong Xu [Mon, 26 Feb 2018 18:42:59 +0000 (10:42 -0800)]
[XLA] Add kConvert to EffectiveOperandPrecisionIsOutputPrecision list.

PiperOrigin-RevId: 187044921

6 years agoDeleting references to outdated `translate/seq2seq` tutorial.
Mark Daoust [Mon, 26 Feb 2018 18:41:44 +0000 (10:41 -0800)]
Deleting references to outdated `translate/seq2seq` tutorial.

PiperOrigin-RevId: 187044697

6 years agoMove accumulate_n_v2 to core.
Alexandre Passos [Mon, 26 Feb 2018 18:24:56 +0000 (10:24 -0800)]
Move accumulate_n_v2 to core.

PiperOrigin-RevId: 187042001

6 years agoArithemtic optimization: Rewite Sub(0, y) => Neg(y)
A. Unique TensorFlower [Mon, 26 Feb 2018 18:24:08 +0000 (10:24 -0800)]
Arithemtic optimization: Rewite Sub(0, y) => Neg(y)

PiperOrigin-RevId: 187041872

6 years agoGeneralize the gather_indices dimension that stores indices
Sanjoy Das [Mon, 26 Feb 2018 18:17:15 +0000 (10:17 -0800)]
Generalize the gather_indices dimension that stores indices

This is now exposed as a index_vector_dim dimension number.

Also fixed an off-by-one error in ValidateGatherDimensionNumbers in the
expression computing output_shape_rank.

PiperOrigin-RevId: 187040748

6 years agoFix some breakages in TensorFlow Windows build (#17271)
Yun Peng [Tue, 27 Feb 2018 06:36:01 +0000 (07:36 +0100)]
Fix some breakages in TensorFlow Windows build (#17271)

* Fix configure.py

* Add quantization_utils for building quantize_weights, quantize_nodes, round_weights

Caused by https://github.com/tensorflow/tensorflow/pull/16121

6 years agoUpgrade Jenkins/Docker build scripts to Bazel 0.11.0. (#17280)
Nick Kreeger [Tue, 27 Feb 2018 05:11:36 +0000 (21:11 -0800)]
Upgrade Jenkins/Docker build scripts to Bazel 0.11.0. (#17280)

The 0.10.0 bazel has problems with static-linking on linux:
https://github.com/bazelbuild/bazel/issues/4474. This PR bumps to the
latest bazel that produces proper binaries w/o the linking issue.

6 years agoFix bad wrong jpeg/nasm mirror (#17277)
Martin Wicke [Tue, 27 Feb 2018 02:32:36 +0000 (18:32 -0800)]
Fix bad wrong jpeg/nasm mirror (#17277)

6 years agoAdd missing `override' (#17098)
Daniel Trebbien [Mon, 26 Feb 2018 21:42:07 +0000 (13:42 -0800)]
Add missing `override' (#17098)

This fixes a warning produced by clang:
./tensorflow/core/common_runtime/gpu/gpu_device.h:70:10: warning: 'FillContextMap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
  Status FillContextMap(const Graph* graph,
         ^
./tensorflow/core/common_runtime/device.h:124:18: note: overridden virtual function is here
  virtual Status FillContextMap(const Graph* graph,

6 years agoMerge pull request #17222 from kbsriram/pool-gradients
Appledore [Mon, 26 Feb 2018 19:31:28 +0000 (11:31 -0800)]
Merge pull request #17222 from kbsriram/pool-gradients

C++ gradients for MaxPool3D, AvgPool and AvgPool3D

6 years agoMerge pull request #17279 from gunan/branch_187038889
Gunhan Gulsoy [Mon, 26 Feb 2018 19:16:30 +0000 (11:16 -0800)]
Merge pull request #17279 from gunan/branch_187038889

Branch 187038889

6 years agoMerge commit for internal changes
Gunhan Gulsoy [Mon, 26 Feb 2018 18:20:02 +0000 (10:20 -0800)]
Merge commit for internal changes

6 years agoFix pip install examples to match text: Use pip and point to Py2 packages
A. Unique TensorFlower [Mon, 26 Feb 2018 18:07:09 +0000 (10:07 -0800)]
Fix pip install examples to match text: Use pip and point to Py2 packages

PiperOrigin-RevId: 187038889

6 years agoFix print format error.
Rui Zhao [Mon, 26 Feb 2018 17:32:47 +0000 (09:32 -0800)]
Fix print format error.

PiperOrigin-RevId: 187033623

6 years ago[XLA:GPU] Fix HLO profiling when multiple streams are involved.
Justin Lebar [Mon, 26 Feb 2018 17:24:38 +0000 (09:24 -0800)]
[XLA:GPU] Fix HLO profiling when multiple streams are involved.

We were enqueueing the timer on the main stream, but not blocking the
substreams, so the results were nonsensical.

PiperOrigin-RevId: 187032412

6 years agoAdd __str__ method to _RefVariableProcessor.
A. Unique TensorFlower [Mon, 26 Feb 2018 16:58:48 +0000 (08:58 -0800)]
Add __str__ method to _RefVariableProcessor.

PiperOrigin-RevId: 187029027

6 years agoDrop the getcallargs extension as its logic had to be moved to a higher level into...
A. Unique TensorFlower [Mon, 26 Feb 2018 16:04:09 +0000 (08:04 -0800)]
Drop the getcallargs extension as its logic had to be moved to a higher level into api.py.

PiperOrigin-RevId: 187022717

6 years agoAnnotate attribute nodes with the value or type of their parent. This helps with...
A. Unique TensorFlower [Mon, 26 Feb 2018 15:21:08 +0000 (07:21 -0800)]
Annotate attribute nodes with the value or type of their parent. This helps with resolving function owners, since using reflection to do it is unreliable.

PiperOrigin-RevId: 187017742

6 years agoFix typo (#17258)
ManHyuk [Sun, 25 Feb 2018 16:09:28 +0000 (01:09 +0900)]
Fix typo (#17258)

* fix typo

6 years ago[XLA] Remove bitcast-converts between same shape.
Jacques Pienaar [Sun, 25 Feb 2018 10:55:29 +0000 (02:55 -0800)]
[XLA] Remove bitcast-converts between same shape.

PiperOrigin-RevId: 186929931

6 years agoRe-enables moving_average_optimizer_test. Resource variable bug fixed by apassos@
A. Unique TensorFlower [Sun, 25 Feb 2018 07:51:54 +0000 (23:51 -0800)]
Re-enables moving_average_optimizer_test. Resource variable bug fixed by apassos@

PiperOrigin-RevId: 186921623

6 years agoupdate documentation to {0, 1} (#17245)
Ming Li [Sun, 25 Feb 2018 06:41:12 +0000 (14:41 +0800)]
update documentation to {0, 1} (#17245)

6 years agoShip TF Eager header with libtensorflow tarballs. (#17230)
Nick Kreeger [Sat, 24 Feb 2018 19:19:21 +0000 (11:19 -0800)]
Ship TF Eager header with libtensorflow tarballs. (#17230)

* Ship TF Eager header with libtensorflow tarballs.

6 years agoUse the new inspect_utils API to to get the function's namespace.
A. Unique TensorFlower [Sat, 24 Feb 2018 14:35:12 +0000 (06:35 -0800)]
Use the new inspect_utils API to to get the function's namespace.

PiperOrigin-RevId: 186884307

6 years agoMerge pull request #16503 from yongtang/16499-unique_with_counts-v2
Andrew M Dai [Sat, 24 Feb 2018 10:08:49 +0000 (02:08 -0800)]
Merge pull request #16503 from yongtang/16499-unique_with_counts-v2

Enable multi-dimensional and axis support for tf.unique_with_counts

6 years agoMerge pull request #17234 from tensorflow/martinwicke-patch-2
Amit Patankar [Sat, 24 Feb 2018 03:40:26 +0000 (19:40 -0800)]
Merge pull request #17234 from tensorflow/martinwicke-patch-2

Add nasm mirror

6 years agoUpdate api_def for UniqueWithCounts/UniqueWithCountsV2
Yong Tang [Sat, 24 Feb 2018 02:44:13 +0000 (02:44 +0000)]
Update api_def for UniqueWithCounts/UniqueWithCountsV2

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test cases for unique_with_counts_v2
Yong Tang [Sat, 27 Jan 2018 19:58:54 +0000 (19:58 +0000)]
Add test cases for unique_with_counts_v2

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd python wrapper for unique_with_counts
Yong Tang [Sat, 27 Jan 2018 19:57:38 +0000 (19:57 +0000)]
Add python wrapper for unique_with_counts

to call gen_array_ops._unique_with_counts

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoHide UniqueWithCounts and UniqueWithCountsV2 in hidden_ops.txt
Yong Tang [Sat, 27 Jan 2018 19:56:33 +0000 (19:56 +0000)]
Hide UniqueWithCounts and UniqueWithCountsV2 in hidden_ops.txt

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoEnable multi-dimensional and axis support for tf.unique_with_counts
Yong Tang [Sat, 27 Jan 2018 19:48:35 +0000 (19:48 +0000)]
Enable multi-dimensional and axis support for tf.unique_with_counts

This fix tries to address the issue raised in 16499 to bring
multi-dimensional and axis support for `unique_with_counts`.

When `UniqueV2` kernel was added in 12952, it actually supports
multi-dimensional and axis support for `unique_with_counts` as well,
just not registered.

This fix:
1. Register `UniqueWithCountsV2` kernel to have axis support.
2. Hide both `UniqueWithCounts` and `UniqueWithCountsV2`
3. Add python unique_with_counts wrapper to call `gen_array_ops._unique_with_counts`
4. If APi review passes and the PR merges, `unique_with_counts` will switch to `gen_array_ops._unique_with_counts_v2` (in 3 weeks).

This fix fixes 16499.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoExclude more tests for cuda_on_cpu.
Guangda Lai [Sat, 24 Feb 2018 02:18:15 +0000 (18:18 -0800)]
Exclude more tests for cuda_on_cpu.

PiperOrigin-RevId: 186851831

6 years agoRefactor Keras engine by splitting it into short, specialized files.
Francois Chollet [Sat, 24 Feb 2018 01:32:14 +0000 (17:32 -0800)]
Refactor Keras engine by splitting it into short, specialized files.
The purpose of this change is to make the codebase more maintainable and readable.

Before:
engine/topology.py
models.py

After:
engine/base_layer.py
engine/input_layer.py
engine/network.py
engine/sequential.py
engine/saving.py

This is a large change but it only moves code around with no change in logic or API.

New files are all under 1000 lines of logic (network.py is 1500 lines, but under 1000 if you remove imports and docstrings), and often under 500.

PiperOrigin-RevId: 186847895

6 years agoAdd another utility that captures a function's namespace as a mapping from symbol...
A. Unique TensorFlower [Sat, 24 Feb 2018 01:22:37 +0000 (17:22 -0800)]
Add another utility that captures a function's namespace as a mapping from symbol names to actual values.
Update getmethodclass with a hopefully more robust method.

PiperOrigin-RevId: 186847003

6 years agoDropped from previous change.
Alexandre Passos [Sat, 24 Feb 2018 01:19:00 +0000 (17:19 -0800)]
Dropped from previous change.

PiperOrigin-RevId: 186846681

6 years agoCheckpointable: compatibility mode with name-based saving
Allen Lavoie [Sat, 24 Feb 2018 00:59:01 +0000 (16:59 -0800)]
Checkpointable: compatibility mode with name-based saving

Allows loading a name-based checkpoint using the object-based API. When
graph building it's quite seamless. There's no restore-on-create for
eager, so it would require program changes to do much useful there (i.e.
is not seamless).

Adds several tests for checkpoint compatibility (name->object in eager/graph,
and eager->graph/graph->eager for object-based saving)

PiperOrigin-RevId: 186844431

6 years agoMerge pull request #17134 from tensorflow/timeseries-head
Allen Lavoie [Sat, 24 Feb 2018 01:05:24 +0000 (17:05 -0800)]
Merge pull request #17134 from tensorflow/timeseries-head

TFTS: Enhancements to timeseries head

6 years agoCheckpointable: allow using Checkpointable objects in a tf.train.Saver()
Allen Lavoie [Sat, 24 Feb 2018 00:53:21 +0000 (16:53 -0800)]
Checkpointable: allow using Checkpointable objects in a tf.train.Saver()

Checkpointable objects in a Saver's var_list will be unpacked into their
SaveableObjects, possibly running some Python logic along the way.

This should help keep the transition from name-based saving smooth: to save
either way, just override CheckpointableBase._gather_saveables_for_checkpoint.

PiperOrigin-RevId: 186843857

6 years agoRegisters None gradients for ArgMax
Alexandre Passos [Sat, 24 Feb 2018 00:51:50 +0000 (16:51 -0800)]
Registers None gradients for ArgMax

PiperOrigin-RevId: 186843686

6 years agoInternal change.
Zhixian Yan [Sat, 24 Feb 2018 00:51:24 +0000 (16:51 -0800)]
Internal change.

PiperOrigin-RevId: 186843632

6 years agoInternal change.
Jeremy Lau [Sat, 24 Feb 2018 00:48:56 +0000 (16:48 -0800)]
Internal change.

PiperOrigin-RevId: 186843326

6 years agoAdd nasm mirror
Martin Wicke [Sat, 24 Feb 2018 00:26:54 +0000 (16:26 -0800)]
Add nasm mirror

6 years agoAdd Kumaraswamy Bijector, and let Kumaraswamy distribution depend on it.
A. Unique TensorFlower [Sat, 24 Feb 2018 00:05:57 +0000 (16:05 -0800)]
Add Kumaraswamy Bijector, and let Kumaraswamy distribution depend on it.

PiperOrigin-RevId: 186838045

6 years agoAdd custom registered graph optimizers run by MetaOptimizer.
Patrick Nguyen [Sat, 24 Feb 2018 00:04:38 +0000 (16:04 -0800)]
Add custom registered graph optimizers run by MetaOptimizer.

PiperOrigin-RevId: 186837828

6 years agoCheckpointable: Utility to gather initialization ops
Allen Lavoie [Fri, 23 Feb 2018 23:51:23 +0000 (15:51 -0800)]
Checkpointable: Utility to gather initialization ops

A bit safer, since only variables which will be saved get initialized. Graph
building then raises an error when you've used one which won't be saved. Reduces
the need for the global collection.

Makes it a bit easier to deal with initialization when writing graph/eager
agnostic programs.

PiperOrigin-RevId: 186835744

6 years agoeager: Change various examples to use tf.keras.Model instead of tfe.Network.
Asim Shankar [Fri, 23 Feb 2018 23:45:02 +0000 (15:45 -0800)]
eager: Change various examples to use tf.keras.Model instead of tfe.Network.

PiperOrigin-RevId: 186834891

6 years agoAdd test for bug in CUB that caused dynamic partition to fail on the GPU.
A. Unique TensorFlower [Fri, 23 Feb 2018 23:43:09 +0000 (15:43 -0800)]
Add test for bug in CUB that caused dynamic partition to fail on the GPU.

PiperOrigin-RevId: 186834668

6 years agoImprovement to the eager device placement heuristic.
Alexandre Passos [Fri, 23 Feb 2018 23:35:35 +0000 (15:35 -0800)]
Improvement to the eager device placement heuristic.

PiperOrigin-RevId: 186833677

6 years agoAdds unit tests for mean op with uint8_t input data.
A. Unique TensorFlower [Fri, 23 Feb 2018 23:33:22 +0000 (15:33 -0800)]
Adds unit tests for mean op with uint8_t input data.

PiperOrigin-RevId: 186833364

6 years agoEager/C: Add a TF_Status argument to a couple of functions.
A. Unique TensorFlower [Fri, 23 Feb 2018 23:06:46 +0000 (15:06 -0800)]
Eager/C: Add a TF_Status argument to a couple of functions.

PiperOrigin-RevId: 186829318

6 years agoMake tf.size() with optimize=True encode 0 if any dimension is 0.
Skye Wanderman-Milne [Fri, 23 Feb 2018 22:38:37 +0000 (14:38 -0800)]
Make tf.size() with optimize=True encode 0 if any dimension is 0.

PiperOrigin-RevId: 186824964

6 years agoMerge pull request #17148 from halhorn/beam_search_decoder_for_float16
ekelsen [Fri, 23 Feb 2018 22:41:06 +0000 (14:41 -0800)]
Merge pull request #17148 from halhorn/beam_search_decoder_for_float16

fix: Error on we feed float16 values into BeamSearchDecoder

6 years agoMerge pull request #17152 from facaiy/BLD/ci_allow_bad_user_name
ekelsen [Fri, 23 Feb 2018 22:40:50 +0000 (14:40 -0800)]
Merge pull request #17152 from facaiy/BLD/ci_allow_bad_user_name

docker ci allows bad name user

6 years agoMerge pull request #17224 from cclauss/patch-1
ekelsen [Fri, 23 Feb 2018 22:40:21 +0000 (14:40 -0800)]
Merge pull request #17224 from cclauss/patch-1

TF Lite: from six.moves import xrange for Python 3

6 years agoMerge pull request #17139 from deroneriksson/operation_semantics_typos
ekelsen [Fri, 23 Feb 2018 22:40:06 +0000 (14:40 -0800)]
Merge pull request #17139 from deroneriksson/operation_semantics_typos

Fix typos in Operation Semantics docs

6 years agoMake it easier to debug @assert_no_garbage_created unit test failures
Allen Lavoie [Fri, 23 Feb 2018 22:29:41 +0000 (14:29 -0800)]
Make it easier to debug @assert_no_garbage_created unit test failures

Prints a bunch of information about each object.

PiperOrigin-RevId: 186823593

6 years ago* CUB updated to 1.8.0
A. Unique TensorFlower [Fri, 23 Feb 2018 22:22:53 +0000 (14:22 -0800)]
* CUB updated to 1.8.0
* updated ShuffleIndex because of API change

PiperOrigin-RevId: 186822637

6 years agoPreserve user placement as much as possible when optimizing the graph
Benoit Steiner [Fri, 23 Feb 2018 22:22:06 +0000 (14:22 -0800)]
Preserve user placement as much as possible when optimizing the graph

PiperOrigin-RevId: 186822511

6 years agoAutomated g4 rollback of changelist 185688704
Noah Eisen [Fri, 23 Feb 2018 22:08:57 +0000 (14:08 -0800)]
Automated g4 rollback of changelist 185688704

PiperOrigin-RevId: 186820593

6 years agoRespects some form of log_device_placement in eager.
Alexandre Passos [Fri, 23 Feb 2018 22:06:49 +0000 (14:06 -0800)]
Respects some form of log_device_placement in eager.

PiperOrigin-RevId: 186820292

6 years agoMerge pull request #17111 from carlthome/patch-9
ekelsen [Fri, 23 Feb 2018 21:58:21 +0000 (13:58 -0800)]
Merge pull request #17111 from carlthome/patch-9

Add cast functions for complex64 and complex128

6 years ago[XLA] Fix BF16 propagation pass to produce matching fusion root and output.
Yuanzhong Xu [Fri, 23 Feb 2018 21:13:25 +0000 (13:13 -0800)]
[XLA] Fix BF16 propagation pass to produce matching fusion root and output.

Previously, the propagation pass might produce different procision in the fused
computation's root than the fusion itself, when the fused root doesn't define a buffer.

Add explicit converts at such fusion roots.

PiperOrigin-RevId: 186812368

6 years agoMerge pull request #17171 from ilya-biryukov/fix_cuda_compilation
ekelsen [Fri, 23 Feb 2018 21:09:05 +0000 (13:09 -0800)]
Merge pull request #17171 from ilya-biryukov/fix_cuda_compilation

Fix compiler error with cuda-clang

6 years agoMerge pull request #17226 from yifeif/branch_186777369
ekelsen [Fri, 23 Feb 2018 21:07:54 +0000 (13:07 -0800)]
Merge pull request #17226 from yifeif/branch_186777369

Branch 186777369

6 years agoAdd usage example to KMeans Estimator documentation.
A. Unique TensorFlower [Fri, 23 Feb 2018 20:24:53 +0000 (12:24 -0800)]
Add usage example to KMeans Estimator documentation.

PiperOrigin-RevId: 186805772

6 years ago[TF:XLA] Fix a bug where executor's device_ordinal should be passed to AllocateShaped...
Kay Zhu [Fri, 23 Feb 2018 20:24:19 +0000 (12:24 -0800)]
[TF:XLA] Fix a bug where executor's device_ordinal should be passed to AllocateShapedBuffer. Also enable C64 type for interpreter device.

PiperOrigin-RevId: 186805709

6 years agoCleanup for graph functions.
Akshay Agrawal [Fri, 23 Feb 2018 20:18:31 +0000 (12:18 -0800)]
Cleanup for graph functions.

(1) Define constants for the names of Arg and Retval ops, and use them in various places.
(2) Change the signature and documentation for `BuildControlFlow` to reflect the fact that the supplied Graph is not mutated.
(3) Expose the FunctionLibraryRuntime's DeviceMgr, in preparation for multi-device functions.

PiperOrigin-RevId: 186804968

6 years ago[XLA] Internal change.
Kay Zhu [Fri, 23 Feb 2018 19:58:10 +0000 (11:58 -0800)]
[XLA] Internal change.

PiperOrigin-RevId: 186802115

6 years agoRemove repeated defination due to auto-merge.
Yifei Feng [Fri, 23 Feb 2018 19:03:14 +0000 (11:03 -0800)]
Remove repeated defination due to auto-merge.

6 years agoMerge commit for internal changes
Yifei Feng [Fri, 23 Feb 2018 18:43:24 +0000 (10:43 -0800)]
Merge commit for internal changes

6 years agoRemove redundant line which is almost a duplicate of one a few lines below in
A. Unique TensorFlower [Fri, 23 Feb 2018 18:29:58 +0000 (10:29 -0800)]
Remove redundant line which is almost a duplicate of one a few lines below in
datasets_quickstart document.

PiperOrigin-RevId: 186788306

6 years agofrom six.moves import xrange for Python 3
cclauss [Fri, 23 Feb 2018 17:51:28 +0000 (18:51 +0100)]
from six.moves import xrange for Python 3

Lines 1785 and 1818 contain calls to the Python 2-only builtin function __xrange()__ which was removed in Python 3 in favor of __range()__.  This PR adds the line [__from six.moves import xrange__](https://pythonhosted.org/six/#module-six.moves) for compatibility with both Python 2 and Python 3.

6 years agoAllow setting of OpMetadata for Send HLOs.
A. Unique TensorFlower [Fri, 23 Feb 2018 17:15:58 +0000 (09:15 -0800)]
Allow setting of OpMetadata for Send HLOs.

PiperOrigin-RevId: 186777369

6 years agoC++ gradients for MaxPool3D, AvgPool and AvgPool3D
KB Sriram [Thu, 22 Feb 2018 15:21:39 +0000 (07:21 -0800)]
C++ gradients for MaxPool3D, AvgPool and AvgPool3D

Resolves tensorflow/tensorflow#17195

6 years agoLet variables initialized from checkpoints answer ".initialized_value()" correctly.
A. Unique TensorFlower [Fri, 23 Feb 2018 10:16:32 +0000 (02:16 -0800)]
Let variables initialized from checkpoints answer ".initialized_value()" correctly.

PiperOrigin-RevId: 186741832

6 years agoMerge pull request #17202 from yifeif/branch_186662441
Gunhan Gulsoy [Fri, 23 Feb 2018 05:42:51 +0000 (21:42 -0800)]
Merge pull request #17202 from yifeif/branch_186662441

Branch 186662441

6 years agoUnify metropolis_hastings interface with HMC kernel.
Dustin Tran [Fri, 23 Feb 2018 04:02:33 +0000 (20:02 -0800)]
Unify metropolis_hastings interface with HMC kernel.

PiperOrigin-RevId: 186716023

6 years agoEnable constant propagation across Switch(x,x) by rewriting the two outputs as Const...
A. Unique TensorFlower [Fri, 23 Feb 2018 03:47:03 +0000 (19:47 -0800)]
Enable constant propagation across Switch(x,x) by rewriting the two outputs as Const(false), Const(true) with appropriate control dependencies. This is a fairly common pattern when the graph contains assertions.

By rewriting the graph a bit, we can propagate the constants down the two output branches, and just use control dependencies to trigger the selected one at runtime. For example,
         +------+
     x-->|Switch|-->a
     x-->|      |-->b
         +------+

Is rewritten as

         +------+
     x-->|Switch|-->Identity--^>Const(false)-->a
     x-->|      |-->Identity--^>Const(true)-->b
         +------+

(In practice there may be multiple consumers of each output branch.)

PiperOrigin-RevId: 186714991