platform/upstream/tensorflow.git
6 years agoFix LINT.IfChange comment
gracehoney [Fri, 9 Feb 2018 17:47:58 +0000 (09:47 -0800)]
Fix LINT.IfChange comment

6 years agoFix more build dependencies and includes.
gracehoney [Fri, 9 Feb 2018 16:46:15 +0000 (08:46 -0800)]
Fix more build dependencies and includes.

6 years agoMake build happy by adding missing OP_REQUIRES_OK and if_tensorrt
gracehoney [Fri, 9 Feb 2018 15:53:43 +0000 (07:53 -0800)]
Make build happy by adding missing OP_REQUIRES_OK and if_tensorrt

6 years agoMerge branch 'master' into tensorrt
Sami Kama [Fri, 9 Feb 2018 00:44:57 +0000 (16:44 -0800)]
Merge branch 'master' into tensorrt

6 years ago[cleanup]
Jie [Thu, 8 Feb 2018 21:12:31 +0000 (13:12 -0800)]
[cleanup]
  remove TRT_ShapedWeights owned_values_
    fallback to converter temporary memory allocation to avoid redundant memcpy

6 years agoMerge pull request #16874 from jhseu/revert
Jonathan Hseu [Thu, 8 Feb 2018 20:32:40 +0000 (12:32 -0800)]
Merge pull request #16874 from jhseu/revert

Revert "Fix missing . (#16460)"

6 years agoRevert "Fix missing . (#16460)"
Jonathan Hseu [Thu, 8 Feb 2018 20:30:53 +0000 (12:30 -0800)]
Revert "Fix missing . (#16460)"

This reverts commit 5e23338fec26f0c5ad588742b8df80e5bf1a940d.

