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

6 years agoMake namedtuples with identical name and field names to be considered as the same...
A. Unique TensorFlower [Tue, 6 Feb 2018 16:50:41 +0000 (08:50 -0800)]
Make namedtuples with identical name and field names to be considered as the same shallow structure in assert_shallow_structure

PiperOrigin-RevId: 184687609

6 years agoRemove redundant calls to realloc dynamic tensors.
A. Unique TensorFlower [Tue, 6 Feb 2018 16:11:41 +0000 (08:11 -0800)]
Remove redundant calls to realloc dynamic tensors.

PiperOrigin-RevId: 184682942

6 years agoMakes ResourceVariables return correct initialized_value and initial_value for object...
A. Unique TensorFlower [Tue, 6 Feb 2018 11:11:59 +0000 (03:11 -0800)]
Makes ResourceVariables return correct initialized_value and initial_value for objects created from VariableDef protos.

Previously self._initial_value wasn't set in such cases which causes accessing var.initial_value to fail for variables in the imported meta graphs.

PiperOrigin-RevId: 184657191

6 years agomcmc_diagnostics.py added to contrib/bayesflow/. potential_scale_reduction function...
Ian Langmore [Tue, 6 Feb 2018 08:29:29 +0000 (00:29 -0800)]
mcmc_diagnostics.py added to contrib/bayesflow/.  potential_scale_reduction function added.
.

PiperOrigin-RevId: 184644450

6 years agoRollback of CL 183879566, and fix Windows CMAKE build by copying one additional CUDA...
A. Unique TensorFlower [Tue, 6 Feb 2018 08:24:51 +0000 (00:24 -0800)]
Rollback of CL 183879566, and fix Windows CMAKE build by copying one additional CUDA header file.

PiperOrigin-RevId: 184644220

6 years agoMerge commit for internal changes
Michael Case [Tue, 6 Feb 2018 07:09:28 +0000 (23:09 -0800)]
Merge commit for internal changes

6 years agoExport align_corners to TF Lite
A. Unique TensorFlower [Tue, 6 Feb 2018 02:45:13 +0000 (18:45 -0800)]
Export align_corners to TF Lite

PiperOrigin-RevId: 184622482

6 years agoAdded the ability to query the amount of RAM available
Benoit Steiner [Tue, 6 Feb 2018 02:22:37 +0000 (18:22 -0800)]
Added the ability to query the amount of RAM available
Also added the ability to query the CPU frequency on Windows.

PiperOrigin-RevId: 184620390

6 years agoCleanup markdown errors in `Bijector`.
Joshua V. Dillon [Tue, 6 Feb 2018 01:55:26 +0000 (17:55 -0800)]
Cleanup markdown errors in `Bijector`.

PiperOrigin-RevId: 184616392

6 years ago[XLA] Add HloBindings::ToString().
Justin Lebar [Tue, 6 Feb 2018 01:45:26 +0000 (17:45 -0800)]
[XLA] Add HloBindings::ToString().

PiperOrigin-RevId: 184615306

6 years agoCorrectly treat "devices=/gpu:0" argument of replicate_model_fn.
Igor Saprykin [Tue, 6 Feb 2018 01:24:31 +0000 (17:24 -0800)]
Correctly treat "devices=/gpu:0" argument of replicate_model_fn.

At the moment if "devices=/GPU:0" are specified by the user, then variables are going to be placed on the GPU.  However, if "devices=/gpu:0" are given, then they are going to be placed on the CPU.  Instead, the latter case should be equivalent to the former case.

PiperOrigin-RevId: 184612823

6 years agoMisc cleanups and tweaks:
Mingsheng Hong [Tue, 6 Feb 2018 01:16:27 +0000 (17:16 -0800)]
Misc cleanups and tweaks:
1. Removed obsolete constructors in ProcessLunctionLibraryRuntime
2. Add const annotations to Tensor::PrintOneDim(), and removed unnecessary vector copy.

PiperOrigin-RevId: 184611531

6 years ago[XLA:GPU] Split IrEmitter{Unn,N}ested out of ir_emitter.h.
Justin Lebar [Tue, 6 Feb 2018 01:11:39 +0000 (17:11 -0800)]
[XLA:GPU] Split IrEmitter{Unn,N}ested out of ir_emitter.h.

Also add a bunch of clarifying comments.

PiperOrigin-RevId: 184610674

6 years agoMerge branch 'master' of https://github.com/tensorflow/tensorflow into fix_typo
ManHyuk [Tue, 6 Feb 2018 00:53:16 +0000 (09:53 +0900)]
Merge branch 'master' of https://github.com/tensorflow/tensorflow into fix_typo

6 years agofix typo
ManHyuk [Tue, 6 Feb 2018 00:53:07 +0000 (09:53 +0900)]
fix typo

6 years agoSupport negative axis in concatenation
A. Unique TensorFlower [Tue, 6 Feb 2018 00:32:38 +0000 (16:32 -0800)]
Support negative axis in concatenation

PiperOrigin-RevId: 184605786

6 years agoShard linear operator tests.
A. Unique TensorFlower [Tue, 6 Feb 2018 00:12:19 +0000 (16:12 -0800)]
Shard linear operator tests.

PiperOrigin-RevId: 184602704

6 years agoFix the mean the description of the output shape, which should be [batch_size, 1...
ImSheridan [Tue, 6 Feb 2018 00:15:33 +0000 (08:15 +0800)]
Fix the mean the description of the output shape, which should be [batch_size, 1, max_time] (#16642)

6 years agoRemove invalid exception in linear operator (#16678)
Glenn Weidner [Tue, 6 Feb 2018 00:15:21 +0000 (16:15 -0800)]
Remove invalid exception in linear operator (#16678)

6 years agoAdd filepaths to test_local support.
Amit Patankar [Tue, 6 Feb 2018 00:08:16 +0000 (16:08 -0800)]
Add filepaths to test_local support.

PiperOrigin-RevId: 184602010

6 years agoRemove makefile build dependency on all_opensource_files, as part of the effort to...
Yifei Feng [Tue, 6 Feb 2018 00:04:06 +0000 (16:04 -0800)]
Remove makefile build dependency on all_opensource_files, as part of the effort to remove all_opensource_files #15758.

PiperOrigin-RevId: 184601439

6 years agoBump the rtol in hmc_test (#16787)
Jonathan Hseu [Tue, 6 Feb 2018 00:05:25 +0000 (16:05 -0800)]
Bump the rtol in hmc_test (#16787)