platform/upstream/tensorflow.git
6 years agoMerge pull request #18340 from JChord/master
Billy Lamberta [Wed, 11 Apr 2018 21:34:32 +0000 (14:34 -0700)]
Merge pull request #18340 from JChord/master

Docs: Fix 'Unable to find source java class'

6 years agoUpdate tf.contrib.metrics with deprecations (#18335)
Yong Tang [Wed, 11 Apr 2018 20:35:51 +0000 (13:35 -0700)]
Update tf.contrib.metrics with deprecations (#18335)

* Update tf.contrib.metrics with deprecations

This fix updates tf.contrib.metrics.streaming_mean_absolution(relative/squared)_error
with deprecation notices as they have been replaces with tf.metrics.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update streaming_mean_relative_error

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update deprecation notice for streaming_root_mean_squared_error

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix the deprecation message.

* Fix pylint `Line too long (81/80)` issue

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdating tensorboard link in Readme.md (#18161)
Rajendra arora [Wed, 11 Apr 2018 19:49:31 +0000 (01:19 +0530)]
Updating tensorboard link in Readme.md (#18161)

6 years agoMerge pull request #18430 from lamberta/fix-docs-using-tpu
Billy Lamberta [Wed, 11 Apr 2018 19:07:59 +0000 (12:07 -0700)]
Merge pull request #18430 from lamberta/fix-docs-using-tpu

Docs: Clarify using_tpu.md

6 years agoTidy up doc for rebuild project
Billy Lamberta [Wed, 11 Apr 2018 19:05:39 +0000 (12:05 -0700)]
Tidy up doc for rebuild project

6 years agoMerge pull request #18426 from qlzh727/branch_192461382
Qianli Scott Zhu [Wed, 11 Apr 2018 18:27:12 +0000 (11:27 -0700)]
Merge pull request #18426 from qlzh727/branch_192461382

Branch 192461382

6 years agoDocs: Clarify using_tpu.md
Billy Lamberta [Wed, 11 Apr 2018 17:57:30 +0000 (10:57 -0700)]
Docs: Clarify using_tpu.md

6 years agoMerge commit for internal changes
Scott Zhu [Wed, 11 Apr 2018 16:54:10 +0000 (09:54 -0700)]
Merge commit for internal changes

6 years agoFixing dependencies.
Nupur Garg [Wed, 11 Apr 2018 16:34:51 +0000 (09:34 -0700)]
Fixing dependencies.

PiperOrigin-RevId: 192461382

6 years agoFix Windows GPU TensorFlow Bazel builds.
Michael Case [Wed, 11 Apr 2018 16:34:44 +0000 (09:34 -0700)]
Fix Windows GPU TensorFlow Bazel builds.

The configure.py script will error out on Windows GPU builds due
to NCCL attempted to be configured (and is currently Linux only).

PiperOrigin-RevId: 192461362

6 years agoTemporarily remove prelu from generated_examples_zip_test
A. Unique TensorFlower [Wed, 11 Apr 2018 15:30:18 +0000 (08:30 -0700)]
Temporarily remove prelu from generated_examples_zip_test

PiperOrigin-RevId: 192453411

6 years agoRemove unused former source of tensorflow.org/tutorials/image_retraining.
A. Unique TensorFlower [Wed, 11 Apr 2018 15:11:50 +0000 (08:11 -0700)]
Remove unused former source of tensorflow.org/tutorials/image_retraining.

The source of https://tensorflow.org/tutorials/image_retraining has moved from
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/docs_src/tutorials
to https://github.com/tensorflow/hub/tree/master/docs/tutorials
because of its use of TensorFlow Hub.

This change replaces the now-defunct version with a pointer to the new
location, in order to avoid dead code.

PiperOrigin-RevId: 192451570

6 years agoFixing propagation of minmax info on constant gather ops.
A. Unique TensorFlower [Wed, 11 Apr 2018 14:47:26 +0000 (07:47 -0700)]
Fixing propagation of minmax info on constant gather ops.

PiperOrigin-RevId: 192448922

6 years ago[TF:XLA] Mark oom_test as optonly, it's really slow when compiled without optimization.
Benjamin Kramer [Wed, 11 Apr 2018 09:16:25 +0000 (02:16 -0700)]
[TF:XLA] Mark oom_test as optonly, it's really slow when compiled without optimization.

PiperOrigin-RevId: 192420481

6 years agoCreate FileWriter <-> tf.contrib.summary compatibility layer
Nick Felt [Wed, 11 Apr 2018 06:44:12 +0000 (23:44 -0700)]
Create FileWriter <-> tf.contrib.summary compatibility layer

This provides an implementation of FileWriter, activated by passing in a `session` parameter to the constructor, that is backed by session.run'ing graph ops that manipulate a tf.contrib.summary.create_file_writer() instance. Because tf.contrib.summary.SummaryWriters are backed by shared resources in the graph, this makes it possible to have a FileWriter and a tf.contrib.summary.SummaryWriter that both write to the same events file.

This change includes some related smaller changes:
- Factors out training_utils.py into a separate target to avoid a cyclic dep
- Moves contrib/summary/summary_ops.py to python/ops/summary_ops_v2.py
- Adds SummaryWriter.init(), .flush(), and .close() op-returning methods
- Changes create_file_writer() `name` arg to default to logdir prefixed by `logdir:` so shared resources are scoped by logdir by default
- Fixes a bug with tf.contrib.summary.flush() `writer` arg
- Makes create_file_writer()'s max_queue arg behave as documented
- Adds more testing for existing tf.contrib.summary API

PiperOrigin-RevId: 192408079

6 years ago[XLA] Fix the size of data buffer for sparse literals.
A. Unique TensorFlower [Wed, 11 Apr 2018 05:44:36 +0000 (22:44 -0700)]
[XLA] Fix the size of data buffer for sparse literals.

PiperOrigin-RevId: 192404543

6 years ago[XLA] Redesign: implement ComputeHost.
A. Unique TensorFlower [Wed, 11 Apr 2018 05:29:13 +0000 (22:29 -0700)]
[XLA] Redesign: implement ComputeHost.

Also support convert from/to proto for ComputeHost.

PiperOrigin-RevId: 192403660

6 years ago[XLA] Redesgin: implement and test Gather, Conditional.
A. Unique TensorFlower [Wed, 11 Apr 2018 04:42:14 +0000 (21:42 -0700)]
[XLA] Redesgin: implement and test Gather, Conditional.

Also support convert from/to proto for Gather.

PiperOrigin-RevId: 192400659

6 years ago[XLA] Redesign: implment and test CrossReplicaSum.
A. Unique TensorFlower [Wed, 11 Apr 2018 03:48:57 +0000 (20:48 -0700)]
[XLA] Redesign: implment and test CrossReplicaSum.

PiperOrigin-RevId: 192397189

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 11 Apr 2018 02:44:00 +0000 (19:44 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 192392702

6 years ago[StreamExecutor] Merge StreamExecutor's and XLA's StatusOr classes.
Justin Lebar [Wed, 11 Apr 2018 02:34:54 +0000 (19:34 -0700)]
[StreamExecutor] Merge StreamExecutor's and XLA's StatusOr classes.

StatusOr is a...complicated class to write.  It's really not good to
have two copies of it.  They've diverged (the XLA one is more
sophisticated), and this may be causing upstream build problems with
gcc6.

PiperOrigin-RevId: 192392111

6 years ago[XLA] Redesign: implement and test BatchNormXXX.
A. Unique TensorFlower [Wed, 11 Apr 2018 02:31:05 +0000 (19:31 -0700)]
[XLA] Redesign: implement and test BatchNormXXX.

PiperOrigin-RevId: 192391748

6 years agoexperimental C API: Fix compilation failure in Windows.
Asim Shankar [Wed, 11 Apr 2018 02:20:58 +0000 (19:20 -0700)]
experimental C API: Fix compilation failure in Windows.

The functions added in
https://github.com/tensorflow/tensorflow/commit/be917027e37c5e8f21f6ba07f24bdbf072cf6dfd
are temporary, and their existence breaks compilation in MSVC because of
https://docs.microsoft.com/en-us/cpp/c-language/maximum-string-length
and
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2026

So just disabling it in Windows for now.

PiperOrigin-RevId: 192391164

6 years agoCheckpointable: remove colocation constraints from restore ops
Allen Lavoie [Wed, 11 Apr 2018 02:01:33 +0000 (19:01 -0700)]
Checkpointable: remove colocation constraints from restore ops

Mystery solved thanks to log_device_placement.

PiperOrigin-RevId: 192389574

6 years agoRemove BN workaround for resource variable gradients bug that was recently fixed.
Francois Chollet [Wed, 11 Apr 2018 01:50:58 +0000 (18:50 -0700)]
Remove BN workaround for resource variable gradients bug that was recently fixed.

PiperOrigin-RevId: 192388867

6 years agoAdd missing TF_ATTRIBUTE_WEAK for MSVC (#18303)
Loo Rong Jie [Wed, 11 Apr 2018 01:51:10 +0000 (09:51 +0800)]
Add missing TF_ATTRIBUTE_WEAK for MSVC (#18303)

6 years agoMerge changes from github.
Michael Case [Wed, 11 Apr 2018 01:44:13 +0000 (18:44 -0700)]
Merge changes from github.

PiperOrigin-RevId: 192388250

6 years agoFix for users who were passing `Dimension` type as `units` arg in `Dense`.
Francois Chollet [Wed, 11 Apr 2018 01:41:37 +0000 (18:41 -0700)]
Fix for users who were passing `Dimension` type as `units` arg in `Dense`.

PiperOrigin-RevId: 192387984

6 years agoFix incorrect math equation renderings in random_fourier_features.py (#18367)
Yong Tang [Wed, 11 Apr 2018 01:38:06 +0000 (18:38 -0700)]
Fix incorrect math equation renderings in random_fourier_features.py (#18367)

* Fix incorrect math equation renderings in random_fourier_features.py

This fix fixes incorrect math equation renderings for markdown
in random_fourier_features.py. The issue is that
"```" backtick should not be added when mathjax quote is used ("\\(" or "$$").

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Additional fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* MathJax fixes

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix pylint errors

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix code block rendering issue in adding_an_op.md (#18368)
Yong Tang [Wed, 11 Apr 2018 01:37:35 +0000 (18:37 -0700)]
Fix code block rendering issue in adding_an_op.md (#18368)

* Fix code block rendering issue in adding_an_op.md

In adding_an_op.md, html code was used in markdown for code blocks.
However, this does not work very well as some of the code blocks
includes incorrect rendering.

This fix converts html into "```c++" (backticks) so that the rendering
could be fixed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix additional html code

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix lang-cpp issue

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Further clean up

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agotypo and readability fixes in CPU section (#18370)
Maciej [Wed, 11 Apr 2018 01:37:03 +0000 (20:37 -0500)]
typo and readability fixes in CPU section (#18370)

Fixed a typo in the Tuning MKL section, and modified punctuation for intra_op_parallelism_threads section for easier readability.

6 years agoTFTS: De-flake the LSTM test
Allen Lavoie [Wed, 11 Apr 2018 01:04:20 +0000 (18:04 -0700)]
TFTS: De-flake the LSTM test

Disabling the value-based check for now. Hopefully the shapes are deterministic.

PiperOrigin-RevId: 192383553

6 years agoForward the status from LookupResource to GetInputTensorFromVariable rather than...
Allen Lavoie [Wed, 11 Apr 2018 00:57:19 +0000 (17:57 -0700)]
Forward the status from LookupResource to GetInputTensorFromVariable rather than returning a generic error status

PiperOrigin-RevId: 192382499

6 years ago[XLA] Redesign: implement Conj.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:49:51 +0000 (17:49 -0700)]
[XLA] Redesign: implement Conj.

PiperOrigin-RevId: 192381481

6 years ago[XLA] Redesign: implement SliceInDim.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:47:13 +0000 (17:47 -0700)]
[XLA] Redesign: implement SliceInDim.

PiperOrigin-RevId: 192381080

6 years ago[XLA] Redesign: implement ReduceAll.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:44:48 +0000 (17:44 -0700)]
[XLA] Redesign: implement ReduceAll.

PiperOrigin-RevId: 192380688

6 years ago[XLA] Redesign: implement and test SelectAndScatter.
A. Unique TensorFlower [Wed, 11 Apr 2018 00:41:56 +0000 (17:41 -0700)]
[XLA] Redesign: implement and test SelectAndScatter.

PiperOrigin-RevId: 192380121

6 years agoUpdate LogToSTDErr for TF Lite usage
Austin Anderson [Wed, 11 Apr 2018 00:37:53 +0000 (17:37 -0700)]
Update LogToSTDErr for TF Lite usage

PiperOrigin-RevId: 192379483

6 years agoAdd types to error message in case of mismatch. NFC.
Jacques Pienaar [Tue, 10 Apr 2018 23:47:08 +0000 (16:47 -0700)]
Add types to error message in case of mismatch. NFC.

PiperOrigin-RevId: 192370979

6 years agoAdd a thread-safe producer-consumer queue.
Michael Kuperstein [Tue, 10 Apr 2018 23:45:19 +0000 (16:45 -0700)]
Add a thread-safe producer-consumer queue.

PiperOrigin-RevId: 192370670

6 years agoFix issue with gradients of resource variables in cond.
Alexandre Passos [Tue, 10 Apr 2018 23:35:58 +0000 (16:35 -0700)]
Fix issue with gradients of resource variables in cond.

PiperOrigin-RevId: 192369091

6 years ago[XLA] Redesign: implement and test ReduceWindow.
A. Unique TensorFlower [Tue, 10 Apr 2018 23:32:05 +0000 (16:32 -0700)]
[XLA] Redesign: implement and test ReduceWindow.

PiperOrigin-RevId: 192368401

6 years agoMerge pull request #18407 from av8ramit/fix_sed_cmd
Amit Patankar [Tue, 10 Apr 2018 23:36:13 +0000 (16:36 -0700)]
Merge pull request #18407 from av8ramit/fix_sed_cmd

Updating the sed command for docker parameterized build.

6 years agoUpdate programmers guide
A. Unique TensorFlower [Tue, 10 Apr 2018 23:31:46 +0000 (16:31 -0700)]
Update programmers guide

PiperOrigin-RevId: 192368335

6 years agoSupporting FakeQuant num_bits and getting the fake quant op matching tensorflow.
A. Unique TensorFlower [Tue, 10 Apr 2018 23:26:05 +0000 (16:26 -0700)]
Supporting FakeQuant num_bits and getting the fake quant op matching tensorflow.

PiperOrigin-RevId: 192367307

6 years ago[XLA] GRPC service definition.
Chris Leary [Tue, 10 Apr 2018 23:12:19 +0000 (16:12 -0700)]
[XLA] GRPC service definition.

PiperOrigin-RevId: 192364932

6 years agoFix `nn` module RNN namespace issues.
Francois Chollet [Tue, 10 Apr 2018 23:11:38 +0000 (16:11 -0700)]
Fix `nn` module RNN namespace issues.

PiperOrigin-RevId: 192364808

6 years agoUpdating the sed command for docker parameterized build.
Amit Patankar [Tue, 10 Apr 2018 23:10:13 +0000 (16:10 -0700)]
Updating the sed command for docker parameterized build.

6 years agoAllow passing allow_custom_ops for toco_convert.
Mingxing Tan [Tue, 10 Apr 2018 22:59:39 +0000 (15:59 -0700)]
Allow passing allow_custom_ops for toco_convert.

PiperOrigin-RevId: 192362688

6 years agoMerge pull request #18399 from av8ramit/fix_docker_link
annarev [Tue, 10 Apr 2018 23:01:23 +0000 (16:01 -0700)]
Merge pull request #18399 from av8ramit/fix_docker_link

Forcing the symlink creation.

6 years agoCleaning up _distributed_apply now the device policy is unnecessary
Alexandre Passos [Tue, 10 Apr 2018 22:49:03 +0000 (15:49 -0700)]
Cleaning up _distributed_apply now the device policy is unnecessary

PiperOrigin-RevId: 192360913

6 years agoIn `get_variable`, nest the choice to use `ResourceVariable` under an
Akshay Agrawal [Tue, 10 Apr 2018 22:48:15 +0000 (15:48 -0700)]
In `get_variable`, nest the choice to use `ResourceVariable` under an
`init_scope`.

This makes sure that, when executing eagerly, calls to `get_variable` in a
`defun`-compiled function retrieve `ResourceVariable`s instead of `Variables`.

PiperOrigin-RevId: 192360775

6 years agoSmall changes to testing code, plus a new binary to check diff from command line.
A. Unique TensorFlower [Tue, 10 Apr 2018 22:45:37 +0000 (15:45 -0700)]
Small changes to testing code, plus a new binary to check diff from command line.

PiperOrigin-RevId: 192360373

6 years ago[XLA] Redesign: implement and test Conv.
A. Unique TensorFlower [Tue, 10 Apr 2018 22:39:37 +0000 (15:39 -0700)]
[XLA] Redesign: implement and test Conv.

PiperOrigin-RevId: 192359226

6 years agoAllow negative feature values in computation for `sum` combiner.
A. Unique TensorFlower [Tue, 10 Apr 2018 22:23:05 +0000 (15:23 -0700)]
Allow negative feature values in computation for `sum` combiner.

PiperOrigin-RevId: 192355950

6 years agoAdd quantized LogSoftmax.
A. Unique TensorFlower [Tue, 10 Apr 2018 22:01:49 +0000 (15:01 -0700)]
Add quantized LogSoftmax.

PiperOrigin-RevId: 192352432

6 years agoForcing the symlink creation.
Amit Patankar [Tue, 10 Apr 2018 21:59:23 +0000 (14:59 -0700)]
Forcing the symlink creation.

6 years agoRun EvaluateNodes for ModelPrunerTest_StopGradientPruning. Also updated the test...
A. Unique TensorFlower [Tue, 10 Apr 2018 21:51:54 +0000 (14:51 -0700)]
Run EvaluateNodes for ModelPrunerTest_StopGradientPruning. Also updated the test fixture to inherit from GrapplerTest.

PiperOrigin-RevId: 192350828

6 years agoParseOpData returns kTfLiteError when error happens.
Yu-Cheng Ling [Tue, 10 Apr 2018 21:24:51 +0000 (14:24 -0700)]
ParseOpData returns kTfLiteError when error happens.

PiperOrigin-RevId: 192346224

6 years agoBug fix for statistical_testing:
A. Unique TensorFlower [Tue, 10 Apr 2018 21:22:33 +0000 (14:22 -0700)]
Bug fix for statistical_testing:
  - Max/Min computations should be done over the sample dimension.
  - Change dominate check to be greater_equal instead of greater (for matching dimensions).

PiperOrigin-RevId: 192345809

6 years agoAdd missing import for RNNClassifier
A. Unique TensorFlower [Tue, 10 Apr 2018 21:16:36 +0000 (14:16 -0700)]
Add missing import for RNNClassifier

PiperOrigin-RevId: 192344760

6 years ago[XLA] Redesign: implement and test Rev, BitcastConvertType, Map, and ReducePrecision.
A. Unique TensorFlower [Tue, 10 Apr 2018 21:04:29 +0000 (14:04 -0700)]
[XLA] Redesign: implement and test Rev, BitcastConvertType, Map, and ReducePrecision.

PiperOrigin-RevId: 192342686

6 years agoPad support for quantized zero.
Suharsh Sivakumar [Tue, 10 Apr 2018 21:02:02 +0000 (14:02 -0700)]
Pad support for quantized zero.

PiperOrigin-RevId: 192342172

6 years agotest previously untested eval codepaths.
A. Unique TensorFlower [Tue, 10 Apr 2018 20:59:49 +0000 (13:59 -0700)]
test previously untested eval codepaths.

PiperOrigin-RevId: 192341561

6 years agoHandle duplicate features by coalescing them together into a single feature.
A. Unique TensorFlower [Tue, 10 Apr 2018 20:57:00 +0000 (13:57 -0700)]
Handle duplicate features by coalescing them together into a single feature.

PiperOrigin-RevId: 192341065

6 years agoRefactor layers:
Francois Chollet [Tue, 10 Apr 2018 20:49:37 +0000 (13:49 -0700)]
Refactor layers:
- tf.layers layers now subclasses tf.keras.layers layers.
- tf.keras.layers is now agnostic to variable scopes and global collections (future-proof). It also uses ResourceVariable everywhere by default.
- As a result tf.keras.layers is in general lower-complexity, with fewer hacks and workarounds. However some of current code is temporary (variable creation should be moved to Checkpointable, arguably, and there are some dependency issues that will require later refactors).
- The legacy tf.layers layers behavior is kept, with references to variable scopes and global collections injected in the subclassed tf.layers.base.Layer class (the content of tf.layers.base.Layer is the complexity differential between the old implementation and the new one).

Note: this refactor does slightly change the behavior of tf.layers.base.Layer, by disabling extreme edge-case behavior that either has long been invalid, or is dangerous and should most definitely be disabled. This will not affect any users since such behaviors only existed in the base Layer unit tests. The behaviors disabled are:
- Option to create reusable variables in `call` (already invalid for some time).
- Option to use a variable scope to create layer variables outside of the layer while not having the layer track such variables locally.
PiperOrigin-RevId: 192339798

6 years agoMerge pull request #18391 from av8ramit/fix_devel_docker_python
Amit Patankar [Tue, 10 Apr 2018 20:41:06 +0000 (13:41 -0700)]
Merge pull request #18391 from av8ramit/fix_devel_docker_python

Adding the python symlink command for devel packages too.

6 years agoUpdate declaration order in staging ops Buffer class according to C++ style guide
Smit Hinsu [Tue, 10 Apr 2018 20:32:38 +0000 (13:32 -0700)]
Update declaration order in staging ops Buffer class according to C++ style guide

PiperOrigin-RevId: 192336966

6 years agoCheckpointable: wrap restore ops in init_scope
Allen Lavoie [Tue, 10 Apr 2018 19:54:03 +0000 (12:54 -0700)]
Checkpointable: wrap restore ops in init_scope

This should make restore() work with defun-wrapped code, when variables are
created inside the function. Just lifts the restore code into the outer
context. Adds a test for it.

PiperOrigin-RevId: 192331065

6 years agoMerge pull request #18388 from qlzh727/branch_192309109
Qianli Scott Zhu [Tue, 10 Apr 2018 19:48:36 +0000 (12:48 -0700)]
Merge pull request #18388 from qlzh727/branch_192309109

Branch 192309109

6 years agoMake custom_graph_optimizer_registry header-only (#18387)
Allen Lavoie [Tue, 10 Apr 2018 19:41:29 +0000 (12:41 -0700)]
Make custom_graph_optimizer_registry header-only (#18387)

Adds it as a dependency to libtensorflow_framework.so so its symbols are
available to shared objects which want to register optimizers. No other rules
include it, so shared objects won't accidentally get their own version of the
registry.

6 years agoEmploy array flat sizes more directly in reference_ops.
A. Unique TensorFlower [Tue, 10 Apr 2018 19:28:56 +0000 (12:28 -0700)]
Employ array flat sizes more directly in reference_ops.

PiperOrigin-RevId: 192327464

6 years agoUpgrade gRPC version and fix file duplication
Noah Eisen [Tue, 10 Apr 2018 19:28:04 +0000 (12:28 -0700)]
Upgrade gRPC version and fix file duplication

This bumps the gRPC version used in OSS Tensorflow to pick up grpc/grpc#14541, which exposes gRPC serialization classes which were previously hidden in an internal namespace. Using these files eliminates files duplicated from gRPC repo

PiperOrigin-RevId: 192327358

6 years agoExpand list of value-preserving ops. This will increase the number of graphs where...
A. Unique TensorFlower [Tue, 10 Apr 2018 19:05:06 +0000 (12:05 -0700)]
Expand list of value-preserving ops. This will increase the number of graphs where we can apply the involution and mul->conv fusion optimizations.

PiperOrigin-RevId: 192323712

6 years agoEnable loop-invariant node motion in the Grappler loop optimizer.
A. Unique TensorFlower [Tue, 10 Apr 2018 18:57:40 +0000 (11:57 -0700)]
Enable loop-invariant node motion in the Grappler loop optimizer.
Thanks to the team at Alibaba, who contributed the original version of this code.

PiperOrigin-RevId: 192322484

6 years agoFix bug in TFLite Interpreter python interface
A. Unique TensorFlower [Tue, 10 Apr 2018 18:33:45 +0000 (11:33 -0700)]
Fix bug in TFLite Interpreter python interface

PiperOrigin-RevId: 192318426

6 years ago[XLA] Fix the size of the data returned from Literal for sparse literals.
A. Unique TensorFlower [Tue, 10 Apr 2018 18:20:38 +0000 (11:20 -0700)]
[XLA] Fix the size of the data returned from Literal for sparse literals.

PiperOrigin-RevId: 192315888

6 years agoAdding the python symlink command for devel packages too.
Amit Patankar [Tue, 10 Apr 2018 18:19:26 +0000 (11:19 -0700)]
Adding the python symlink command for devel packages too.

6 years agoAdds support for hoisting out common denominator in arithmetic_optimizer
A. Unique TensorFlower [Tue, 10 Apr 2018 18:09:37 +0000 (11:09 -0700)]
Adds support for hoisting out common denominator in arithmetic_optimizer

PiperOrigin-RevId: 192314177

6 years agoMerge commit for internal changes
Scott Zhu [Tue, 10 Apr 2018 17:55:17 +0000 (10:55 -0700)]
Merge commit for internal changes

6 years ago[TF:XLA] fix a segfault in MakeFakeArguments, and add a test case.
Nick Desaulniers [Tue, 10 Apr 2018 17:52:15 +0000 (10:52 -0700)]
[TF:XLA] fix a segfault in MakeFakeArguments, and add a test case.

PiperOrigin-RevId: 192310749

6 years agoSimplify test_util.run_in_graph_and_eager_modes
Asim Shankar [Tue, 10 Apr 2018 17:43:14 +0000 (10:43 -0700)]
Simplify test_util.run_in_graph_and_eager_modes

- Get rid of unnecessary options
- Update various resource variable tests so that they correctly exercise the cases where the variables are placed on GPU (these "with tf.device('/cpu:0')" blocks that were added for eager execution are no longer necessary)

PiperOrigin-RevId: 192309109

6 years agoAdd python built-in types support for `tf.as_dtype` (#17652)
Yong Tang [Tue, 10 Apr 2018 17:34:32 +0000 (10:34 -0700)]
Add python built-in types support for `tf.as_dtype` (#17652)

* Add python built-in types support for `tf.as_dtype`

This fix tries to address the issue raised in 17641 where
it was not possible to use `tf.as_dtype(float)` the same
way as numpy `np.dtype(float)`.
This fix adds the built-in types support for `tf.as_dtype`,
so that it is possible to specify:
```
dtypes.as_dtype(float)   # dtypes.float64
dtypes.as_dtype(int)     # dtypes.int32
dtypes.as_dtype(long)    # dtypes.int64
dtypes.as_dtype(complex) # dtypes.complex128
dtypes.as_dtype(bool)    # dtypes.bool
```

This fix fixes 17641.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for built-in types support with `tf.as_dtype`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix failed test cases with added built-in types support of tf.as_dtype

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix python 3 build

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Restrict the changes to float and bool based on review feedback

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoPlace data format op on CPU:0.
Yao Zhang [Tue, 10 Apr 2018 17:07:31 +0000 (10:07 -0700)]
Place data format op on CPU:0.

PiperOrigin-RevId: 192302833

6 years agoraw_input() was removed in Python 3 (#16440)
cclauss [Tue, 10 Apr 2018 16:56:52 +0000 (18:56 +0200)]
raw_input() was removed in Python 3 (#16440)

6 years agoFix markdown in a couple of tf.estimator docstrings.
A. Unique TensorFlower [Tue, 10 Apr 2018 16:50:02 +0000 (09:50 -0700)]
Fix markdown in a couple of tf.estimator docstrings.

PiperOrigin-RevId: 192299871

6 years agoRemove manifest_merger from tensorflow_demo. This is an internal-only attribute
A. Unique TensorFlower [Tue, 10 Apr 2018 16:41:45 +0000 (09:41 -0700)]
Remove manifest_merger from tensorflow_demo. This is an internal-only attribute
that is being removed from bazel.

PiperOrigin-RevId: 192298746

6 years agoFix capitalization (on master)
Mark Daoust [Tue, 10 Apr 2018 16:40:25 +0000 (09:40 -0700)]
Fix capitalization (on master)

PiperOrigin-RevId: 192298563

6 years ago[XLA:GPU] Add infrastructure for unrolling kernels to improve bandwidth utilization.
Benjamin Kramer [Tue, 10 Apr 2018 16:26:59 +0000 (09:26 -0700)]
[XLA:GPU] Add infrastructure for unrolling kernels to improve bandwidth utilization.

We often have simple kernels that do very little actual work, duplicating that
can increase the used bandwidth.

This change introduces flags and infrastructure for unrolling kernels, it
doesn't include any cost heuristics and is disabled by default. Based on code
written by Bixia Zheng.

PiperOrigin-RevId: 192296781

6 years agoAdded minimum op, better type support in maximum.
A. Unique TensorFlower [Tue, 10 Apr 2018 15:55:24 +0000 (08:55 -0700)]
Added minimum op, better type support in maximum.

PiperOrigin-RevId: 192292693

6 years agoUpdate document
A. Unique TensorFlower [Tue, 10 Apr 2018 15:51:18 +0000 (08:51 -0700)]
Update document

PiperOrigin-RevId: 192292160

6 years agoSuppress -Wself-assign in self-assignment tests, which triggers in newer clang
A. Unique TensorFlower [Tue, 10 Apr 2018 14:47:14 +0000 (07:47 -0700)]
Suppress -Wself-assign in self-assignment tests, which triggers in newer clang
revisions.

PiperOrigin-RevId: 192284946

6 years ago[XLA] Redesign: implement and test custom call.
A. Unique TensorFlower [Tue, 10 Apr 2018 06:13:11 +0000 (23:13 -0700)]
[XLA] Redesign: implement and test custom call.

PiperOrigin-RevId: 192241311

6 years ago[XLA] Redesign: implement XlaBuilder::IsConstant, XlaBuidler::BuildConstantSubGraph...
A. Unique TensorFlower [Tue, 10 Apr 2018 05:04:04 +0000 (22:04 -0700)]
[XLA] Redesign: implement XlaBuilder::IsConstant, XlaBuidler::BuildConstantSubGraph, and Client::ComputeConstant(XlaComputation...).
- Since the builder no longer holds a client, we moved the ComputeConstant to the client side so that it can communicate with the service side. Now we add XlaBuilder::BuildConstantSubGraph, which is only responsible for building a subgraph that is compile-time constant.
- Before this change, every XlaBuilder has a unique id. Now since it also builds constant subgraph, we give every XlaComputation being built a global unique id, and uniquify instruction names when actually building the XlaComputation.

PiperOrigin-RevId: 192236997

6 years agoImplementation of ArgMax
A. Unique TensorFlower [Tue, 10 Apr 2018 05:01:59 +0000 (22:01 -0700)]
Implementation of ArgMax

PiperOrigin-RevId: 192236845

6 years agoUpdating three tests in constant_folding_test.cc with PlaceHolders Nodes to check...
A. Unique TensorFlower [Tue, 10 Apr 2018 04:36:36 +0000 (21:36 -0700)]
Updating three tests in constant_folding_test.cc with PlaceHolders Nodes to check EvaluateNodes returns the same output for the original and optimized graph

PiperOrigin-RevId: 192235310

6 years agoMerge pull request #18366 from qlzh727/branch_192210794
Qianli Scott Zhu [Tue, 10 Apr 2018 04:25:15 +0000 (21:25 -0700)]
Merge pull request #18366 from qlzh727/branch_192210794

Branch 192210794

6 years agoMerge pull request #18347 from case540/fix_source_writer
Michael Case [Tue, 10 Apr 2018 04:17:15 +0000 (21:17 -0700)]
Merge pull request #18347 from case540/fix_source_writer

Fixes to source_writer.cc.

6 years agoFix the GCS Kokoro build badge links.
Michael Case [Tue, 10 Apr 2018 03:26:16 +0000 (20:26 -0700)]
Fix the GCS Kokoro build badge links.

The original badges I added were redirected/authenticated links (I think). This
resulted in broken images on the README. These new links should not be
redirected and should just link to the badge images.

PiperOrigin-RevId: 192230689

6 years agoAddressed comments.
Michael Case [Tue, 10 Apr 2018 03:09:19 +0000 (20:09 -0700)]
Addressed comments.

- Free all un-popped GenericNamespace objects in destructor (not
  just the one garunteed to be there).
- Renamed test file to test.java.snippet.