6 years agoFix missing . (#16460)
matthieudelaro [Thu, 8 Feb 2018 20:17:37 +0000 (21:17 +0100)]
Fix missing . (#16460)

6 years agofix typo (#16812)
Johnson145 [Thu, 8 Feb 2018 20:16:52 +0000 (21:16 +0100)]
fix typo (#16812)

6 years agoMove some ndlstm functions to contrib (#16816)
Jerome [Thu, 8 Feb 2018 20:16:38 +0000 (04:16 +0800)]
Move some ndlstm functions to contrib (#16816)

* Added ctc_loss_dense_labels. This does the conversion of dense labels into sparse ones to be passed into the core ctc_loss function.

* Removed constant_op from the import.

* Matched ctc_loss_dense_labels with the other layers ops.

* Added ctc_loss_dense_labels to contrib.layers __init__.py file

* Added missing comma to list of ops.

* Reordred arguments for ctc_loss_dense_labels

Labels should be first then inputs for ctc_loss.

* Removed ctc_loss_dense_labels.

Replaced it with dense_to_sparse instead so that there'll be only one ctc_loss function.

* Replaced ctc_loss_dense_labels with dense_to_sparse

* Fixed dense_to_sparse. Some of the names of the variables did not match with that of the parameters.

* Updated documentation for dense_to_sparse since it can accept a tensor of any shape.

* Added test case for dense_to_sparse.

* Updated documentation. Dense to sparse accepts int tensors.

* Fixed testDenseFromConstantToSparse.

The sparse_to_dense order of arguments in the test are wrong and the expected constant should be of int64.

* Modified implementation of ndlstm_base_dynamic.

It now uses a BasicLSTMCell that has state_is_tuple=True to address deprecation. Right now it is still unknown why it was set to false in the first place.

* Imported lstm1d and lstm2d in ndlstm __init__.py.

Makes importing ndlstm modules easier.

* Added testGetBlocks in lstm2d_test.

* Removed testGetBlocks.py

* Modified lstm1d.ndlstm_base_unrolled to use lstm_cell with state_is_tuple = True.

* Copied some lstm2d.py functions in ndlstm module to contrib.layers.

* Update lstm1d.py

Reverted changes made.

* Update layers_test.py

Fixed failing test.

* Modified layers.py and layers_test.py.

Made them pass pylint tests.

6 years agoFix two links. (#16854)
Liang-Chi Hsieh [Thu, 8 Feb 2018 19:32:10 +0000 (04:32 +0900)]
Fix two links. (#16854)

6 years ago[clang-format]
Jie [Thu, 8 Feb 2018 19:16:08 +0000 (11:16 -0800)]
[clang-format]

6 years ago[update]
Jie [Thu, 8 Feb 2018 19:09:53 +0000 (11:09 -0800)]
[update]
  Avoid access of data to comply to internal build

6 years agoremove keep_dims warning in maxout layer (#16769)
Haichen "HC" Li [Thu, 8 Feb 2018 18:55:47 +0000 (13:55 -0500)]
remove keep_dims warning in maxout layer (#16769)

6 years agoFixing assert message for beta distribution (#16786)
lazypanda1 [Thu, 8 Feb 2018 18:54:57 +0000 (12:54 -0600)]
Fixing assert message for beta distribution (#16786)

6 years agopython 2.7 unit test error repair on windows (#16725)
fo40225 [Thu, 8 Feb 2018 18:54:31 +0000 (02:54 +0800)]
python 2.7 unit test error repair on windows (#16725)

* python 2.7 unit test error repair on windows

* Fix lint error.

6 years agoAdd option to not include histograms (#16579)
Ben [Thu, 8 Feb 2018 18:49:23 +0000 (13:49 -0500)]
Add option to not include histograms (#16579)

* Add option to not include histograms

* Add test for model_summaries=False

6 years agoAdds parameter 'msg' to tf.TensorFlowTestCase. (#16667)
Phil [Thu, 8 Feb 2018 18:48:42 +0000 (19:48 +0100)]
Adds parameter 'msg' to tf.TensorFlowTestCase. (#16667)

This commit adds a msg parameter that defaults to None to the following
functions:
- assertProtoEquals
- assertArrayNear
- assertNDArrayNear
- assertAllClose
- assertAllEqual
- assertShapeEqual
- assertDeviceEqual

6 years agoFixes variable name (#16797)
Rajendra arora [Thu, 8 Feb 2018 18:48:19 +0000 (00:18 +0530)]
Fixes variable name (#16797)

* Fixes variable typo name

* fixes optional typo

* Fix typo

* fixes deallocations

* typo fix

* typo fix

* fixes variable name

* fixes param typo

* Fixes typo

* fix typo

* fixes

6 years agoUpdate CONTRIBUTING.md (#16806)
Brad Wannow [Thu, 8 Feb 2018 18:47:34 +0000 (12:47 -0600)]
Update CONTRIBUTING.md (#16806)

* Update CONTRIBUTING.md

Edited a few grammar issues.

* Fix

6 years agoFix error message in record_reader (#16808)
Glenn Weidner [Thu, 8 Feb 2018 18:46:12 +0000 (10:46 -0800)]
Fix error message in record_reader (#16808)

6 years agoMake configure script more lenient to the length of CUDA and cuDNN versions entered...
Gunhan Gulsoy [Thu, 8 Feb 2018 18:45:37 +0000 (10:45 -0800)]
Make configure script more lenient to the length of CUDA and cuDNN versions entered. (#16853)

6 years agoImprove shape function of SampleDistortedBoundingBox and fix some test cases (#16870)
Yong Tang [Thu, 8 Feb 2018 18:41:03 +0000 (10:41 -0800)]
Improve shape function of SampleDistortedBoundingBox and fix some test cases (#16870)

* Update test case to expose the issue of sample_distorted_bounding_box

This commit expoes the issue of sample_distorted_bounding_box,
as shape function does not check the ranking like inside Compute().

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Adjust shape to pass the test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Improve shape function of SampleDistortedBoundingBox and fix some test cases

This fix tries to improve the shape function of SampleDistortedBoundingBox
and fix several test case issues.
As is shown in the kernel of SampleDistortedBoundingBox, the shape of
SampleDistortedBoundingBox are required to be 1-D `[height, width, channels]`
for image_size, 3-D with shape `[batch, N, 4]` for bounding_boxes.

In the test case, the uses shape is incorrect but becasue of no check in shape
function, the test case passes.

This fix adds the shape check for SampleDistortedBoundingBox, and
fixes the incorrect test cases.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix broken link in CONTRIBUTING.md (#16869)
Yong Tang [Thu, 8 Feb 2018 18:35:08 +0000 (10:35 -0800)]
Fix broken link in CONTRIBUTING.md (#16869)

This fix fixes the broken link in CONTRIBUTING.md.
Without `https://`, the markdown will render the link incorrectly to
https://github.com/tensorflow/tensorflow/blob/master/www.docker.com

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix static shape inference for keras.layers.LSTM (#15234)
Yan Facai (颜发才) [Thu, 8 Feb 2018 16:59:08 +0000 (00:59 +0800)]
Fix static shape inference for keras.layers.LSTM (#15234)

* TST: add test case

* BUG: fix static shape inference

* TST: clean code

* BUG: support dims > 3

6 years agoEnable some passes for graph_transform on Windows (#16121)
Scott Tseng [Thu, 8 Feb 2018 16:58:36 +0000 (00:58 +0800)]
Enable some passes for graph_transform on Windows (#16121)

* Enable some passes for graph_transform on Windows

Don't know why but the following passes are disabled on Windows:

* quantize_weights
* quantize_nodes
* round_weights

This patch re-enabled them.

* Fix BUILD file in response to format checker

6 years agopy_func convert unicode string results to bytes for python2 (#16322)
Yan Facai (颜发才) [Thu, 8 Feb 2018 16:54:08 +0000 (00:54 +0800)]
py_func convert unicode string results to bytes for python2 (#16322)

* TST: add test case

* BUG: allow unicode string for python 2

* DOC: revise doc

* Fix lint error

6 years ago[debug]
Jie [Thu, 8 Feb 2018 05:31:25 +0000 (21:31 -0800)]
[debug]
  convert const data goes out of scope.

6 years agoAdd optimized gif support for decode_gif (#16804)
Yong Tang [Thu, 8 Feb 2018 00:48:21 +0000 (16:48 -0800)]
Add optimized gif support for decode_gif (#16804)

* Add optimized gif support for decode_gif

While revisiting the issue of 15838, I noticed that
currently optimized gif is not supported. However,
optimized gif is actually possible to be processed
as essentially the subsequent frame just adds
the content on top of the previous frame on canvas.

This fix adds the support for optimized gif with decode_gif.

As is shown in the added test case, optimized gif (`optimized.gif`)
could be handled the same way as original gif (`scan.gif`).

This fix fixes 15838.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Format gif_io.cc with clang-format -i --style=Google

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case to cover optimized gif support for decode_gif.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add `#include <algorithm>` to fix Windows build errors

This commit add `#include <algorithm>` to fix
build errors on Windows platform.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd uint32 and uint64 kernel support for `Invert` (#15154)
Yong Tang [Thu, 8 Feb 2018 00:48:00 +0000 (16:48 -0800)]
Add uint32 and uint64 kernel support for `Invert` (#15154)

* Add uint32 and uint64 kernel support for `Invert`

This fix adds uint32 and uint64 kernel support for `Invert`.

In bitwise_ops.cc, uint32 and uint64 have been registered
for `Invert` like other bitwise ops
`BitwiseAnd`/`BitwiseOr`/`BitwiseXor`/`LeftShift`/`RightShift`.
However, no uint32 and uint64 kernels available for `Invert` yet.

This fix add uint32 and uint64 kernel for `Invert`,
and adds additional test cases to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for uint32 and uint64 support with `Invert`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add missing uint32 and uint64 in GPU for invert

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add DEFINE_UNARY8 for invert

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoSupport CopyFile with streaming (#12658)
Yong Tang [Thu, 8 Feb 2018 00:46:31 +0000 (16:46 -0800)]
Support CopyFile with streaming (#12658)

* Support CopyFile with streaming

This fix tries to address the issue raised in 12641 where
it was not possible to have CopyFile with streaming. The original
implementation copies the whole content of the file to a string
buffer and write to the file. This could be an issue
if the file size is large (than memory of the host).

This fix streams the CopyFile operation.

This fix fixes 12641.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Use sendfile for CopyFile implementation in Linux

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Merge CopyFile for same fs and different fs

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* `sendfile64` -> `sendfile` to fix Android build

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add sendfile processing for Darwin

This commit adds sendfile processing for OSX Darwin.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Not using sendfile in MacOSX

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Remove the size check and test OUT_OF_RANGE instead.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Rename CopyFile to FileSystemCopyFile to fix Windows build errors

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoresolve undefined name array_ops (#16485)
cclauss [Thu, 8 Feb 2018 00:35:29 +0000 (01:35 +0100)]
resolve undefined name array_ops (#16485)

6 years agoFix document typo (#16489)
Yusuke Yamada [Thu, 8 Feb 2018 00:35:13 +0000 (09:35 +0900)]
Fix document typo (#16489)

6 years agoFix undefined name: import as_str_any for line 35 (#16668)
cclauss [Thu, 8 Feb 2018 00:28:06 +0000 (01:28 +0100)]
Fix undefined name: import as_str_any for line 35 (#16668)

flake8 testing of https://github.com/tensorflow/tensorflow on Python 2.7.14

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./tensorflow/python/util/compat_internal.py:33:12: F821 undefined name 'as_str_any'
    path = as_str_any(path.__fspath__())
           ^
```

6 years agoFixed a typo in `group_by_window` documentation (#16711)
Sergei Lebedev [Thu, 8 Feb 2018 00:26:36 +0000 (01:26 +0100)]
Fixed a typo in `group_by_window` documentation (#16711)

6 years agoCMake (Windows): Added support for ninja build and some fixes/changes (#16763)
Marcus Ong [Thu, 8 Feb 2018 00:25:49 +0000 (18:25 -0600)]
CMake (Windows): Added support for ninja build and some fixes/changes (#16763)

* Added support for ninja build and some fixes/changes in CMake for Windows

* Fixed typo

6 years agospelling fixes for contrib docs (#16811)
brett koonce [Thu, 8 Feb 2018 00:21:31 +0000 (16:21 -0800)]
spelling fixes for contrib docs (#16811)

6 years agoRemove obsolete BernoulliWithSigmoidProbs (#16846)
Yong Tang [Thu, 8 Feb 2018 00:21:13 +0000 (16:21 -0800)]
Remove obsolete BernoulliWithSigmoidProbs (#16846)

As was pointed out by 9485, BernoulliWithSigmoidProbs is covered
by Bernoulli and is obsolete. This fix removes BernoulliWithSigmoidProbs.

This fix closes 9485.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix typo (#16822)
hsm207 [Thu, 8 Feb 2018 00:20:15 +0000 (19:20 -0500)]
Fix typo (#16822)

6 years agoMerge pull request #16837 from yongtang/16534-tf.losses.softmax_cross_entropy
Martin Wicke [Thu, 8 Feb 2018 00:14:23 +0000 (16:14 -0800)]
Merge pull request #16837 from yongtang/16534-tf.losses.softmax_cross_entropy

Remove warnings in tf.losses.softmax_cross_entropy

6 years ago[update]
Jie [Wed, 7 Feb 2018 23:15:50 +0000 (15:15 -0800)]
[update]
  fix naming stuff in tensorflow/contrib/tensorrt/convert/convert_nodes.cc

6 years agoFix swig interface problems
Sami Kama [Wed, 7 Feb 2018 22:54:49 +0000 (14:54 -0800)]
Fix swig interface problems

6 years agoFixes issue when linking of rule '//tensorflow/contrib/lite/toco:toco… (#16838)
Francisco Guerrero [Wed, 7 Feb 2018 22:19:25 +0000 (17:19 -0500)]
Fixes issue when linking of rule '//tensorflow/contrib/lite/toco:toco… (#16838)

* Fixes issue when linking of rule '//tensorflow/contrib/lite/toco:toco' fails because LD_LIBRARY_PATH is not configured

* Check if LD_LIBRARY_PATH is in environ_cp

6 years agoBump JetPack default to 3.2 in Android build script (#16842)
Andrew Harp [Wed, 7 Feb 2018 22:19:11 +0000 (17:19 -0500)]
Bump JetPack default to 3.2 in Android build script (#16842)

6 years agoMerge pull request #16844 from rmlarsen/master
Rasmus Munk Larsen [Wed, 7 Feb 2018 21:47:04 +0000 (13:47 -0800)]
Merge pull request #16844 from rmlarsen/master

Fix comparison in neon_depthwise_conv_op test.

6 years agoMerge pull request #16819 from ankurtaly/branch_184768730
ankurtaly [Wed, 7 Feb 2018 21:17:05 +0000 (13:17 -0800)]
Merge pull request #16819 from ankurtaly/branch_184768730

Branch 184768730

6 years agoFix bug and speed up Grappler constant folding
Rasmus Munk Larsen [Wed, 7 Feb 2018 20:56:06 +0000 (12:56 -0800)]
Fix bug and speed up Grappler constant folding

Fix bug in and speed up ConstantFolding::CreateNodeDef():
  * Fix bug trying to store more than kintmax32 values in a repeated proto field.
  * Speed up populating compressed format. Example: tensorflow/python/kernel_tests/large_concat_op_test with size = 2**29+6 goes from ~30 seconds to ~15 seconds. The fraction of time spent in ConstantFolding::CreateNodeDef() goes down from about 35% to about 12%.

6 years agoUse assertAllClose instead of assertArrayNear.
Rasmus Munk Larsen [Wed, 7 Feb 2018 20:45:39 +0000 (12:45 -0800)]
Use assertAllClose instead of assertArrayNear.

assertArrayNear compares absolute instead of relative error. For floating point computation you want the latter.

6 years agoMerge pull request #1 from tensorflow/master
Rasmus Munk Larsen [Wed, 7 Feb 2018 20:37:14 +0000 (12:37 -0800)]
Merge pull request #1 from tensorflow/master

merge from master

6 years agoUpdate BUILD
Yifei Feng [Wed, 7 Feb 2018 19:51:55 +0000 (11:51 -0800)]
Update BUILD

6 years agoFix #includes and namespace scope, and add missing TF_RETURN_IF_ERROR, to make intern...
gracehoney [Wed, 7 Feb 2018 19:24:09 +0000 (11:24 -0800)]
Fix #includes and namespace scope, and add missing TF_RETURN_IF_ERROR, to make internal build happy.

6 years agoUpdated copyright from 2017 to 2018
Ankur Taly [Wed, 7 Feb 2018 19:15:47 +0000 (11:15 -0800)]
Updated copyright from 2017 to 2018

6 years agoAdd unsortedsegment(prod/min/max/sqrt_n/mean). (#15858)
Phil [Wed, 7 Feb 2018 18:59:59 +0000 (19:59 +0100)]
Add unsortedsegment(prod/min/max/sqrt_n/mean). (#15858)

* Add unsortedsegment(prod/min/max/sqrt_n/mean).

This commit adds CPU/GPU implementations for prod/min/max
ops and python implementations for mean/sqrt_n. Also, it adapts and unifies the
corresponding tests of all unsorted reductions.
Note: The new gradient of unsorted_segment_max fixes the crash occuring when
negative indices on CPU are used.

* update golden API

* Fix compilation of atomicAdd for cuda_arch < 600. \n This commit moves the std::complex specialization of atomicAdd below the double specialization of atomicAdd for cuda_arch 600.

* Enable bfloat16, change inline to EIGEN_STRONG_INLINE.

* fix includes of cuda_device_functions; fix typo

6 years agoRemove warnings in tf.losses.softmax_cross_entropy
Yong Tang [Wed, 7 Feb 2018 16:24:34 +0000 (16:24 +0000)]
Remove warnings in tf.losses.softmax_cross_entropy

This fix tries to address the issue raised in 16534 where
tf.losses.softmax_cross_entropy causes warnings due
to the calling of tf.nn.softmax_cross_entropy_with_logits.

This fix switches to tf.nn.softmax_cross_entropy_with_logits_v2
to remove the warning.

This fix fixes 16534.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix the segfault in convert_nodes.cc
gracehoney [Wed, 7 Feb 2018 16:12:05 +0000 (08:12 -0800)]
Fix the segfault in convert_nodes.cc

6 years agoTypo in variable name: BETA --> self.BETA (#16666)
cclauss [Wed, 7 Feb 2018 06:54:21 +0000 (07:54 +0100)]
Typo in variable name: BETA --> self.BETA (#16666)

__BETA__ is defined on line 118 as a class member so it can only be accessed via __self__ or via the __ElasticAverageOptimizer__.

flake8 testing of https://github.com/tensorflow/tensorflow

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./tensorflow/contrib/opt/python/training/elastic_average_optimizer.py:153:27: F821 undefined name 'BETA'
      self._moving_rate = BETA / communication_period / num_worker
                          ^
```

6 years agoFix incorrect links in CONTRIBUTING.md (#16814)
Yong Tang [Wed, 7 Feb 2018 06:53:33 +0000 (22:53 -0800)]
Fix incorrect links in CONTRIBUTING.md (#16814)

This fix fixes two incorrect links in CONTRIBUTING.md
about license examples. The reason for broken links
is because tensorboard is in another repo.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge commit for internal changes
Ankur Taly [Wed, 7 Feb 2018 02:13:46 +0000 (18:13 -0800)]
Merge commit for internal changes

6 years ago[tf.data] Fix a memory leak when an iterator is reinitialized many times in a session.
Derek Murray [Wed, 7 Feb 2018 01:37:02 +0000 (17:37 -0800)]
[tf.data] Fix a memory leak when an iterator is reinitialized many times in a session.

Previously, we would instantiate a new function handle for each
function in a dataset each time an iterator on that dataset was
initialized. These would only be deleted at session closure, which
could lead to an apparent leak of memory over the lifetime of session.

PiperOrigin-RevId: 184768730

6 years agoFix memory tracking in the case where temp memory is used as output memory.
Yuefeng Zhou [Wed, 7 Feb 2018 01:32:50 +0000 (17:32 -0800)]
Fix memory tracking in the case where temp memory is used as output memory.
Track all persistent memory allocation in allocate_persistent call except for variables and queues where persistent memory is tracked in variables ops and queue ops. Deallocation of persistent memory is ignored.

PiperOrigin-RevId: 184768231

6 years agoSync the opensource and non-opensource build
Andrew Selle [Wed, 7 Feb 2018 01:10:31 +0000 (17:10 -0800)]
Sync the opensource and non-opensource build

PiperOrigin-RevId: 184765632

6 years agoAddress Adagrad/RMSProp incompatibility with CudnnRNN
James Qin [Wed, 7 Feb 2018 00:25:59 +0000 (16:25 -0800)]
Address Adagrad/RMSProp incompatibility with CudnnRNN

CudnnRNN layers have variables of unknown shapes, which Adagrad/RMSProp didn't handle before.

This fixes 6620(#6620).

PiperOrigin-RevId: 184759579

6 years ago[XLA] Add and use new Literal::MakeTupleOwned overload.
Justin Lebar [Tue, 6 Feb 2018 23:30:40 +0000 (15:30 -0800)]
[XLA] Add and use new Literal::MakeTupleOwned overload.

Previously MakeTupleOwned was cumbersome to use, because you had to
explicitly materialize a vector<unique_ptr<Literal>>.  With this new
overload, you can pass unique_ptrs directly.

PiperOrigin-RevId: 184751119

6 years agoAdd read resource variable benchmarks.
Akshay Modi [Tue, 6 Feb 2018 23:13:41 +0000 (15:13 -0800)]
Add read resource variable benchmarks.

Initial benchmarks:
entry {
  name: "MicroBenchmarks.benchmark_read_variable_op_2_by_2_CPU"
  iters: 30000
  wall_time: 22.9616721471
  extras {
    key: "examples_per_sec"
    value {
      double_value: 43550.8352176
    }
  }
}

entry {
  name: "MicroBenchmarks.benchmark_read_variable_op_with_tape_2_by_2_CPU"
  iters: 30000
  wall_time: 27.3616631826
  extras {
    key: "examples_per_sec"
    value {
      double_value: 36547.4859232
    }
  }
}

PiperOrigin-RevId: 184748548

6 years agoCreates tf.contrib.feature_column module.
A. Unique TensorFlower [Tue, 6 Feb 2018 23:09:51 +0000 (15:09 -0800)]
Creates tf.contrib.feature_column module.

PiperOrigin-RevId: 184747924

6 years agoHandles possible infinite recursion in while loop fix.
Alexandre Passos [Tue, 6 Feb 2018 22:43:18 +0000 (14:43 -0800)]
Handles possible infinite recursion in while loop fix.

PiperOrigin-RevId: 184743192

6 years ago[TF Ops] Bugfix to Operation initializer: error message uses node_def.
Eugene Brevdo [Tue, 6 Feb 2018 22:37:21 +0000 (14:37 -0800)]
[TF Ops] Bugfix to Operation initializer: error message uses node_def.

self.node_def may not yet be accessible when using the C api.

PiperOrigin-RevId: 184742074

6 years agoAutomated g4 rollback of changelist 184551259
Joshua V. Dillon [Tue, 6 Feb 2018 22:17:52 +0000 (14:17 -0800)]
Automated g4 rollback of changelist 184551259

PiperOrigin-RevId: 184738583

6 years agoExport CXX11_ABI_FLAG and MONOLITHIC_BUILD constants.
Anna R [Tue, 6 Feb 2018 22:05:01 +0000 (14:05 -0800)]
Export CXX11_ABI_FLAG and MONOLITHIC_BUILD constants.

PiperOrigin-RevId: 184736216

6 years ago1. Use tensorflow::string instead of std::string
gracehoney [Tue, 6 Feb 2018 22:04:35 +0000 (14:04 -0800)]
1. Use tensorflow::string instead of std::string
2. Fix swig problem in trt_conversion.i
3. Fix c++ styles
4. Fix BUILD dependencies

6 years agoAnother rolling back of performance regression.
Alexandre Passos [Tue, 6 Feb 2018 21:54:56 +0000 (13:54 -0800)]
Another rolling back of performance regression.

PiperOrigin-RevId: 184734426

6 years agoMake TFE_Py_FastpathExecute work for all types of ops
Akshay Modi [Tue, 6 Feb 2018 21:53:56 +0000 (13:53 -0800)]
Make TFE_Py_FastpathExecute work for all types of ops

MatMul benchmarks:
entry {
  name: "MicroBenchmarks.benchmark_gen_math_ops_matmul_2_by_2_CPU"
  iters: 30000
  wall_time: 11.580435435
  extras {
    key: "examples_per_sec"
    value {
      double_value: 86352.538781
    }
  }
}

entry {
  name: "MicroBenchmarks.benchmark_tfe_py_fastpath_execute_matmul_2_by_2_CPU"
  iters: 30000
  wall_time: 7.02576637268
  extras {
    key: "examples_per_sec"
    value {
      double_value: 142333.227004
    }
  }
}

PiperOrigin-RevId: 184734289

6 years agoAdded support for nested functions
Benoit Steiner [Tue, 6 Feb 2018 21:48:55 +0000 (13:48 -0800)]
Added support for nested functions
Properly handle the case of control dependencies

PiperOrigin-RevId: 184733444

6 years agoAdd utility function which makes implicit `tf.get_variable` dependencies an
Joshua V. Dillon [Tue, 6 Feb 2018 21:03:03 +0000 (13:03 -0800)]
Add utility function which makes implicit `tf.get_variable` dependencies an
explicit argument of a callable.

PiperOrigin-RevId: 184725878

6 years agoFixing the issue where an escape character was being included in the branch name...
Amit Patankar [Tue, 6 Feb 2018 20:58:56 +0000 (12:58 -0800)]
Fixing the issue where an escape character was being included in the branch name changes.

PiperOrigin-RevId: 184725332

6 years ago[TF:XLA] Bump open source llvm revision to r324323
Sanjoy Das [Tue, 6 Feb 2018 20:57:07 +0000 (12:57 -0800)]
[TF:XLA] Bump open source llvm revision to r324323

PiperOrigin-RevId: 184725126

6 years agoFetch OpDefs from C API instead of using python op registry in ops.py.
Skye Wanderman-Milne [Tue, 6 Feb 2018 20:44:12 +0000 (12:44 -0800)]
Fetch OpDefs from C API instead of using python op registry in ops.py.

PiperOrigin-RevId: 184723558

6 years agoFixed typo
A. Unique TensorFlower [Tue, 6 Feb 2018 20:30:05 +0000 (12:30 -0800)]
Fixed typo

PiperOrigin-RevId: 184721743

6 years agotfdbg: deflake session_debug_file_test
Shanqing Cai [Tue, 6 Feb 2018 20:27:02 +0000 (12:27 -0800)]
tfdbg: deflake session_debug_file_test

by disabling grappler in the test.

PiperOrigin-RevId: 184721353

6 years agoSecond, cleaner, attempt at external control dependency handling.
Alexandre Passos [Tue, 6 Feb 2018 20:04:48 +0000 (12:04 -0800)]
Second, cleaner, attempt at external control dependency handling.

PiperOrigin-RevId: 184718016

6 years agoImprove side_effect_guards to (1) avoid aliasing non-tensors and (2) combine aliasing...
A. Unique TensorFlower [Tue, 6 Feb 2018 20:02:18 +0000 (12:02 -0800)]
Improve side_effect_guards to (1) avoid aliasing non-tensors and (2) combine aliasing with re-indenting. Move the renaming visitor into a generic utility API.
This loses potential efficiency by risking sequencing ops where there is no risk of a race. On the other hand it's still not entirely robust, and we need to raise an error where we can't guarantee that.

PiperOrigin-RevId: 184717456

6 years agoEstimator should handle ResourceVariables correctly.
Alexandre Passos [Tue, 6 Feb 2018 20:01:22 +0000 (12:01 -0800)]
Estimator should handle ResourceVariables correctly.

PiperOrigin-RevId: 184717305

6 years agoSupport resource variables in moving averages.
Alexandre Passos [Tue, 6 Feb 2018 19:58:36 +0000 (11:58 -0800)]
Support resource variables in moving averages.

PiperOrigin-RevId: 184716895

6 years agoContrib estimator should handle ResourceVariables properly.
Alexandre Passos [Tue, 6 Feb 2018 19:51:47 +0000 (11:51 -0800)]
Contrib estimator should handle ResourceVariables properly.

PiperOrigin-RevId: 184715896

6 years agoInternal change
Mingsheng Hong [Tue, 6 Feb 2018 19:51:18 +0000 (11:51 -0800)]
Internal change

PiperOrigin-RevId: 184715822

6 years agoAdding tf_export decorators/calls to TensorFlow functions and constants.
Anna R [Tue, 6 Feb 2018 19:07:04 +0000 (11:07 -0800)]
Adding tf_export decorators/calls to TensorFlow functions and constants.

PiperOrigin-RevId: 184708277

6 years agoEnable layout optimizer by default
Yao Zhang [Tue, 6 Feb 2018 19:00:58 +0000 (11:00 -0800)]
Enable layout optimizer by default

PiperOrigin-RevId: 184707084

6 years agoMerge pull request #16785 from av8ramit/merge_branch
Amit Patankar [Tue, 6 Feb 2018 19:04:17 +0000 (11:04 -0800)]
Merge pull request #16785 from av8ramit/merge_branch

Merging the 1.6 branch back into master.

6 years agoSupport training with model parallelism in tpu_estimator.
A. Unique TensorFlower [Tue, 6 Feb 2018 18:48:28 +0000 (10:48 -0800)]
Support training with model parallelism in tpu_estimator.

PiperOrigin-RevId: 184704902

6 years agoUse the function name as the grappler item id
Benoit Steiner [Tue, 6 Feb 2018 18:43:45 +0000 (10:43 -0800)]
Use the function name as the grappler item id

PiperOrigin-RevId: 184704131

6 years agoremove write_version=saver_pb2.SaverDef.V1 (#15966)
ted chang [Tue, 6 Feb 2018 18:44:48 +0000 (10:44 -0800)]
remove write_version=saver_pb2.SaverDef.V1 (#15966)

6 years agoMerge pull request #16789 from ManHyuk/fix_typo
Amit Patankar [Tue, 6 Feb 2018 18:40:54 +0000 (10:40 -0800)]
Merge pull request #16789 from ManHyuk/fix_typo

Fix typo

6 years agoMerge pull request #16792 from case540/branch_184622482
Michael Case [Tue, 6 Feb 2018 18:28:19 +0000 (10:28 -0800)]
Merge pull request #16792 from case540/branch_184622482

Branch 184622482

6 years agoAdd local interconnect data to DeviceLocality.
A. Unique TensorFlower [Tue, 6 Feb 2018 18:13:04 +0000 (10:13 -0800)]
Add local interconnect data to DeviceLocality.

This information can be used within a distributed implementation
when deciding how to route data transfers that might involve more
than one hop.  By default the new fields are populated according to
StreamExecutor::CanEnablePeerAccessTo(), however a platform-specific
implementation can augment them with more detailed values.

Do some refactoring of gpu_device and gpu_device_factory, making
GetDeviceLocalities() and GetInterconnectMaps() into virtual
functions.

PiperOrigin-RevId: 184698821

6 years agoExplicitly specify the value of all the attributes for the newly created Assign
Benoit Steiner [Tue, 6 Feb 2018 18:11:26 +0000 (10:11 -0800)]
Explicitly specify the value of all the attributes for the newly created Assign
nodes since we can't always rely on TF calling AddDefaultAttrsToGraphDef.

PiperOrigin-RevId: 184698463

6 years agoFix bug in and speed up ConstantFolding::CreateNodeDef():
A. Unique TensorFlower [Tue, 6 Feb 2018 17:40:53 +0000 (09:40 -0800)]
Fix bug in and speed up ConstantFolding::CreateNodeDef():
  * Fix bug trying to store more than kintmax32 values in a repeated proto field.
  * Speed up populating compressed format. Example: tensorflow/python/kernel_tests/large_concat_op_test with size = 2**29+6 goes from ~30 seconds to ~15 seconds. The fraction of time spent in ConstantFolding::CreateNodeDef() goes down from about 35% to about 12%.

PiperOrigin-RevId: 184693749

6 years agoRevert "Remove LICENSE file. It will be added internally instead."
gracehoney [Tue, 6 Feb 2018 17:34:17 +0000 (09:34 -0800)]
Revert "Remove LICENSE file. It will be added internally instead."

This reverts commit d0c2b84c2d6cd3c235671e67f22e3639b4b2b54c.

6 years agoAdd a utility function to partition TensorFlow Lite graphs into subgraphs.
Andrew Selle [Tue, 6 Feb 2018 17:28:24 +0000 (09:28 -0800)]
Add a utility function to partition TensorFlow Lite graphs into subgraphs.

This will be used for the forthcoming delegate interface. The delegate
interface will allow parts of the TensorFlow lite graph to be sent to
other accelerators. NNAPI will be implemented to move to this interface.
That will allow partial delegation to NNAPI.

PiperOrigin-RevId: 184692126

6 years agoFix some BUILD files
gracehoney [Tue, 6 Feb 2018 17:26:20 +0000 (09:26 -0800)]
Fix some BUILD files

6 years agoJava: Update to 1.6.0-rc0
Asim Shankar [Tue, 6 Feb 2018 16:53:58 +0000 (08:53 -0800)]
Java: Update to 1.6.0-rc0

PiperOrigin-RevId: 184687994