platform/upstream/tensorflow.git
6 years agoAdd IBM ppc64le build to README. (#19285)
Gunhan Gulsoy [Tue, 15 May 2018 17:41:38 +0000 (10:41 -0700)]
Add IBM ppc64le build to README. (#19285)

* Add IBM ppc64le build to README.

* ppc64le -> ppc64le CPU

6 years agoAdd tf.regex_match for regex match support (#19160)
Yong Tang [Tue, 15 May 2018 00:58:36 +0000 (17:58 -0700)]
Add tf.regex_match for regex match support (#19160)

* Add tf.regex_match for regex match support

This fix tries to address the issue raised in 18264.
Currently tf.regex_replace has already been supported
though there was no regex match support.
This fix adds the tf.regex_match support in a similiar
pattern as tf.regex_replace.

This fix fixes 18264.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update BUILD file for the tf.regex_match kernel

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Register RegexMatch ops

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for tf.regex_match

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

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

update with:
```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
           --update_goldens True
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Expose regex_full_match in tf.strings namespace

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

```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
           --update_goldens True
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoImprove shape function of `tf.image.draw_bounding_boxes` (#19237)
Yong Tang [Tue, 15 May 2018 00:57:23 +0000 (17:57 -0700)]
Improve shape function of `tf.image.draw_bounding_boxes` (#19237)

* Improve shape function of `tf.image.draw_bounding_boxes`

The `tf.image.draw_bounding_boxes` requires `boxes` to be
3-D shape though there was no check on shape function.
This fix improves the shape function by restricting the
boxes to 3-D.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add additional check to make sure boxes shape

ends with 4 ([batch, num_bounding_boxes, 4])

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Address review feedback with addtional shape checks.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add unit tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd int64 support for output_shape of tf.nn.conv3d_transpose (#19248)
Yong Tang [Mon, 14 May 2018 18:35:40 +0000 (11:35 -0700)]
Add int64 support for output_shape of tf.nn.conv3d_transpose (#19248)

* Add int64 support for output_shape of tf.nn.conv3d_transpose

This fix tries to address the issue raised in 18887 where
the output_shape of tf.nn.conv3d_transpose only support
int32 data types. The support of int64 has been added in this PR
with test case covered.

This fix fixes 18887.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update op registration for Conv3DBackpropInputV2

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for int64 support of output_shape with tf.nn.conv3d_transpose

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update test case with both int32 and int64

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix links on the community/swift page. (#19230)
Yilei (Dolee) Yang [Mon, 14 May 2018 18:34:54 +0000 (11:34 -0700)]
Fix links on the community/swift page. (#19230)

They were broken rendered on https://www.tensorflow.org/community/swift.

6 years agoFix warning caused by squeeze_dims (#19227)
Yong Tang [Mon, 14 May 2018 18:12:32 +0000 (11:12 -0700)]
Fix warning caused by squeeze_dims (#19227)

The `squeeze_dims` in `tf.squeeze` has been deprecated
in favor of `axis`. This fix fixes the `squeeze_dims`
in text_classification_cnn.py so that the warning
could be removed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd complex support for tf.segment_mean (#19225)
Yong Tang [Mon, 14 May 2018 18:10:27 +0000 (11:10 -0700)]
Add complex support for tf.segment_mean (#19225)

* Add complex support for tf.segment_mean

While using tf.segment_mean I noticed that it does not
have the complex support like tf.segment_sum. I think it
makes sense to support complex for it. This fix adds the
complex support for tf.segment_mean.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for complex support with tf.segment_mean

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix misleading cupti.h error message (#19224)
Yong Tang [Mon, 14 May 2018 18:09:30 +0000 (11:09 -0700)]
Fix misleading cupti.h error message (#19224)

This fix tries to address the issue raised in 19223
where the cupti.h eror message was misleading. The following error:
```
Cuda Configuration Error: Cannot find cupti.h under /usr/local/cuda-9.0
```
is not the true patch searched.

This fix updates the bzl file to print out the
complete searched paths when error occurs:
```
Cuda Configuration Error: Cannot find cupti.h under /usr/local/cuda-9.0/extras/CUPTI/include/, /usr/local/cuda-9.0/include/cuda/CUPTI/
```

This fix fixes 19223.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoEnable OrderedEnqueuer from keras in tf.keras. (#19183)
Jan Zikes [Mon, 14 May 2018 16:03:34 +0000 (18:03 +0200)]
Enable OrderedEnqueuer from keras in tf.keras. (#19183)

6 years agoMake op unique name generation case insensitive (#18413)
Paul Van Eck [Mon, 14 May 2018 15:27:42 +0000 (08:27 -0700)]
Make op unique name generation case insensitive (#18413)

* Make op unique name generation case insensitive

Unique name generation for operations depends on checking a dict for
names currently in use. This commit makes it so that the names stored in
this dict are always lowercase so that we can check if a name already
exists regardless of the capitalization.

This helps in filesystems where file paths are case insensitive and
tensor dumps (like with tfdbg) try to follow directory structures that
correspond to the tensor names. If two tensors have names with the same
spelling, but different capitalizations, then this can lead to unintended
side effects/errors on these case-insensitive file systems.

* Change variable name to match unique_name

* Adjust op names to fix tests

6 years agoAllow for disabling of 2 tests (#18208)
David Norman [Sun, 13 May 2018 02:11:23 +0000 (19:11 -0700)]
Allow for disabling of 2 tests (#18208)

6 years agoFix for crash in mkl_layout_pass_test (#19107)
AG Ramesh [Sun, 13 May 2018 01:35:11 +0000 (18:35 -0700)]
Fix for crash in mkl_layout_pass_test (#19107)

6 years agoUpdate how build statuses and artifacts are demoed in README.md (#19232)
Gunhan Gulsoy [Fri, 11 May 2018 22:44:14 +0000 (15:44 -0700)]
Update how build statuses and artifacts are demoed in README.md (#19232)

6 years agoImprove the shape function for ParameterizedTruncatedNormal (#19215)
Yong Tang [Fri, 11 May 2018 16:48:32 +0000 (09:48 -0700)]
Improve the shape function for ParameterizedTruncatedNormal (#19215)

The parameters of ParameterizedTruncatedNormal should
be 0-D or 1-D, which is checked in ther kernel functions.
There is no check in the shape function of the ops.

This fix improves the shape function and checks the
parameters of ParameterizedTruncatedNormal whever possible.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAllow for disabling of some tests (#19202)
David Norman [Fri, 11 May 2018 16:40:34 +0000 (09:40 -0700)]
Allow for disabling of some tests (#19202)

6 years agoFix cublas wrap macro for cublasGemmBatchedEx (#19210)
Achal Shah [Fri, 11 May 2018 00:43:30 +0000 (17:43 -0700)]
Fix cublas wrap macro for cublasGemmBatchedEx (#19210)

6 years agoFix typo (#19106)
ManHyuk [Thu, 10 May 2018 21:11:43 +0000 (06:11 +0900)]
Fix typo (#19106)

* fix typo

6 years agoMerge pull request #18759 from filipefilardi/master
Martin Wicke [Thu, 10 May 2018 19:20:12 +0000 (12:20 -0700)]
Merge pull request #18759 from filipefilardi/master

Add Pull Request Template

6 years agoUse "```" (backtick) for code blocks in adding_an_op.md (#19187)
Yong Tang [Thu, 10 May 2018 18:38:04 +0000 (11:38 -0700)]
Use "```" (backtick) for code blocks in adding_an_op.md (#19187)

* Use "```" (backtick) for code blocks in adding_an_op.md

In adding_an_op.md, most of the code blocks uses "```" (backtick)
and annotations are added automatically. Though there was one
place where the code block are done with manual html code. This
is really error-prune and hard to change if there is an update
in the future.

This fix converts to "```c++" (backticks) so that it is easy
to maintain in the future.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix extra `\` at the beginning of the block

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

add new lines where the <br/> tags were.

6 years agoFixing util_cuda_kernel_helper_test_gpu when building with MKL enabled (#19185)
Mahmoud Abuzaina [Thu, 10 May 2018 18:37:19 +0000 (11:37 -0700)]
Fixing util_cuda_kernel_helper_test_gpu when building with MKL enabled (#19185)

6 years agoFix default value for parameter 'prefix' in slim.tfexample_decoder.BoundingBox.__init...
P-Hidringer [Thu, 10 May 2018 18:36:57 +0000 (03:36 +0900)]
Fix default value for parameter 'prefix' in slim.tfexample_decoder.BoundingBox.__init__ (#19190)

6 years agoAdd GPU support for float16 batched matmul (#18436)
Ben Barsdell [Thu, 10 May 2018 18:06:01 +0000 (11:06 -0700)]
Add GPU support for float16 batched matmul (#18436)

* Add GPU support for float16 batched matmul

- Uses cublasGemmBatchedEx introduced in CUDA 9.1.
- Includes support for Tensor Op math.
- Falls back to a loop over non-batched gemm calls on older CUDA
  versions or GPU architectures.

* Refactor GPU batched gemm into one internal func

6 years agoMerge pull request #17927 from smitshilu/patch-1
andrehentz [Thu, 10 May 2018 17:55:23 +0000 (10:55 -0700)]
Merge pull request #17927 from smitshilu/patch-1

Update tensorflow/contrib/lite/BUILD

6 years agoMerge pull request #19197 from smitshilu/patch-4
Amit Patankar [Thu, 10 May 2018 17:12:32 +0000 (10:12 -0700)]
Merge pull request #19197 from smitshilu/patch-4

Updated index.md

6 years agoAdd citation (#19201)
Sergio Guadarrama [Thu, 10 May 2018 16:08:43 +0000 (09:08 -0700)]
Add citation (#19201)

6 years agoFix warning in python 3 with deprecated inspect.getargspec (#19199)
Yong Tang [Thu, 10 May 2018 16:07:44 +0000 (09:07 -0700)]
Fix warning in python 3 with deprecated inspect.getargspec (#19199)

This fix tries to address the issue raised in 16152 where
a warning will show up in python 3 with:
```
import tensorflow as tf

import warnings
warnings.filterwarnings('error')

tf.reduce_sum(tf.placeholder(tf.float64))
......
DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
```

This fixes the issue with getfullargspec in tf_export, which takes
into consideration the python 2 vs python3.

This fix fixes 16152.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdated index.md
Smit Shilu [Thu, 10 May 2018 13:19:31 +0000 (09:19 -0400)]
Updated index.md

Tensorflow lite image was not visible. Added image file path

6 years ago[INTEL MKL] Fixes a failure in //tensorflow/python/profiler:model_analyzer_test....
AG Ramesh [Wed, 9 May 2018 16:51:10 +0000 (09:51 -0700)]
[INTEL MKL] Fixes a failure in //tensorflow/python/profiler:model_analyzer_test. (#19152)

* Modified  testComplexCodeView test

 Modified  testComplexCodeView to look for lower total_float_ops. The value of total_float_ops is lower when Tensorflow is compiled with Intel MKL.

* Added code to check if MKL is enabled

* Fixed Pylint errors

6 years agoFix 2 typos in documents (#19177)
Letian Feng [Wed, 9 May 2018 16:50:57 +0000 (18:50 +0200)]
Fix 2 typos in documents (#19177)

* fix minor typo in doc: tf.layer to tf.layers

* removed a duplicated line

6 years agoGrammar fixes for Programmers guide FAQ (#19170)
ctiijima [Wed, 9 May 2018 16:50:48 +0000 (09:50 -0700)]
Grammar fixes for Programmers guide FAQ (#19170)

6 years agoEnable test case for float64 with conv1d (#19179)
Yong Tang [Wed, 9 May 2018 15:55:19 +0000 (08:55 -0700)]
Enable test case for float64 with conv1d (#19179)

The float64 for conv2d support has been added to tensorflow
in e3468b56d323783fdfb79fa2d6c24effc58bcaa9. (Thanks brianwa84!)
Since conv1d implementation invokes conv2d, the float64 support
for conv1d is supported now as well.

This fix adds the test case for float64 support of conv1d and
removes the TODO.

This fix fixes 19175.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #19164 from yifeif/branch_195897321
Yifei Feng [Wed, 9 May 2018 04:59:43 +0000 (21:59 -0700)]
Merge pull request #19164 from yifeif/branch_195897321

Branch 195897321

6 years agoMerge pull request #19165 from tensorflow/update_version_fix
Yifei Feng [Wed, 9 May 2018 01:24:40 +0000 (18:24 -0700)]
Merge pull request #19165 from tensorflow/update_version_fix

Switch to use str instead of number for colab_url

6 years agoSwitch to use str instead of number for colab_url
Yifei Feng [Wed, 9 May 2018 00:35:21 +0000 (17:35 -0700)]
Switch to use str instead of number for colab_url

Fix nightly failure:
  File "tensorflow/tools/ci_build/update_version.py", line 253, in colab_url
    version_string = "%d.%d.%d" % (version.major, version.minor, version.patch)
TypeError: %d format: a number is required, not str

6 years agoHardcode EndpointSpec deprecated input to False for now after cl/195718061.
Yifei Feng [Wed, 9 May 2018 00:16:45 +0000 (17:16 -0700)]
Hardcode EndpointSpec deprecated input to False for now after cl/195718061.

6 years agoMerge commit for internal changes
Yifei Feng [Wed, 9 May 2018 00:14:55 +0000 (17:14 -0700)]
Merge commit for internal changes

6 years agoMake eager functions runable on TPU
Igor Ganichev [Tue, 8 May 2018 23:43:54 +0000 (16:43 -0700)]
Make eager functions runable on TPU

PiperOrigin-RevId: 195897321

6 years agoSet size of tensorflow/python/keras:normalization_test to medium to avoid flaky timeouts
A. Unique TensorFlower [Tue, 8 May 2018 23:23:27 +0000 (16:23 -0700)]
Set size of tensorflow/python/keras:normalization_test to medium to avoid flaky timeouts

PiperOrigin-RevId: 195894737

6 years agoOnly use integer values for event_ndims.
A. Unique TensorFlower [Tue, 8 May 2018 23:20:02 +0000 (16:20 -0700)]
Only use integer values for event_ndims.

event_ndims have the semantics of being an integer. However, other code paths (such as const_value)
can return back numpy wrapped arrays, which can mess with how values are cached. Instead extract
everything as an integer.

PiperOrigin-RevId: 195894216

6 years agoadd test for pruning useless function lib in graph.
A. Unique TensorFlower [Tue, 8 May 2018 23:16:57 +0000 (16:16 -0700)]
add test for pruning useless function lib in graph.

PiperOrigin-RevId: 195893756

6 years agoAdd test to test suite.
A. Unique TensorFlower [Tue, 8 May 2018 22:43:34 +0000 (15:43 -0700)]
Add test to test suite.

PiperOrigin-RevId: 195888932

6 years agoIncrease shard count of tensorflow/contrib/learn:state_saving_rnn_estimator_test...
A. Unique TensorFlower [Tue, 8 May 2018 22:34:40 +0000 (15:34 -0700)]
Increase shard count of tensorflow/contrib/learn:state_saving_rnn_estimator_test to avoid flaky timeouts

PiperOrigin-RevId: 195887546

6 years agoIncrease size of tensorflow/contrib/distributions:batch_reshape_test to medium to...
A. Unique TensorFlower [Tue, 8 May 2018 22:33:37 +0000 (15:33 -0700)]
Increase size of tensorflow/contrib/distributions:batch_reshape_test to medium to avoid flaky timeouts

PiperOrigin-RevId: 195887374

6 years ago[tfgan] Allow to add custom eval metrics to GANEstimator (#19133)
Lukas Geiger [Tue, 8 May 2018 23:31:39 +0000 (01:31 +0200)]
[tfgan] Allow to add custom eval metrics to GANEstimator (#19133)

6 years ago[tftrt update] (#19135)
jjsjann123 [Tue, 8 May 2018 23:30:08 +0000 (16:30 -0700)]
[tftrt update] (#19135)

* [tftrt update]
  code cleaning, removed some boilerplate code

* addressing comments

6 years agoIncrease shard count of tensorflow/python/keras:lstm_test to avoid flaky timeouts
A. Unique TensorFlower [Tue, 8 May 2018 22:26:44 +0000 (15:26 -0700)]
Increase shard count of tensorflow/python/keras:lstm_test to avoid flaky timeouts

PiperOrigin-RevId: 195886372

6 years agoAdd missing ":haswell" match to list of platform selectors.
A. Unique TensorFlower [Tue, 8 May 2018 21:50:24 +0000 (14:50 -0700)]
Add missing ":haswell" match to list of platform selectors.

PiperOrigin-RevId: 195880275

6 years agoIncrease shard_count of tensorflow/python/estimator:estimator_test to avoid flaky...
A. Unique TensorFlower [Tue, 8 May 2018 21:45:01 +0000 (14:45 -0700)]
Increase shard_count of tensorflow/python/estimator:estimator_test to avoid flaky asan timeouts

PiperOrigin-RevId: 195879364

6 years agoDo not differentiage integers in the eager API.
Alexandre Passos [Tue, 8 May 2018 21:42:35 +0000 (14:42 -0700)]
Do not differentiage integers in the eager API.

This is similar to the change made in:
https://github.com/tensorflow/tensorflow/commit/f63750645826df65b05cad505546a86f0e347674
for backpropagation during graph construction via tf.gradients()

PiperOrigin-RevId: 195878952

6 years agoIncrease shard count of tensorflow/contrib/distributions:mixture_test to avoid flaky...
A. Unique TensorFlower [Tue, 8 May 2018 21:41:48 +0000 (14:41 -0700)]
Increase shard count of tensorflow/contrib/distributions:mixture_test to avoid flaky timeouts in asan mode

PiperOrigin-RevId: 195878809

6 years agoIncrease size of test tensorflow/contrib/layers:rev_block_lib_test to medium
A. Unique TensorFlower [Tue, 8 May 2018 21:00:48 +0000 (14:00 -0700)]
Increase size of test tensorflow/contrib/layers:rev_block_lib_test to medium
to avoid flaky timeouts.

PiperOrigin-RevId: 195871947

6 years agoAvoid string formatting in assert_same_float_dtype unless there's an error
Allen Lavoie [Tue, 8 May 2018 21:00:30 +0000 (14:00 -0700)]
Avoid string formatting in assert_same_float_dtype unless there's an error

Especially helpful when executing eagerly

PiperOrigin-RevId: 195871887

6 years agoBetter wrapping of stream executor's cuDNN API calls. Replacing mutex locking and...
A. Unique TensorFlower [Tue, 8 May 2018 19:10:36 +0000 (12:10 -0700)]
Better wrapping of stream executor's cuDNN API calls. Replacing mutex locking and setting the cuDNN stream followed by calling wrap::cudnn... with an RAII CudnnHandle object that handles the former two operations.

Distinguish three different API types:

A) APIs that don't take a cudnnHandle_t: These are thread-safe APIs that don't enqueue any CUDA work on a stream. They can be called directly without any extra precautions.

B) APIs that take a cudnnHandle_t and perform CUDA work. The CUDA context needs to be acquired and the stream needs to be set beforehand, calls need to be serialized. A CudnnHandle instance guarantees that this work has been performed before calling cuDNN.

C) APIs that do take a cudnnHandle_t, but (presumably, the API makes no guarantees) still don't perform any CUDA work. This is limited to the API to setup RNN descriptors. Calls need to be serialized, but most likely we wouldn't need to acquire the CUDA context or set the stream. We still do though using the legacy default stream, because there are no guarantees.

PiperOrigin-RevId: 195856300

6 years agoRemove outdated CUDA SDK string (the text is now consistent with other version choice...
A. Unique TensorFlower [Tue, 8 May 2018 19:04:38 +0000 (12:04 -0700)]
Remove outdated CUDA SDK string (the text is now consistent with other version choices, and the '9.0' format is already present in the default).

PiperOrigin-RevId: 195855416

6 years agoRe-land: Optimize dot(DynamicSlice(ConstA), ConstantB) by memoizing dot(ConstA, ConstB)
Alina Sbirlea [Tue, 8 May 2018 18:54:03 +0000 (11:54 -0700)]
Re-land: Optimize dot(DynamicSlice(ConstA), ConstantB) by memoizing dot(ConstA, ConstB)

Make transformation when ConstA and ConstB are 2D, and DynamicSlice is slicing a full row, column respectively.
Handle:
dot(DynamicSlice(Index, ConstA), ConstB) => DynamicSlice(Index, dot*(ConstA, ConstB));
and
dot(ConstA, DynamicSlice(Index, ConstB)) => DynamicSlice(Index, dot*(ConstA, ConstB));

Reason to roll forward: Previous issue of getting out of memory errors when generating LLVM constants was resolved by CSE-ing constants before allocation.

PiperOrigin-RevId: 195853680

6 years agoFix docstring for flush() method
A. Unique TensorFlower [Tue, 8 May 2018 18:45:53 +0000 (11:45 -0700)]
Fix docstring for flush() method

PiperOrigin-RevId: 195852402

6 years agoUpdate version of downloadable clang toolchain
Ilya Biryukov [Tue, 8 May 2018 18:25:50 +0000 (11:25 -0700)]
Update version of downloadable clang toolchain

PiperOrigin-RevId: 195849091

6 years agoChange visibility of hlo_proto.
A. Unique TensorFlower [Tue, 8 May 2018 18:19:46 +0000 (11:19 -0700)]
Change visibility of hlo_proto.

PiperOrigin-RevId: 195848035

6 years agoAdd affinity binding functionality and documentation to OVIC benchmarker.
A. Unique TensorFlower [Tue, 8 May 2018 18:15:53 +0000 (11:15 -0700)]
Add affinity binding functionality and documentation to OVIC benchmarker.

PiperOrigin-RevId: 195847378

6 years agoIncrease size of test //third_party/tensorflow/python:saver_large_variable_test
A. Unique TensorFlower [Tue, 8 May 2018 18:12:07 +0000 (11:12 -0700)]
Increase size of test //third_party/tensorflow/python:saver_large_variable_test
from "small" to "medium" to prevent flaky timeouts.

PiperOrigin-RevId: 195846802

6 years agoFix Raspberry Pi build by making PNG not try to use Neon (by autodetect).
Andrew Selle [Tue, 8 May 2018 18:10:23 +0000 (11:10 -0700)]
Fix Raspberry Pi build by making PNG not try to use Neon (by autodetect).

This involves patching to override the png neon option. In the future
it might be worth enabling PNG optimization.

PiperOrigin-RevId: 195846513

6 years agoWhen building functions, capture tensors in `internal_convert_to_tensor`.
Akshay Agrawal [Tue, 8 May 2018 18:07:45 +0000 (11:07 -0700)]
When building functions, capture tensors in `internal_convert_to_tensor`.

This change is motivated by the fact that, when eager execution is disabled, library functions assume that tensors returned from `internal_convert_to_tensor` are in fact `Tensor`s and not `EagerTensor`s.

PiperOrigin-RevId: 195846039

6 years agoAdd cost model of depthwiseConv2dNative. Tensorflow computes depthwise separable...
A. Unique TensorFlower [Tue, 8 May 2018 17:25:30 +0000 (10:25 -0700)]
Add cost model of depthwiseConv2dNative. Tensorflow computes depthwise separable convolutions as depthwiseConv2dNative followed by 1x1 Conv2D

PiperOrigin-RevId: 195838887

6 years agoFree ANeuralNetworksCompilation object in NNAPIDelegate destructor
A. Unique TensorFlower [Tue, 8 May 2018 16:46:45 +0000 (09:46 -0700)]
Free ANeuralNetworksCompilation object in NNAPIDelegate destructor

PiperOrigin-RevId: 195832807

6 years agoMinor formatting tweaks to distribute.py and simple_tfkeras_example.py
Shanqing Cai [Tue, 8 May 2018 16:04:17 +0000 (09:04 -0700)]
Minor formatting tweaks to distribute.py and simple_tfkeras_example.py

PiperOrigin-RevId: 195827029

6 years agoUpdate comment clarifying continuous eval behavior.
A. Unique TensorFlower [Tue, 8 May 2018 15:57:45 +0000 (08:57 -0700)]
Update comment clarifying continuous eval behavior.

PiperOrigin-RevId: 195826025

6 years ago[TF:XLA] Fix NaN in StatelessRandomNormal if the underlying uniform distribution...
Peter Hawkins [Tue, 8 May 2018 15:07:08 +0000 (08:07 -0700)]
[TF:XLA] Fix NaN in StatelessRandomNormal if the underlying uniform distribution returned -1.

PiperOrigin-RevId: 195819645

6 years agoAutomated g4 rollback of changelist 195723288
A. Unique TensorFlower [Tue, 8 May 2018 15:04:07 +0000 (08:04 -0700)]
Automated g4 rollback of changelist 195723288

PiperOrigin-RevId: 195819297

6 years agoAdd missing #include for OpResponse. This class currently happens to be forward
A. Unique TensorFlower [Tue, 8 May 2018 14:57:12 +0000 (07:57 -0700)]
Add missing #include for OpResponse. This class currently happens to be forward
declared by xla.proto.h, but that proto doesn't actually need this type
anywhere and we are working on removing such unneeded forward declarations.

PiperOrigin-RevId: 195818397

6 years agoProfileHandler: Remove unnecessary interface method.
Asim Shankar [Tue, 8 May 2018 14:28:43 +0000 (07:28 -0700)]
ProfileHandler: Remove unnecessary interface method.
PiperOrigin-RevId: 195815565

6 years agoFix a test expectation.
A. Unique TensorFlower [Tue, 8 May 2018 10:26:06 +0000 (03:26 -0700)]
Fix a test expectation.

PiperOrigin-RevId: 195796348

6 years agoAutomated g4 rollback of changelist 195748721
A. Unique TensorFlower [Tue, 8 May 2018 09:11:52 +0000 (02:11 -0700)]
Automated g4 rollback of changelist 195748721

PiperOrigin-RevId: 195790581

6 years agoTemporarily disable concat rewrite.
A. Unique TensorFlower [Tue, 8 May 2018 02:56:26 +0000 (19:56 -0700)]
Temporarily disable concat rewrite.

PiperOrigin-RevId: 195762860

6 years ago[tf.data] Move tensorflow::dataset::MakeIteratorContext to core/framework
Brennan Saeta [Tue, 8 May 2018 01:31:47 +0000 (18:31 -0700)]
[tf.data] Move tensorflow::dataset::MakeIteratorContext to core/framework

PiperOrigin-RevId: 195756342

6 years agoMerge pull request #19053 from wangsiyu/fix_tf_layers_reuse
Martin Wicke [Tue, 8 May 2018 19:38:56 +0000 (12:38 -0700)]
Merge pull request #19053 from wangsiyu/fix_tf_layers_reuse

Fix bug of declaring regularization loss multiple times when reusing PartitionedVariables in tf layers

6 years agoremove type
wangsiyu [Tue, 8 May 2018 07:50:36 +0000 (15:50 +0800)]
remove type

6 years agofix bug of return value in _should_add_regularizer function and refine code in base_t...
wangsiyu [Tue, 8 May 2018 07:46:38 +0000 (15:46 +0800)]
fix bug of return value in _should_add_regularizer function and refine code in base_test.py to make it no more than 80 columns

6 years agoeliminate result variable in _should_add_regularizer to make code clean
wangsiyu [Tue, 8 May 2018 04:58:27 +0000 (12:58 +0800)]
eliminate result variable in _should_add_regularizer to make code clean

6 years agorefine unit test case coding style and move _should_add_regularizer function into...
wangsiyu [Tue, 8 May 2018 02:54:04 +0000 (10:54 +0800)]
refine unit test case coding style and move _should_add_regularizer function into add_weight

6 years agoAdd logic for StridedSlice ops in ShapeRefiner::ConstantPartialShape().
Skye Wanderman-Milne [Tue, 8 May 2018 00:28:41 +0000 (17:28 -0700)]
Add logic for StridedSlice ops in ShapeRefiner::ConstantPartialShape().

This mimics the logic in tensor_util.constant_value_as_shape, allowing
the C++ shape inference code to infer more shapes than it could before.

This change also adds an optional stride argument to InferenceContext::Subshape().

PiperOrigin-RevId: 195749522

6 years agoMake conv2d_tranpose_test.py work with C API shapes enabled.
Skye Wanderman-Milne [Tue, 8 May 2018 00:24:28 +0000 (17:24 -0700)]
Make conv2d_tranpose_test.py work with C API shapes enabled.

The C API provides more accurate shape information in many cases.

PiperOrigin-RevId: 195749030

6 years agoMake eager functions runable on TPU
Igor Ganichev [Tue, 8 May 2018 00:21:53 +0000 (17:21 -0700)]
Make eager functions runable on TPU

PiperOrigin-RevId: 195748721

6 years agoRaise an error if we try to take the gradient wrt to the initial value of a loop...
Skye Wanderman-Milne [Tue, 8 May 2018 00:21:39 +0000 (17:21 -0700)]
Raise an error if we try to take the gradient wrt to the initial value of a loop variable.

Fixes #14101

PiperOrigin-RevId: 195748688

6 years agoInternal change
Blake Hechtman [Tue, 8 May 2018 00:00:27 +0000 (17:00 -0700)]
Internal change

PiperOrigin-RevId: 195745819

6 years agoAdd test with tf.cond.
Jacques Pienaar [Mon, 7 May 2018 23:59:41 +0000 (16:59 -0700)]
Add test with tf.cond.

PiperOrigin-RevId: 195745718

6 years agoDelete kTransposeDot (it is no longer in use)
Sanjoy Das [Mon, 7 May 2018 23:55:10 +0000 (16:55 -0700)]
Delete kTransposeDot (it is no longer in use)

PiperOrigin-RevId: 195745124

6 years agoFast-path to VarHandleOp
Alexandre Passos [Mon, 7 May 2018 23:49:44 +0000 (16:49 -0700)]
Fast-path to VarHandleOp

PiperOrigin-RevId: 195744374

6 years agoAdd TFX section. Add Ecosystem page and dropdown menu.
Billy Lamberta [Mon, 7 May 2018 23:38:02 +0000 (16:38 -0700)]
Add TFX section. Add Ecosystem page and dropdown menu.

PiperOrigin-RevId: 195742728

6 years agoReorder executor NodeItem variable length data section so
A. Unique TensorFlower [Mon, 7 May 2018 23:31:07 +0000 (16:31 -0700)]
Reorder executor NodeItem variable length data section so
that all multi-byte aligned types precede all byte-aligned
types so that alignment is satisfied without padding.

PiperOrigin-RevId: 195741712

6 years agoShapeRefiner fix: some variant-type tensors have handle data.
Skye Wanderman-Milne [Mon, 7 May 2018 23:16:32 +0000 (16:16 -0700)]
ShapeRefiner fix: some variant-type tensors have handle data.

ShapeRefiner::AddNode() would only propagate handle data for
DT_RESOURCE tensors, but not DT_VARIANT. The Python shape inference
logic in common_shapes.py handled this correct, which is why we didn't
notice this earlier. In particular, list ops use DT_VARIANT with
handle data.
PiperOrigin-RevId: 195739586

6 years agoRefactor TensorArray to avoid copies and memory allocations when executing eagerly.
Akshay Agrawal [Mon, 7 May 2018 23:16:24 +0000 (16:16 -0700)]
Refactor TensorArray to avoid copies and memory allocations when executing eagerly.

With this change, writes to TensorArrays when eager execution is enabled take O(1) time instead of O(n). Additionally, whereas writing to a TensorArray when constructing a graph results in allocating a new Python TensorArray object, writing to a TensorArray with eager enabled no longer performs that allocation (graph construction uses these allocations to ensure correctness of control flow and gradients, but this isn't necessary when executing eagerly). Finally, this change also removes the artificial write-once semantics of TensorArrays when executing eagerly.

PiperOrigin-RevId: 195739572

6 years ago[XLA] Make post order a possible schedule as it sometimes uses less memory than
Blake Hechtman [Mon, 7 May 2018 22:58:29 +0000 (15:58 -0700)]
[XLA] Make post order a possible schedule as it sometimes uses less memory than
the DFS or list scheduler and it is very simple.

PiperOrigin-RevId: 195736916

6 years ago[Remote functions] Only set the default runner *after* resolving the remote FLR.
Derek Murray [Mon, 7 May 2018 22:51:05 +0000 (15:51 -0700)]
[Remote functions] Only set the default runner *after* resolving the remote FLR.

Previously, if the `runner` was not specified for a function
execution, we would immediately set it to the default runner of the
*local* FLR, even if the function was to be executed remotely. This
change postpones the resolution of the default runner until after the
function invocation has been routed to the FLR that will actually
execute it.

As a result, we avoid the pathological case where a GPU device using a
private threadpool (TF_GPU_THREAD_MODE=gpu_private) ends up running
all of the ops for the CPU-side input pipeline on the private
threadpool.

PiperOrigin-RevId: 195735734

6 years agoAdd EvaluateNodes to tests: RemoveIdentityTransposesMultipleOutputs, RemoveTransposes...
A. Unique TensorFlower [Mon, 7 May 2018 22:47:57 +0000 (15:47 -0700)]
Add EvaluateNodes to tests: RemoveIdentityTransposesMultipleOutputs, RemoveTransposesWithControlDependency, CombineBitcasts, CombineAndRemoveBitcasts, RemoveRedundantCast

PiperOrigin-RevId: 195735234

6 years ago[XLA] Fix a "we're we're" in the operation semantics.
Michael Kuperstein [Mon, 7 May 2018 22:41:52 +0000 (15:41 -0700)]
[XLA] Fix a "we're we're" in the operation semantics.

PiperOrigin-RevId: 195734316

6 years agoAdd support for select (via tf.where) support to tflite.
A. Unique TensorFlower [Mon, 7 May 2018 22:41:22 +0000 (15:41 -0700)]
Add support for select (via tf.where) support to tflite.

PiperOrigin-RevId: 195734246

6 years agoInternal Change.
Michael Case [Mon, 7 May 2018 22:24:02 +0000 (15:24 -0700)]
Internal Change.

PiperOrigin-RevId: 195731675

6 years agoFix TypeError in update_version.py
Michael Case [Mon, 7 May 2018 22:20:49 +0000 (15:20 -0700)]
Fix TypeError in update_version.py

PiperOrigin-RevId: 195731183

6 years agoAdd support for tf.data.Dataset iterators in model training/eval methods in eager...
Pavithra Vijay [Mon, 7 May 2018 22:16:59 +0000 (15:16 -0700)]
Add support for tf.data.Dataset iterators in model training/eval methods in eager-mode

PiperOrigin-RevId: 195730534

6 years agoReplace references to TensorInfo with XlaTensor
Igor Ganichev [Mon, 7 May 2018 22:15:01 +0000 (15:15 -0700)]
Replace references to TensorInfo with XlaTensor

PiperOrigin-RevId: 195730139