platform/upstream/tensorflow.git
6 years agoMerge pull request #19544 from yongtang/05182018-duplicate-import
Michael Case [Fri, 25 May 2018 22:28:58 +0000 (15:28 -0700)]
Merge pull request #19544 from yongtang/05182018-duplicate-import

Remove duplicate `from six import text_type` in upload_test_benchmarks.py

6 years agoMerge pull request #19470 from ankurtaly/branch_197583446
ankurtaly [Fri, 25 May 2018 21:43:38 +0000 (14:43 -0700)]
Merge pull request #19470 from ankurtaly/branch_197583446

Branch 197583446

6 years agoMerge pull request #19479 from Intel-tensorflow/concat_build_fix
Tatiana Shpeisman [Fri, 25 May 2018 19:49:54 +0000 (12:49 -0700)]
Merge pull request #19479 from Intel-tensorflow/concat_build_fix

INTEL-MKL: Fix build issue with old GCC version - MklConcat related

6 years agoMerge pull request #17331 from kbsriram/easy-nn-grads
Asim Shankar [Fri, 25 May 2018 17:38:23 +0000 (10:38 -0700)]
Merge pull request #17331 from kbsriram/easy-nn-grads

C++ gradients: Fractional*Pool, Soft{Plus,Sign}

6 years agoMerge pull request #19532 from yongtang/05242018-gemmlowp
Michael Case [Fri, 25 May 2018 16:54:36 +0000 (09:54 -0700)]
Merge pull request #19532 from yongtang/05242018-gemmlowp

Enable mirror.bazel.build link for gemmlowp

6 years agoMerge pull request #19553 from silvasean/patch-1
Michael Case [Fri, 25 May 2018 16:36:45 +0000 (09:36 -0700)]
Merge pull request #19553 from silvasean/patch-1

Fix broken link

6 years agoFix broken link
Sean Silva [Fri, 25 May 2018 07:27:46 +0000 (00:27 -0700)]
Fix broken link

Also, as a side note, I found this link confusing. I was expecting it to take me to a list of pre-made estimators. Not a definition of what a pre-made estimator is. (maybe the glossary definition should link to a list of pre-made estimators?)

6 years agoFix cmake for MacOS (#17005)
ted chang [Fri, 25 May 2018 06:21:46 +0000 (23:21 -0700)]
Fix cmake for MacOS (#17005)

This change address cmake build issues for MacOS.
Also fixes #14712

6 years agoRemove whitelisted gemmlowp and mirror.bazel.build link has been enabled.
Yong Tang [Thu, 24 May 2018 05:02:16 +0000 (05:02 +0000)]
Remove whitelisted gemmlowp and mirror.bazel.build link has been enabled.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #19538 from yongtang/05242018-BUILD.bazel
Michael Case [Thu, 24 May 2018 22:08:23 +0000 (15:08 -0700)]
Merge pull request #19538 from yongtang/05242018-BUILD.bazel

Use BUILD.bazel for third_party packages

6 years agoMerge pull request #19508 from briannemsick/issue-18908
Michael Case [Thu, 24 May 2018 20:06:18 +0000 (13:06 -0700)]
Merge pull request #19508 from briannemsick/issue-18908

tf.keras: Fix plot_model for Sequential model

6 years agoMerge pull request #19429 from evision-ai/fix-nsync-on-android
Michael Case [Thu, 24 May 2018 18:50:34 +0000 (11:50 -0700)]
Merge pull request #19429 from evision-ai/fix-nsync-on-android

fix a bug in built nsync android library

6 years agoMerge pull request #19472 from fbcotter/master
Michael Case [Thu, 24 May 2018 18:49:51 +0000 (11:49 -0700)]
Merge pull request #19472 from fbcotter/master

Corrected compute_gradient docstring

6 years agoFix ppc64le compile failure libpng (#19291)
William D. Irons [Thu, 24 May 2018 18:49:05 +0000 (13:49 -0500)]
Fix ppc64le compile failure libpng (#19291)

Building Tensorflow on ppc64le fails with the message:
ERROR: /root/tensorflow/tensorflow/cc/BUILD:422:1: Linking of rule
'//tensorflow/cc:ops/control_flow_ops_gen_cc' failed (Exit 1)
bazel-out/host/bin/_solib_local/_U_S_Stensorflow_Scc_Cops_Scontrol_Uflow
_Uops_Ugen_Ucc___Utensorflow/libtensorflow_framework.so:
undefined reference to `png_init_filter_functions_vsx'
collect2: error: ld returned 1 exit status

This is fixed by adding powerpc specific files from the png archive
for @org_tensorflow//tensorflow:linux_ppc64le builds only.

6 years agoUse BUILD.bazel for third_party packages
Yong Tang [Thu, 24 May 2018 17:13:03 +0000 (17:13 +0000)]
Use BUILD.bazel for third_party packages

Both `BUILD` and `BUILD.bazel` could be used as the bazel project file
and `BUILD.bazel` is preferred (see https://github.com/bazelbuild/bazel/issues/4517#issuecomment-360213750)

This fix changes generated BUILD in third_party packages to `BUILD.bazel`.
This will help avoid conflict with `BUILD` or `build` file/directory names
in third party packages.

For example, while working on 19461 I noticed that apache thrift package
consists of a `build` directory and that causes issues in case-insensitive
systems like macOS. This PR should help avoid such conflict issues.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #19509 from yongtang/19498-doc-reduce_sum
Michael Case [Thu, 24 May 2018 16:52:27 +0000 (09:52 -0700)]
Merge pull request #19509 from yongtang/19498-doc-reduce_sum

Update docstring for tf.reduce_sum/reduce.

6 years agoEnable mirror.bazel.build link for gemmlowp
Yong Tang [Thu, 24 May 2018 05:00:30 +0000 (05:00 +0000)]
Enable mirror.bazel.build link for gemmlowp

The mirror.bazel.build link for gemmlowp was disabled
as it was not propagated before. This fix enables the
mirror.bazel.build link for gemmlowp and removes the
related TODO from it.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #19512 from yongtang/05232018-pylint
Michael Case [Thu, 24 May 2018 01:19:24 +0000 (18:19 -0700)]
Merge pull request #19512 from yongtang/05232018-pylint

Fix pylint issue in the master branch

6 years agoAdditional pylint fix.
Yong Tang [Wed, 23 May 2018 23:53:53 +0000 (23:53 +0000)]
Additional pylint fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix pylint issue in the master branch
Yong Tang [Wed, 23 May 2018 23:40:59 +0000 (23:40 +0000)]
Fix pylint issue in the master branch

The latest master branch has the following pylint failure that caused
`Ubuntu Sanity — Internal CI build failed`:
```
53 FAIL: Found 2 non-whitelited pylint errors:
54 tensorflow/contrib/cmake/tools/create_def_file.py:47: [C0301(line-too-long), ] Line too long (106/80)
55
56 tensorflow/contrib/cmake/tools/create_def_file.py:61: [C0301(line-too-long), ] Line too long (90/80)
```

This PR addresses the above issues.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoupdated based on CL 197644290
Ankur Taly [Wed, 23 May 2018 22:50:17 +0000 (15:50 -0700)]
updated based on CL 197644290

6 years agoExpose stream executor namespace in cmake shared object. (#19415)
Gunhan Gulsoy [Wed, 23 May 2018 22:49:35 +0000 (15:49 -0700)]
Expose stream executor namespace in cmake shared object. (#19415)

Instead of perftools::gputools expose stream executor namespace in cmake shared object.

6 years agofixed DirectSessionWithTrackingAllocTest keyboard_arrow_right CostModelTest
Ankur Taly [Wed, 23 May 2018 21:34:23 +0000 (14:34 -0700)]
fixed  DirectSessionWithTrackingAllocTest keyboard_arrow_right CostModelTest

6 years agoUpdate tf.reduce_max and tf.reduce_min
Yong Tang [Wed, 23 May 2018 21:00:21 +0000 (21:00 +0000)]
Update tf.reduce_max and tf.reduce_min

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate docs for tf.reduce_prod and tf.reduce_mean
Yong Tang [Wed, 23 May 2018 20:59:22 +0000 (20:59 +0000)]
Update docs for tf.reduce_prod and tf.reduce_mean

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate docstring for tf.reduce_sum
Yong Tang [Wed, 23 May 2018 20:54:45 +0000 (20:54 +0000)]
Update docstring for tf.reduce_sum

This fix tries to address the issue raised in 19498 where
the description:
```
If axis has no entries, all dimensions are reduced, and a tensor with a single element is returned.
```

does not match the current behavior. The current behavior (matches `np.sum` as well) is actually:
```
If axis is None, all dimensions are reduced, and a tensor with a single element is returned.
```

This fix fixes the discrepancy for tf.reduce_sum.

This fix fixes 19498.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoRemove model.model in vis_utils plotting.
Brian Nemsick [Wed, 23 May 2018 17:50:23 +0000 (10:50 -0700)]
Remove model.model in vis_utils plotting.

6 years agoMerge pull request #19502 from sdalbsoo/typo
Michael Case [Wed, 23 May 2018 16:46:14 +0000 (09:46 -0700)]
Merge pull request #19502 from sdalbsoo/typo

Fix ovic typo

6 years agotypo
Sdalbsoo [Wed, 23 May 2018 15:16:54 +0000 (00:16 +0900)]
typo

6 years agoMerge pull request #17070 from yupbank/refactor-tree-variables
Martin Wicke [Tue, 22 May 2018 23:27:20 +0000 (16:27 -0700)]
Merge pull request #17070 from yupbank/refactor-tree-variables

add model restore support for tree and forest variables

6 years agoBUG: keras.callbacks.TensorBoard raises an exception for non_trainale_weights (#19148)
Yan Facai (颜发才) [Tue, 22 May 2018 23:16:01 +0000 (07:16 +0800)]
BUG: keras.callbacks.TensorBoard raises an exception for non_trainale_weights (#19148)

* TST: write_grads for non_trainable_weights

* BUG: bypass non_trainable_weights for write_grad

* CLN: factor out write_grad loop

6 years agofix a concat related build issue with old GCC version
Guozhong Zhuang [Tue, 22 May 2018 20:04:50 +0000 (13:04 -0700)]
fix a concat related build issue with old GCC version

6 years agoSetting default openmp settings for MKL kernels (#19136)
Jayaram Bobba [Tue, 22 May 2018 19:03:24 +0000 (12:03 -0700)]
Setting default openmp settings for MKL kernels (#19136)

* Change inter op defaults when built with MKL to avoid thread oversubscription

* Bump up default mkl inter_op to be less conservative

* Added default OMP settings that are expected to give reasonable performance when using MKL kernels

* Query CPUID for determining number of hyperthreads per physical core on Intel 64 architectures

* Style fixes

* Buildifier and clang-format style fixes

* Removed use of setenv due to concerns about thread safety

6 years agoCorrected compute_gradient docstring
Fergal Cotter [Tue, 22 May 2018 18:44:57 +0000 (19:44 +0100)]
Corrected compute_gradient docstring

After testing the tf.test.compute_gradient function with complex inputs,
noticed that the docstring specifies that the real/imag partial derivatives
are in the four corners of a larger matrix, when the result given indicates
they are instead interleaved.

6 years agoMerge pull request #19386 from smistad/fix-cmake
Michael Case [Tue, 22 May 2018 18:06:19 +0000 (11:06 -0700)]
Merge pull request #19386 from smistad/fix-cmake

CMake: fix include error when building with PYTHON_BINDINGS off

6 years agoMerge pull request #19446 from sarahedkins/fix/python-feeding-function-error
Michael Case [Tue, 22 May 2018 18:02:22 +0000 (11:02 -0700)]
Merge pull request #19446 from sarahedkins/fix/python-feeding-function-error

fix(python): ValueError len(dataframe.columns) + 1

6 years agoMerge commit for internal changes
Ankur Taly [Tue, 22 May 2018 17:44:24 +0000 (10:44 -0700)]
Merge commit for internal changes

6 years agoMake init_scope preserve the inner device stack when lifting into a graph.
Akshay Agrawal [Tue, 22 May 2018 17:26:00 +0000 (10:26 -0700)]
Make init_scope preserve the inner device stack when lifting into a graph.

Eager execution doesn't implement device stacks and in particular it doesn't support device functions (which determine the device on a per-op basis), so in general it's not possible to do the same when lifting into the eager context.

PiperOrigin-RevId: 197583446

6 years agoMerge pull request #17025 from kr-ish/numpy_input_fn_none_check
Michael Case [Tue, 22 May 2018 16:59:54 +0000 (09:59 -0700)]
Merge pull request #17025 from kr-ish/numpy_input_fn_none_check

Adds a check for shuffle=None in numpy_input_fn

6 years agoMerge pull request #19445 from yongtang/05122018-link
Michael Case [Tue, 22 May 2018 16:56:49 +0000 (09:56 -0700)]
Merge pull request #19445 from yongtang/05122018-link

Fix incorrect link for nvidia drivers

6 years agoMerge pull request #19462 from yongtang/05212018-docs-math_ops
Michael Case [Tue, 22 May 2018 16:51:02 +0000 (09:51 -0700)]
Merge pull request #19462 from yongtang/05212018-docs-math_ops

Fix discrepancies between doc and implementation for math_ops

6 years agoSpecial case the 'dict' call, which trips other mechanisms for built-ins.
Dan Moldovan [Tue, 22 May 2018 16:43:06 +0000 (09:43 -0700)]
Special case the 'dict' call, which trips other mechanisms for built-ins.

PiperOrigin-RevId: 197576297

6 years ago[TF:XLA] Fix xla_interpreter_device build
Benjamin Kramer [Tue, 22 May 2018 16:08:06 +0000 (09:08 -0700)]
[TF:XLA] Fix xla_interpreter_device build

PiperOrigin-RevId: 197571618

6 years agoContributing guidelines, style guide and README updates
A. Unique TensorFlower [Tue, 22 May 2018 15:18:11 +0000 (08:18 -0700)]
Contributing guidelines, style guide and README updates

PiperOrigin-RevId: 197564905

6 years agoUpdate calls to addPassesToEmitFile
A. Unique TensorFlower [Tue, 22 May 2018 15:14:49 +0000 (08:14 -0700)]
Update calls to addPassesToEmitFile

PiperOrigin-RevId: 197564506

6 years agoFix a couple of broken links in the Swift For TensorFlow page.
A. Unique TensorFlower [Tue, 22 May 2018 15:12:41 +0000 (08:12 -0700)]
Fix a couple of broken links in the Swift For TensorFlow page.

PiperOrigin-RevId: 197564254

6 years agoAutomated g4 rollback of changelist 197527651
A. Unique TensorFlower [Tue, 22 May 2018 15:02:39 +0000 (08:02 -0700)]
Automated g4 rollback of changelist 197527651

PiperOrigin-RevId: 197562826

6 years ago[XLA:TF] Run buildifier on llvm.BUILD
Benjamin Kramer [Tue, 22 May 2018 14:06:08 +0000 (07:06 -0700)]
[XLA:TF] Run buildifier on llvm.BUILD

Buildifier recently started sorting load args
https://github.com/bazelbuild/buildtools/commit/3ac5f85b22bc44820c041d0cacd3bc2ed54e7742 which causes diffs in the output.

PiperOrigin-RevId: 197556554

6 years agoFix typo (#19450)
ManHyuk [Tue, 22 May 2018 13:43:40 +0000 (22:43 +0900)]
Fix typo (#19450)

6 years ago[XLA] Optimize ShapeTree<T>
A. Unique TensorFlower [Tue, 22 May 2018 12:50:34 +0000 (05:50 -0700)]
[XLA] Optimize ShapeTree<T>
This optimizes ShapeTree quite significantly. In particular this optimizes for the common case of querying/iterating, copying and moving ShapeTrees.

  * Allocate all ShapeTreeNodes inside a single, owned, vector. This reduces the number of memory allocations and improves cache performance.
  * Instead of storing children nodes as unique_ptrs, store them as indices into the owning container's vector. This allows cheap copy-construction (a std::vector POD copy) and doesn't change the fast path (dereferencing a pointer is just as fast as dereferencing a base + offset).
  * Instead of a unique_ptr<Shape>, use a shared_ptr<Shape>. This removes a load of copy-construction overhead at the cost of a shared_ptr over a unique_ptr (one extra allocation).
  * Instead of computing ShapeIndexes on-demand in the iterators/ForEach*, precompute them during construction time. This adds a few more bytes per ShapeTree, but now we can...
  * ... store a std::pair<ShapeIndex, T> as the ShapeTreeNode's data element. This allows us to provide a std::pair<K,V>&, STL-like interface from iterators without going through any of the previous unique_ptr hacks around storage lifetimes.
  * Because we no longer need to iterate from the beginning to build up the ShapeIndex, we can now offer a ::find() function to return an iterator for a ShapeIndex in O(K) time. As the iteration order is guaranteed to be pre-order, this can be used (and will be, later) to speed up the fast-path of mutating a subtree of a ShapeTree from tf2xla::ExtractSubBuffers.
  * Similarly because we now have a very standard, cheap STL interface with no performance cliffs, we can hopefully improve ShapedBuffer's copy and move constructors to be cheaper.

PiperOrigin-RevId: 197548717

6 years agointernal change
A. Unique TensorFlower [Tue, 22 May 2018 09:27:45 +0000 (02:27 -0700)]
internal change

PiperOrigin-RevId: 197533162

6 years agobatch_util.h is generally useful so moved to util/ from kernels/ where it will be...
A. Unique TensorFlower [Tue, 22 May 2018 09:21:30 +0000 (02:21 -0700)]
batch_util.h is generally useful so moved to util/ from kernels/ where it will be included in the pip package.

PiperOrigin-RevId: 197532524

6 years agoconvert Pow op into something that is more recognizable, so we can have further
A. Unique TensorFlower [Tue, 22 May 2018 08:35:36 +0000 (01:35 -0700)]
convert Pow op into something that is more recognizable, so we can have further
optimizations.

PiperOrigin-RevId: 197527651

6 years agoAutomated g4 rollback of changelist 197487461
A. Unique TensorFlower [Tue, 22 May 2018 08:01:01 +0000 (01:01 -0700)]
Automated g4 rollback of changelist 197487461

PiperOrigin-RevId: 197523867

6 years agoUnifiy the cuda toolchain definition of gcc/nvcc and cuda-clang.
A. Unique TensorFlower [Tue, 22 May 2018 07:44:47 +0000 (00:44 -0700)]
Unifiy the cuda toolchain definition of gcc/nvcc and cuda-clang.

gcc >= 7 will change how it treats -pie [1]; passing -pie after -shared
on the command line is not possible any more; given that the legacy way to
configure flags in the gcc/nvcc toolchain does not allow control over where
the flags go or how to provide -pie only for linking of binaries, we can
prevent this from breaking in the future by also using the new feature
mechanism for gcc/nvcc.

In addition to moving the gcc-specific workarounds in the toolchain to
cuda_configure.bzl, document them, so we don't need to rediscover them in the
future.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77464

PiperOrigin-RevId: 197522719

6 years agoEnable tpu.rewrite to work on XLA CPU/GPU backends.
A. Unique TensorFlower [Tue, 22 May 2018 06:37:12 +0000 (23:37 -0700)]
Enable tpu.rewrite to work on XLA CPU/GPU backends.

PiperOrigin-RevId: 197517946

6 years ago[XLA:GPU] Implement trivial (one-replica) cross-replica-sum on XLA:GPU.
Justin Lebar [Tue, 22 May 2018 03:41:26 +0000 (20:41 -0700)]
[XLA:GPU] Implement trivial (one-replica) cross-replica-sum on XLA:GPU.

Also fix the CPU implementation to work in the case when there are
multiple operands to the cross-replica-sum op.

PiperOrigin-RevId: 197506311

6 years agoUpdate scan benchmarks to have a range of 16K-128K iterations. As of https://github...
A. Unique TensorFlower [Tue, 22 May 2018 03:27:53 +0000 (20:27 -0700)]
Update scan benchmarks to have a range of 16K-128K iterations. As of https://github.com/tensorflow/tensorflow/commit/5802096c267c805f6a69798aac10aefef759bb9f, TensorFlow Eager no longer exhibits quadratic behavior. The benchmark is still ~5x slower in eager mode vs. graph mode, and maybe slightly worse than linear:

n     Graph Time (s)  Eager Time (s)      Ratio
-----------------------------------------------
 16K            0.35             1.8        5.1
 32K            0.64             3.6        5.6
 64K            1.1              7.2        6.5
128K            2.4             14.8        6.2

PiperOrigin-RevId: 197505257

6 years agoInternal Change
Michael Kuperstein [Tue, 22 May 2018 03:06:39 +0000 (20:06 -0700)]
Internal Change

PiperOrigin-RevId: 197503560

6 years agofix a bug of the android Makefile for nsync library
gdh1995 [Mon, 21 May 2018 06:23:32 +0000 (14:23 +0800)]
fix a bug of the android Makefile for nsync library

NDK doesn't support thread_local variables which require destructors,
so on Android it should use __thread instead.

Observations:
* ProtoBuf and other libraries are not using thread_local on Android.
* In Tensorflow, there's a "thread_local" in code about CUDA,
  which should be safe enough.

More discussions are on https://github.com/android-ndk/ndk/issues/360 .

6 years agoInternal Change
Michael Case [Tue, 22 May 2018 02:45:21 +0000 (19:45 -0700)]
Internal Change

PiperOrigin-RevId: 197501805

6 years agos/tfe.GradientTape/tf.GradientTape/
Asim Shankar [Tue, 22 May 2018 02:30:52 +0000 (19:30 -0700)]
s/tfe.GradientTape/tf.GradientTape/
s/tfe.enable_eager_execution/tf.enable_eager_execution/

PiperOrigin-RevId: 197500751

6 years agoImprovements to util/nest.py and data/util/nest.py
Akshay Modi [Tue, 22 May 2018 01:53:54 +0000 (18:53 -0700)]
Improvements to util/nest.py and data/util/nest.py

Changes:
- Add a cache for type -> is_sequence to speed up Flatten/IsSequence
- Update data/util/nest.py flatten to use C Flatten

Before:
entry {
  name: "EagerLinearRegressionBenchmark.eager_train_cpu"
  iters: 2000
  wall_time: 1.91852378845
  extras {
    key: "examples_per_sec"
    value {
      double_value: 66717.9634521
    }
  }
}

After:
entry {
  name: "EagerLinearRegressionBenchmark.eager_train_cpu"
  iters: 2000
  wall_time: 1.74479198456
  extras {
    key: "examples_per_sec"
    value {
      double_value: 73361.1806638
    }
  }
}
PiperOrigin-RevId: 197497854

6 years agoAdds support for specifying a discovery_service_url (via either a parameter or an...
Frank Chen [Tue, 22 May 2018 01:14:30 +0000 (18:14 -0700)]
Adds support for specifying a discovery_service_url (via either a parameter or an environment variable) within TPUClusterResolver

PiperOrigin-RevId: 197494335

6 years agoSplit generated_examples test into multiple test targets
Austin Anderson [Tue, 22 May 2018 00:45:22 +0000 (17:45 -0700)]
Split generated_examples test into multiple test targets

PiperOrigin-RevId: 197490872

6 years agoIntroduce an option to allocate CUDA unified memory
Smit Hinsu [Tue, 22 May 2018 00:42:15 +0000 (17:42 -0700)]
Introduce an option to allocate CUDA unified memory

PiperOrigin-RevId: 197490523

6 years ago[XLA] Two minor style-guide fixups.
Justin Lebar [Tue, 22 May 2018 00:34:56 +0000 (17:34 -0700)]
[XLA] Two minor style-guide fixups.

- Fix TODO(b/123) style.
- Use a value type rather than an rvalue reference for a "sink" param.

PiperOrigin-RevId: 197489597

6 years agofix(python): ValueError len(dataframe.columns) + 1
Sarah Edkins [Tue, 22 May 2018 00:24:40 +0000 (20:24 -0400)]
fix(python): ValueError len(dataframe.columns) + 1

6 years agoMake the quantize_and_dequantize op use the full quantized range when possible.
A. Unique TensorFlower [Tue, 22 May 2018 00:18:06 +0000 (17:18 -0700)]
Make the quantize_and_dequantize op use the full quantized range when possible.

PiperOrigin-RevId: 197487461

6 years agoImproves documentation of labels and logits arguments in hinge loss methods .
Petros Mol [Tue, 22 May 2018 00:15:39 +0000 (17:15 -0700)]
Improves documentation of labels and logits arguments in hinge loss methods .

PiperOrigin-RevId: 197487120

6 years agoSupports initializing an Interpreter with a direct ByteBuffer of nativeOrder()
A. Unique TensorFlower [Tue, 22 May 2018 00:03:40 +0000 (17:03 -0700)]
Supports initializing an Interpreter with a direct ByteBuffer of nativeOrder()
that contains bytes content of a valid tflite model.

PiperOrigin-RevId: 197485253

6 years agoUpdate docstring for tf.round as it support all real types.
Yong Tang [Mon, 21 May 2018 23:57:17 +0000 (23:57 +0000)]
Update docstring for tf.round as it support all real types.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoUpdate docstring as pow supports `float16` now
Yong Tang [Mon, 21 May 2018 23:36:55 +0000 (23:36 +0000)]
Update docstring as pow supports `float16` now

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix discrepancies between doc and implementation for math_ops
Yong Tang [Mon, 21 May 2018 23:29:32 +0000 (23:29 +0000)]
Fix discrepancies between doc and implementation for math_ops

In the docstring of math_ops, there are some discrepancies
between the supported data types and the actual implementation:
`abs` supports `float16`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoEnsure that saving/restoring iterator in CheckpointInputPipelineHook is performed...
Saurabh Saxena [Mon, 21 May 2018 23:43:53 +0000 (16:43 -0700)]
Ensure that saving/restoring iterator in CheckpointInputPipelineHook is performed *after* the _DatasetInitializerHook has been run.
In the TPUEstimator the _DatasetInitializerHook is present in the
EstimatorSpec.training_hooks. Since these are executed after the `hooks`
passed to Estimator.train the input pipeline checkpointing hook fails
since it finds an uninitialized iterator.

PiperOrigin-RevId: 197482609

6 years agoFixes issue with gradient tape when asking for the gradient of an intermediate tensor.
Alexandre Passos [Mon, 21 May 2018 23:37:17 +0000 (16:37 -0700)]
Fixes issue with gradient tape when asking for the gradient of an intermediate tensor.

PiperOrigin-RevId: 197481473

6 years agoImprove error message in tensor.cc when IsAligned() test fails
A. Unique TensorFlower [Mon, 21 May 2018 23:30:42 +0000 (16:30 -0700)]
Improve error message in tensor.cc when IsAligned() test fails
by logging offending ptr value.

PiperOrigin-RevId: 197480534

6 years agoSupport a better interface for the single option case in combinations.py.
Igor Saprykin [Mon, 21 May 2018 23:26:11 +0000 (16:26 -0700)]
Support a better interface for the single option case in combinations.py.

If there's only one combination for combination-based tests, it doesn't have to
be a list.

PiperOrigin-RevId: 197479773

6 years agoAdd arithmetic optimizer stage that removes LogicalNot that takes a comparison as...
A. Unique TensorFlower [Mon, 21 May 2018 23:14:10 +0000 (16:14 -0700)]
Add arithmetic optimizer stage that removes LogicalNot that takes a comparison as input, i.e.

!(a == b)  =>  a != b
!(a != b)  =>  a == b
!(a < b)   =>  a >= b
!(a <= b)  =>  a > b
!(a > b)   =>  a <= b
!(a >= b)  =>  a < b

PiperOrigin-RevId: 197477959

6 years agoExpose partition_strategy option in embedding_lookup_unique
A. Unique TensorFlower [Mon, 21 May 2018 23:13:28 +0000 (16:13 -0700)]
Expose partition_strategy option in embedding_lookup_unique

PiperOrigin-RevId: 197477853

6 years agoOptimize more reductions
Benoit Steiner [Mon, 21 May 2018 23:02:33 +0000 (16:02 -0700)]
Optimize more reductions

PiperOrigin-RevId: 197476067

6 years agoInternal Change.
Michael Case [Mon, 21 May 2018 22:55:46 +0000 (15:55 -0700)]
Internal Change.

PiperOrigin-RevId: 197475076

6 years agoExtract out a MatrixMatrixBlockPanelEmitter::Dimensions struct; NFC
Sanjoy Das [Mon, 21 May 2018 22:49:14 +0000 (15:49 -0700)]
Extract out a MatrixMatrixBlockPanelEmitter::Dimensions struct; NFC

This gives me a convenient place to note that the m/k/n here are not the m/k/n
for the entire GEMM.  I didn't rename m/k/n to mc/kc/nr since the latter seems
somewhat redundant to me -- we could read 'c as 'column' and 'r' as 'row', but
that's the only possibility?

This refactoring will also be useful when implementing GEPP on top of GEBP.

PiperOrigin-RevId: 197474137

6 years agoMerge pull request #19254 from yongtang/05122018-compute_accidental_hits
Michael Case [Mon, 21 May 2018 22:48:11 +0000 (15:48 -0700)]
Merge pull request #19254 from yongtang/05122018-compute_accidental_hits

Add additional shape validation to `compute_accidental_hits`

6 years agoRemove object-based checkpointing probes from Python 3 tf.train.Saver "name not found...
Allen Lavoie [Mon, 21 May 2018 22:43:20 +0000 (15:43 -0700)]
Remove object-based checkpointing probes from Python 3 tf.train.Saver "name not found" stack traces

PiperOrigin-RevId: 197473101

6 years agoDisable flaky batch_dataset_op_test
Jiri Simsa [Mon, 21 May 2018 22:32:45 +0000 (15:32 -0700)]
Disable flaky batch_dataset_op_test

PiperOrigin-RevId: 197471172

6 years agoAllow using DNN to only train the embeddings and using the tree model for the final...
A. Unique TensorFlower [Mon, 21 May 2018 21:47:37 +0000 (14:47 -0700)]
Allow using DNN to only train the embeddings and using the tree model for the final prediction.

PiperOrigin-RevId: 197462585

6 years agoMerge pull request #19257 from yongtang/05122018-QuantizedReluX
Michael Case [Mon, 21 May 2018 21:38:18 +0000 (14:38 -0700)]
Merge pull request #19257 from yongtang/05122018-QuantizedReluX

Shape validation of `max_features` in `QuantizedReluX`

6 years ago[TF:XLA] Delete cumulative_total_size to simplify the DFS scheduler.
Dimitris Vardoulakis [Mon, 21 May 2018 21:25:04 +0000 (14:25 -0700)]
[TF:XLA] Delete cumulative_total_size to simplify the DFS scheduler.
It's unclear why we would assign cumulative_total_size as the total size of a single HLO, and deleting it doesn't make a difference in practice.

PiperOrigin-RevId: 197458260

6 years agoAlways enter the handle graph before calling convert_to_tensor in resource variables.
Alexandre Passos [Mon, 21 May 2018 20:00:20 +0000 (13:00 -0700)]
Always enter the handle graph before calling convert_to_tensor in resource variables.

This mimics the behavior of ref variable's assign which converts to tensor in the
right graph inside op_def_lib.apply_op.

PiperOrigin-RevId: 197441989

6 years agoTurn on dead branch elimination, shape optimization, and remapping by default
Benoit Steiner [Mon, 21 May 2018 19:43:52 +0000 (12:43 -0700)]
Turn on dead branch elimination, shape optimization, and remapping by default

PiperOrigin-RevId: 197439191

6 years agoMerge pull request #19326 from yongtang/05162018-mpi_utils.h
Xiaoqiang Zheng [Mon, 21 May 2018 19:40:59 +0000 (12:40 -0700)]
Merge pull request #19326 from yongtang/05162018-mpi_utils.h

Remove redundant header includes in mpi_utils.h

6 years agoOptimize multiplications by constants in more cases.
Benoit Steiner [Mon, 21 May 2018 18:12:55 +0000 (11:12 -0700)]
Optimize multiplications by constants in more cases.

PiperOrigin-RevId: 197422256

6 years agoAdd a kernel usable as a GEBP inner loop for an LLVM IR GEMM
Sanjoy Das [Mon, 21 May 2018 18:11:48 +0000 (11:11 -0700)]
Add a kernel usable as a GEBP inner loop for an LLVM IR GEMM

This is not used in any real code path, but I've added an escape hatch that runs
regular matrix multiplies through this kernel for testing purposes.

As far as I can tell this is functionally correct, but I don't yet have a proper
apples-to-apples performance comparison -- that'll have to wait till the
implementation is complete.

PiperOrigin-RevId: 197422075

6 years agoAutomated g4 rollback of changelist 197226707
A. Unique TensorFlower [Mon, 21 May 2018 17:34:42 +0000 (10:34 -0700)]
Automated g4 rollback of changelist 197226707

PiperOrigin-RevId: 197415745

6 years agoaddress lint again
Peng Yu [Mon, 21 May 2018 01:20:46 +0000 (21:20 -0400)]
address lint again

6 years agoaddress lint
Peng Yu [Fri, 18 May 2018 21:05:45 +0000 (17:05 -0400)]
address lint

6 years agoaddress comments
Peng Yu [Thu, 12 Apr 2018 19:38:48 +0000 (15:38 -0400)]
address comments

6 years agoadd test case always predict [0, 1]
Peng Yu [Thu, 12 Apr 2018 02:04:58 +0000 (22:04 -0400)]
add test case always predict [0, 1]

6 years agoadd inference support for tree and forest variables
Peng Yu [Fri, 16 Feb 2018 15:59:14 +0000 (10:59 -0500)]
add inference support for tree and forest variables