platform/upstream/tensorflow.git
6 years agoMerge pull request #18500 from jameswex/closure_proto_library
James Wexler [Mon, 16 Apr 2018 13:47:01 +0000 (09:47 -0400)]
Merge pull request #18500 from jameswex/closure_proto_library

closure proto library for example protos

6 years agoMerge branch 'master' into closure_proto_library
James Wexler [Mon, 16 Apr 2018 13:33:59 +0000 (09:33 -0400)]
Merge branch 'master' into closure_proto_library

6 years agoFix embedding_ops doc formatting (#18520)
Yuan (Terry) Tang [Mon, 16 Apr 2018 02:30:34 +0000 (22:30 -0400)]
Fix embedding_ops doc formatting (#18520)

* Fix embedding_ops doc formatting

* Add missing indentation

6 years agoexport tflite::Intepreter's UseNNAPI() and setNumThreads() to java (#16065)
freedom" Koan-Sin Tan [Mon, 16 Apr 2018 02:24:14 +0000 (10:24 +0800)]
export tflite::Intepreter's  UseNNAPI() and setNumThreads() to java (#16065)

* export UseNNAPI() and setNumThreads() to java

Export tflite::Intepreter's UseNNAPI() and SetNumThreads() to Java
and modify the Android TfLiteCameraDemo app to use them.

* change CheckedChangeListener accordingly

* add error checking to setNumThreads()

6 years agoAllow `~/` in path for transform_graph (#15894)
Yong Tang [Mon, 16 Apr 2018 02:23:53 +0000 (19:23 -0700)]
Allow `~/` in path for transform_graph (#15894)

* Allow `~/` in path for transform_graph

This fix tries to address the issue raised in 13211 where
it was not possible to specify `~` (e.g., `~/`, `~user/`, etc)
for the path used in transform_graph. This fix adds
the support of `~` transform_graph on Linux.

This fix fixes 13211.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Reformat transform_graph.cc with clang-format

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoadding ps_strategy to run_config to enable different placement strate… (#15640)
Siu Kei, Muk [Mon, 16 Apr 2018 02:23:20 +0000 (10:23 +0800)]
adding ps_strategy to run_config to enable different placement strate… (#15640)

* adding ps_strategy to run_config to enable different placement strategy in estimator

* 1. Moved estimator._device_fn to RunConfig as @property
2. Made RunConfig.device_fn to return custom device function if one is specified, otherwise the result from `tf.train.replica_device_setter` call is used
3. Added some basic unit tests, may need further tests.

* 1. Removing ps_strategy.
2. Modified estimator to take overriden device_fn from  if set.
3. Removed ps_strategy related unit tests.

* Adding manual initialization of _device_fn in legacy RunConfig class

* Updated estimator golden API through
1. bazel build //tensorflow/tools/api/tests:api_compatibility_test
2. bazel-bin/tensorflow/tools/api/tests/api_compatibility_test --update_goldens True

* fixing code styles

6 years agoAdd support for explicit broadcasting in TensorFlow (#15243)
Yong Tang [Mon, 16 Apr 2018 02:22:39 +0000 (19:22 -0700)]
Add support for explicit broadcasting in TensorFlow (#15243)

* Add support for explicit broadcasting in TensorFlow

This fix tries to adds support for explicit broadcasting in TensorFlow,
as was suggested in 14509. This fix adds the op of tf.broadcast_to,
which is equivalent to the numpy.broadcast_to in numpy.

This fix fixes 14509.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Register BroadcastTo op in array_ops.cc

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Sanitize with clang-format -i

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Sanitize bazel BUILD and python.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Split broadcast_to_ops_test from array_ops_test

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Support int64 shape

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Improve shape inference for broadcast_to

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add scalar input support for broadcast_to

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update API defs tensorflow/core/api_def/update_api_def.sh

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

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

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable GPU kernel for BroadcastTo

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enable use_gpu=True for test cases

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Hiden the ops and export to tf.contrib.framework for now.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add the op to the _allowed_symbol in tf.contrib.framework

Otherwise the symbole will be hidden

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoSupport passing layer instances to produce attentional hidden states (#14974)
Guillaume Klein [Mon, 16 Apr 2018 02:21:29 +0000 (04:21 +0200)]
Support passing layer instances to produce attentional hidden states (#14974)

* Support passing Layer instances to the AttentionWrapper.

* Use _compute_output_shape to get the attention layer depth

* compute_output_shape is now a public method

* Move new argument at the end

6 years agoExpose Scaffold.default_local_init_op as a public static method. (#18398)
David T.H. Kao [Mon, 16 Apr 2018 02:11:25 +0000 (19:11 -0700)]
Expose Scaffold.default_local_init_op as a public static method. (#18398)

* Expose Scaffold.default_local_init_op as a public static method.

* update api

* Add a docstring.

* Add a returns section.

6 years agoImproving S3 documentation. (#18406)
Elson Rodriguez [Mon, 16 Apr 2018 02:10:50 +0000 (19:10 -0700)]
Improving S3 documentation. (#18406)

* Improving S3 documentation.

Added a copy-pastable guide on the variables, and also provided usable examples that give immediate feedback.

* Updating docs based on feedback.

Added back old configuration section, moved s3 implementations to bottom of document.

* Rearranged documentation before example, renamed sections to be more clear.

6 years agoFix typo (#18416)
ManHyuk [Mon, 16 Apr 2018 02:10:17 +0000 (11:10 +0900)]
Fix typo (#18416)

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* fix typo

* Improve comment

6 years agoUpdate sqlite version for cmake build (#18524)
Yong Tang [Sun, 15 Apr 2018 20:23:47 +0000 (13:23 -0700)]
Update sqlite version for cmake build (#18524)

The sqlite has been updated in bazel, though
cmake version was not updated. This fix updates
sqlite in cmake so that cmake and bazel versions
are synced.

The fix has been tested on Linux:
```
tensorflow/tools/ci_build/ci_build.sh CMAKE tensorflow/tools/ci_build/builds/cmake.sh
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd shape validation for tag input of StatsDataset (#18462)
Yong Tang [Sat, 14 Apr 2018 16:58:38 +0000 (09:58 -0700)]
Add shape validation for tag input of StatsDataset (#18462)

* Add shape validation for tag input of StatsDataset

The tag field of the StatsDataset needs to be a scalar.
However, there was no check in the shape function. This
fix adds the check of the tag shape.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for tag shape check with BytesProducedStatsDataset

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add tag shape check for LatencyStatsDataset

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for tag shape check with LatencyStatsDataset

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge pull request #18511 from qlzh727/branch_192842670
Qianli Scott Zhu [Sat, 14 Apr 2018 02:23:23 +0000 (19:23 -0700)]
Merge pull request #18511 from qlzh727/branch_192842670

Branch 192842670

6 years agoMerge commit for internal changes
Scott Zhu [Fri, 13 Apr 2018 23:44:35 +0000 (16:44 -0700)]
Merge commit for internal changes

6 years agoAutomated g4 rollback of changelist 192784701
Yifei Feng [Fri, 13 Apr 2018 23:38:29 +0000 (16:38 -0700)]
Automated g4 rollback of changelist 192784701

PiperOrigin-RevId: 192842670

6 years agoImprove layout optimizer tests -- Evaluate nodes before and after optimization, to...
A. Unique TensorFlower [Fri, 13 Apr 2018 23:38:12 +0000 (16:38 -0700)]
Improve layout optimizer tests -- Evaluate nodes before and after optimization, to confirm the graph's behavior is maintained after optimization.

PiperOrigin-RevId: 192842623

6 years agoUpgrade SQLite
Justine Tunney [Fri, 13 Apr 2018 22:57:45 +0000 (15:57 -0700)]
Upgrade SQLite

PiperOrigin-RevId: 192837358

6 years agoRestore definitions of static members in MklCpuAllocator.
A. Unique TensorFlower [Fri, 13 Apr 2018 22:53:05 +0000 (15:53 -0700)]
Restore definitions of static members in MklCpuAllocator.

These were removed in #17396 which made the static member variables of
MklCpuAllocator into inline variables, which are a C++17 feature, and not
properly restored in #18006 which reverted the inline declarations, leading to
an ODR violation that is apparently ignored with some compilers.
END_PUBLIC

RELNOTES: n/a

BEGIN_PUBLIC
Automated g4 rollback of changelist 191305220

PiperOrigin-RevId: 192836808

6 years agoEnable remote functions for TPU_SYSTEM.
Akshay Agrawal [Fri, 13 Apr 2018 22:47:37 +0000 (15:47 -0700)]
Enable remote functions for TPU_SYSTEM.

PiperOrigin-RevId: 192836098

6 years agoAvoid mixing `Dimension` type and `int` when defining kernel shapes in conv layers.
Francois Chollet [Fri, 13 Apr 2018 22:33:07 +0000 (15:33 -0700)]
Avoid mixing `Dimension` type and `int` when defining kernel shapes in conv layers.

PiperOrigin-RevId: 192834255

6 years ago[XLA] Pattern matcher for HLO, Shapes, Layouts
A. Unique TensorFlower [Fri, 13 Apr 2018 22:32:11 +0000 (15:32 -0700)]
[XLA] Pattern matcher for HLO, Shapes, Layouts

PiperOrigin-RevId: 192834129

6 years agoAdd broadcasting to all LinearOperators.
A. Unique TensorFlower [Fri, 13 Apr 2018 22:23:08 +0000 (15:23 -0700)]
Add broadcasting to all LinearOperators.

This will broadcast in cases where batch shapes are not equal (but tries to determine statically if this is the case). The broadcasting is not as efficient as doing the broadcast in C++, but makes for the API to at least be completely broadcastable.

PiperOrigin-RevId: 192832919

6 years ago[TF] Enable half precision XLA compiler tests for the gpu backend.
Bixia Zheng [Fri, 13 Apr 2018 22:15:44 +0000 (15:15 -0700)]
[TF] Enable half precision XLA compiler tests for the gpu backend.

Modify some tests to allow larger error for half precision.

Enable half precision SpaceToBatchNDTest for the cpu backend.

PiperOrigin-RevId: 192831909

6 years agoAdded PmfToQuantizedCdf op to contrib/coder in TensorFlow.
Sung Jin Hwang [Fri, 13 Apr 2018 21:51:16 +0000 (14:51 -0700)]
Added PmfToQuantizedCdf op to contrib/coder in TensorFlow.

The added op transforms probability mass functions (PMF) to quantized
cumulative distribution function (CDF), which can be used by range coder ops in
contrib/coder.

The op takes greedy approach to ensure that the post-quantization probability
masses do not sum over the maximum quantized value. The op does not make any
adjustment when the post-quantization probability masses already sum less than
the maximum value.

PiperOrigin-RevId: 192827779

6 years agoAllow tf.train.Saver to load object-based checkpoints (using names)
Allen Lavoie [Fri, 13 Apr 2018 21:32:45 +0000 (14:32 -0700)]
Allow tf.train.Saver to load object-based checkpoints (using names)

This is the second part of the compatibility story. Object-based checkpointing APIs can already read name-based checkpoints, and now the name-based APIs can read object-based checkpoints by looking up the modified keys in the object graph proto.

PiperOrigin-RevId: 192824907

6 years ago[XLA] Redesign: add ~XlaOp() and ~XlaComputation().
A. Unique TensorFlower [Fri, 13 Apr 2018 21:17:31 +0000 (14:17 -0700)]
[XLA] Redesign: add ~XlaOp() and ~XlaComputation().

PiperOrigin-RevId: 192822559

6 years agoSmall tag change
Austin Anderson [Fri, 13 Apr 2018 21:13:12 +0000 (14:13 -0700)]
Small tag change

PiperOrigin-RevId: 192821895

6 years agoExtend Keras symbol-feeding to dynamic-length tensors and tensors of different dtypes...
Francois Chollet [Fri, 13 Apr 2018 21:12:16 +0000 (14:12 -0700)]
Extend Keras symbol-feeding to dynamic-length tensors and tensors of different dtypes from the target placeholders.

PiperOrigin-RevId: 192821770

6 years agoInternal change.
Anna R [Fri, 13 Apr 2018 21:09:58 +0000 (14:09 -0700)]
Internal change.

PiperOrigin-RevId: 192821482

6 years agoSupport scalar mean in resolve_batch_normalization
A. Unique TensorFlower [Fri, 13 Apr 2018 20:40:28 +0000 (13:40 -0700)]
Support scalar mean in resolve_batch_normalization

PiperOrigin-RevId: 192816848

6 years agoMerge pull request #18505 from yupbank/add-new-owner-for-tensor-forest
Martin Wicke [Fri, 13 Apr 2018 20:31:25 +0000 (13:31 -0700)]
Merge pull request #18505 from yupbank/add-new-owner-for-tensor-forest

Add extra code owner for tensor_forest

6 years agoAdd myself into code ownder for tensor_forest
Peng Yu [Fri, 13 Apr 2018 20:07:36 +0000 (16:07 -0400)]
Add myself into code ownder for tensor_forest

6 years agoRemove closure_js_proto_library rule for tf.example protos.
James Wexler [Fri, 13 Apr 2018 19:44:41 +0000 (12:44 -0700)]
Remove closure_js_proto_library rule for tf.example protos.

PiperOrigin-RevId: 192809073

6 years ago[XLA] Redesign: add a constructor: XlaComputation(HloModuleProto).
A. Unique TensorFlower [Fri, 13 Apr 2018 19:37:04 +0000 (12:37 -0700)]
[XLA] Redesign: add a constructor: XlaComputation(HloModuleProto).

PiperOrigin-RevId: 192808038

6 years ago[XLA] Redesign: add a method that creates fake data for XlaComputation.
A. Unique TensorFlower [Fri, 13 Apr 2018 19:35:32 +0000 (12:35 -0700)]
[XLA] Redesign: add a method that creates fake data for XlaComputation.

PiperOrigin-RevId: 192807851

6 years agoExpose tf.decode_compressed to the public API.
A. Unique TensorFlower [Fri, 13 Apr 2018 19:18:53 +0000 (12:18 -0700)]
Expose tf.decode_compressed to the public API.

PiperOrigin-RevId: 192805605

6 years agoMerge branch 'closure_proto_library' of https://github.com/jameswex/tensorflow into...
James Wexler [Fri, 13 Apr 2018 19:18:53 +0000 (15:18 -0400)]
Merge branch 'closure_proto_library' of https://github.com/jameswex/tensorflow into closure_proto_library

6 years agofix build file format
James Wexler [Fri, 13 Apr 2018 19:18:17 +0000 (15:18 -0400)]
fix build file format

6 years agoFix warnings in tf.distributions.Categorical (#18468)
Yong Tang [Fri, 13 Apr 2018 18:47:02 +0000 (11:47 -0700)]
Fix warnings in tf.distributions.Categorical (#18468)

In tf.distributions.Categorical dimension was used with argmax.
As dimension has been deprecated this generates a warning.
This fix fixes the warning by changing to axis.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFix crash when invalid dtype was passed (#18481)
Yong Tang [Fri, 13 Apr 2018 18:38:43 +0000 (11:38 -0700)]
Fix crash when invalid dtype was passed (#18481)

* Fix crash when invalid dtype was passed

This fix tries to address the issue raised in 18474
where crash may happen if invalid dtype (e.g., `"[,]"`)
is passed to `tf.constant(tf.string, "[,]")`. The crash
happens during the comparision of `"[,]"` and numpy dtype
candidate (e.g., `np.dtype([("qint8", np.int8, 1)])`:
```
>>> import numpy as np
>>> np.dtype([("qint8", np.int8, 1)]) == "[,]"
Segmentation fault: 11
```

This fix adds a type check to make sure the type of the passed
dtype is either numpy.dtype or type.

This fix fixes 18474.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test case for invalid type to tf.constant

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoMerge branch 'master' into closure_proto_library
James Wexler [Fri, 13 Apr 2018 18:38:15 +0000 (14:38 -0400)]
Merge branch 'master' into closure_proto_library

6 years agoFix the broken TFLite iOS example. (#18483)
Yu-Cheng Ling [Fri, 13 Apr 2018 18:33:07 +0000 (11:33 -0700)]
Fix the broken TFLite iOS example. (#18483)

The demo app is only relying on CocoaPod now, but it's incorrectly
configured to use the headers on Github. It crashes the app when
the header is different between Github and CocoaPod.

6 years agoFix warnings in `nn.sampled_softmax_loss` (#18494)
Yong Tang [Fri, 13 Apr 2018 18:26:39 +0000 (11:26 -0700)]
Fix warnings in `nn.sampled_softmax_loss` (#18494)

* Fix warnings in `nn.sampled_softmax_loss`

The softmax_cross_entropy_with_logits has been deprecated
and replaced with softmax_cross_entropy_with_logits_v2.
This causes nn.sampled_softmax_loss to always generate
a WANRING whenever called. This fix replaces
`softmax_cross_entropy_with_logits` with `softmax_cross_entropy_with_logits_v2`
and maintains the existing behavior to fix the warning.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Pylint fix for line too long

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd deprecation args decoration for tf.squeeze (#18495)
Yong Tang [Fri, 13 Apr 2018 18:26:03 +0000 (11:26 -0700)]
Add deprecation args decoration for tf.squeeze (#18495)

* Add deprecation args decoration with tf.squeeze

This fix adds deprecation args decoration with tf.squeeze,
with deprecates `squeeze_dims` with `axis`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Enhancement with deprecated_argument_lookup

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoFixing output alternatives
A. Unique TensorFlower [Fri, 13 Apr 2018 18:16:36 +0000 (11:16 -0700)]
Fixing output alternatives

PiperOrigin-RevId: 192795596

6 years agoMerge pull request #18497 from qlzh727/branch_192771889
Qianli Scott Zhu [Fri, 13 Apr 2018 18:18:15 +0000 (11:18 -0700)]
Merge pull request #18497 from qlzh727/branch_192771889

Branch 192771889

6 years ago[TF:XLA] Start a TensorFlow library that contains direct wrappers for XLA operators.
Peter Hawkins [Fri, 13 Apr 2018 18:14:09 +0000 (11:14 -0700)]
[TF:XLA] Start a TensorFlow library that contains direct wrappers for XLA operators.

Add new XlaReduceWindow and XlaDynamicUpdateSlice operators.
Add new tests for the existing XlaWhile operator.
Add wrappers for XlaSend and XlaRecv.

PiperOrigin-RevId: 192795174

6 years agoAdd more logging for failure cases in CUDATimer
James Qin [Fri, 13 Apr 2018 18:06:49 +0000 (11:06 -0700)]
Add more logging for failure cases in CUDATimer

PiperOrigin-RevId: 192793983

6 years agoreview changes
James Wexler [Fri, 13 Apr 2018 18:09:42 +0000 (14:09 -0400)]
review changes

6 years agoFix comment in xla_data.proto related to padding value for Windows.
Mark Heffernan [Fri, 13 Apr 2018 18:02:08 +0000 (11:02 -0700)]
Fix comment in xla_data.proto related to padding value for Windows.

PiperOrigin-RevId: 192792971

6 years agoInternal change.
Anna R [Fri, 13 Apr 2018 17:52:56 +0000 (10:52 -0700)]
Internal change.

PiperOrigin-RevId: 192791493

6 years agoclosure proto library for example protos
James Wexler [Fri, 13 Apr 2018 17:33:37 +0000 (13:33 -0400)]
closure proto library for example protos

6 years agoDisable x * x -> square(x) Grapler rewrite for complex types unless the op is on...
A. Unique TensorFlower [Fri, 13 Apr 2018 17:30:32 +0000 (10:30 -0700)]
Disable x * x -> square(x) Grapler rewrite for complex types unless the op is on CPU. Square is not registered for complex types on GPU, and doing so produces a crash in with CUDA_ILLEGAL_INSTRUCTION when running it on open source ubuntu.

PiperOrigin-RevId: 192788160

6 years agoDepthwiseConv Optimization Fixes
A. Unique TensorFlower [Fri, 13 Apr 2018 17:27:11 +0000 (10:27 -0700)]
DepthwiseConv Optimization Fixes

PiperOrigin-RevId: 192787669

6 years agoEnable GCS remote cache in Windows Bazel Build
A. Unique TensorFlower [Fri, 13 Apr 2018 17:07:10 +0000 (10:07 -0700)]
Enable GCS remote cache in Windows Bazel Build

PiperOrigin-RevId: 192784701

6 years agoMerge pull request #18444 from samikama/trt_static_impl
gracehoney [Fri, 13 Apr 2018 17:07:38 +0000 (10:07 -0700)]
Merge pull request #18444 from samikama/trt_static_impl

Fix TensorRT static linkage problem

6 years agoAdd debugging checks for setting cuda stream, so it will check fail if the
Guangda Lai [Fri, 13 Apr 2018 17:02:25 +0000 (10:02 -0700)]
Add debugging checks for setting cuda stream, so it will check fail if the
stream is not set or set to a wrong one when running cudnn methods that
conceptually require a stream.

Also add missing cudnnSetStream()s for DoRnnForwardImpl() and
DoRnnBackwardImpl().

Implementation details:
1. a current_cudnn_stream_ member is added which will be set in cudnnSetStream()
2. a different macro is used to wrap cudnn methods that require a stream in
   order to verify whether the provided stream is same as current_cudnn_stream_,
   and the program will check fail if not

PiperOrigin-RevId: 192783913

6 years agoMerge commit for internal changes
Scott Zhu [Fri, 13 Apr 2018 16:32:36 +0000 (09:32 -0700)]
Merge commit for internal changes

6 years agoExperiment with pre-shuffled fully-connected weights
A. Unique TensorFlower [Fri, 13 Apr 2018 15:22:06 +0000 (08:22 -0700)]
Experiment with pre-shuffled fully-connected weights

PiperOrigin-RevId: 192771889

6 years agoRefactor to remove the duplicate calls to obtain a function's namespace. This removes...
A. Unique TensorFlower [Fri, 13 Apr 2018 15:17:49 +0000 (08:17 -0700)]
Refactor to remove the duplicate calls to obtain a function's namespace. This removes the need to explicitly import internal components (barring the tf module which cannot be imported directly).

PiperOrigin-RevId: 192771440

6 years agoAdd support to TFLite for dilated convolution.
A. Unique TensorFlower [Fri, 13 Apr 2018 15:12:42 +0000 (08:12 -0700)]
Add support to TFLite for dilated convolution.

PiperOrigin-RevId: 192770919

6 years agoAutomated g4 rollback of changelist 192768744
A. Unique TensorFlower [Fri, 13 Apr 2018 15:10:57 +0000 (08:10 -0700)]
Automated g4 rollback of changelist 192768744

PiperOrigin-RevId: 192770717

6 years agoSplit byte_order.h off cpu_info.h
A. Unique TensorFlower [Fri, 13 Apr 2018 14:55:46 +0000 (07:55 -0700)]
Split byte_order.h off cpu_info.h

PiperOrigin-RevId: 192768744

6 years agoDemo: RNN colorbot with Estimators.
A. Unique TensorFlower [Fri, 13 Apr 2018 14:24:15 +0000 (07:24 -0700)]
Demo: RNN colorbot with Estimators.

PiperOrigin-RevId: 192765203

6 years agoKeep function doc string at the top of the function.
A. Unique TensorFlower [Fri, 13 Apr 2018 13:53:54 +0000 (06:53 -0700)]
Keep function doc string at the top of the function.

PiperOrigin-RevId: 192761604

6 years agoMerge pull request #17313 from jin/patch-1
andrehentz [Fri, 13 Apr 2018 13:37:03 +0000 (06:37 -0700)]
Merge pull request #17313 from jin/patch-1

Include cstring in logging.cc for use of strrchr()

6 years ago- Fixed small bug in example script
A. Unique TensorFlower [Fri, 13 Apr 2018 12:47:21 +0000 (05:47 -0700)]
- Fixed small bug in example script

PiperOrigin-RevId: 192756152

6 years agoUpdate for upstream LLVM *.def -> *.inc rename
A. Unique TensorFlower [Fri, 13 Apr 2018 12:05:12 +0000 (05:05 -0700)]
Update for upstream LLVM *.def -> *.inc rename

PiperOrigin-RevId: 192752798

6 years agoFix bug in converted_call, and add tests for it.
A. Unique TensorFlower [Fri, 13 Apr 2018 11:44:10 +0000 (04:44 -0700)]
Fix bug in converted_call, and add tests for it.

PiperOrigin-RevId: 192751211

6 years agoupdated installation instructions for Tensowflow-TensorRT integration (#18135)
jjsjann123 [Fri, 13 Apr 2018 11:21:15 +0000 (04:21 -0700)]
updated installation instructions for Tensowflow-TensorRT integration (#18135)

* updated installation instructions for Tensowflow-TensorRT integration

* Minor format changes to clean it up.

* Adding the python symlink command for devel packages too.

* Forcing the symlink creation.

* Updating the sed command for docker parameterized build.

6 years agoImplementation of Less
A. Unique TensorFlower [Fri, 13 Apr 2018 07:12:41 +0000 (00:12 -0700)]
Implementation of Less

PiperOrigin-RevId: 192728635

6 years ago-- Add a new histogram/cdf computation method compatible with the TPU.
A. Unique TensorFlower [Fri, 13 Apr 2018 07:03:48 +0000 (00:03 -0700)]
-- Add a new histogram/cdf computation method compatible with the TPU.
-- Refactor utility functions into pruning_utils.py and add tests

PiperOrigin-RevId: 192727737

6 years ago[XLA] Rename Interpreter{Executor,Platform} -> XlaInterpreter{Executor,Platform}.
Justin Lebar [Fri, 13 Apr 2018 06:05:35 +0000 (23:05 -0700)]
[XLA] Rename Interpreter{Executor,Platform} -> XlaInterpreter{Executor,Platform}.

These types live inside StreamExecutor's namespace, but they are
specific to XLA.  Therefore they either shouldn't live in SE's namespace
or should have "XLA" in the name.

Moving them out of SE's namespace is ugly, because almost every type
used inside of these headers then needs to be qualified.  So name-change
it is.

This patch was generated by a mechanical find/replace.

PiperOrigin-RevId: 192724238

6 years agoAutomated g4 rollback of changelist 192698931
Jiri Simsa [Fri, 13 Apr 2018 04:39:26 +0000 (21:39 -0700)]
Automated g4 rollback of changelist 192698931

PiperOrigin-RevId: 192718697

6 years agoAutomated g4 rollback of changelist 192504411
Jiri Simsa [Fri, 13 Apr 2018 02:56:38 +0000 (19:56 -0700)]
Automated g4 rollback of changelist 192504411

PiperOrigin-RevId: 192711501

6 years agoAdd boolean type to tflite in favor of comparison implementations.
A. Unique TensorFlower [Fri, 13 Apr 2018 02:52:18 +0000 (19:52 -0700)]
Add boolean type to tflite in favor of comparison implementations.

PiperOrigin-RevId: 192711203

6 years agoAutomated g4 rollback of changelist 192691078
Jiri Simsa [Fri, 13 Apr 2018 02:13:18 +0000 (19:13 -0700)]
Automated g4 rollback of changelist 192691078

PiperOrigin-RevId: 192708480

6 years agoEnable efficient feeding of symbolic tensors to placeholders in the Keras backend.
Francois Chollet [Fri, 13 Apr 2018 02:01:10 +0000 (19:01 -0700)]
Enable efficient feeding of symbolic tensors to placeholders in the Keras backend.

PiperOrigin-RevId: 192707345

6 years agoAvoid calling K.learning_phase() when not necessary in Dropout layer since it instant...
Francois Chollet [Fri, 13 Apr 2018 01:36:13 +0000 (18:36 -0700)]
Avoid calling K.learning_phase() when not necessary in Dropout layer since it instantiates a placeholder_with_default, which is not supported by TPU compilation.

PiperOrigin-RevId: 192705478

6 years agoConvert GrapplerFunctionItem to (Specialized)FunctionDef.
A. Unique TensorFlower [Fri, 13 Apr 2018 01:29:05 +0000 (18:29 -0700)]
Convert GrapplerFunctionItem to (Specialized)FunctionDef.

PiperOrigin-RevId: 192704808

6 years agoAdding autograph built-in function checker.
A. Unique TensorFlower [Fri, 13 Apr 2018 01:19:05 +0000 (18:19 -0700)]
Adding autograph built-in function checker.

PiperOrigin-RevId: 192703924

6 years agoReplace tuple<int,int,int> for version info with a class in DnnSupportr::GetVersion...
Sami Kama [Fri, 13 Apr 2018 01:07:50 +0000 (18:07 -0700)]
Replace tuple<int,int,int> for version info with a class in DnnSupportr::GetVersion() (#18434)

* Replace tuple<int,int,int> for version info with a class

* Removed clang-format modifications on non-edited code

* Update dnn.h

Update the comment as per request of reviewer

6 years agoReintroducing support for constants as outputs of tf.data.map(). This fixes a regress...
Jiri Simsa [Fri, 13 Apr 2018 01:02:58 +0000 (18:02 -0700)]
Reintroducing support for constants as outputs of tf.data.map(). This fixes a regression introduced by cl/176147440.

PiperOrigin-RevId: 192702279

6 years agoPrint error msg in CUDATimer.Init() when CreateEvent() is not ok().
James Qin [Fri, 13 Apr 2018 00:35:56 +0000 (17:35 -0700)]
Print error msg in CUDATimer.Init() when CreateEvent() is not ok().

PiperOrigin-RevId: 192699277

6 years agoPorting tests for `rpc_op` to OS.
Jiri Simsa [Fri, 13 Apr 2018 00:32:36 +0000 (17:32 -0700)]
Porting tests for `rpc_op` to OS.

PiperOrigin-RevId: 192698931

6 years agoMove dummy AssertOp and CheckNumericsOp to //third_party/tensorflow/compiler/tf2xla...
A. Unique TensorFlower [Fri, 13 Apr 2018 00:07:35 +0000 (17:07 -0700)]
Move dummy AssertOp and CheckNumericsOp to //third_party/tensorflow/compiler/tf2xla/kernels.
Enable type DT_STRING for AssertOp and ConstOp, in order to make dummy Assert compile with a const string (assert message) as its input.

PiperOrigin-RevId: 192695938

6 years agoFix a typo in cross_tower_ops.
Yuefeng Zhou [Fri, 13 Apr 2018 00:01:55 +0000 (17:01 -0700)]
Fix a typo in cross_tower_ops.

PiperOrigin-RevId: 192694794

6 years agoMisc. small optimizations in Grappler and shape inference code.
A. Unique TensorFlower [Thu, 12 Apr 2018 23:59:57 +0000 (16:59 -0700)]
Misc. small optimizations in Grappler and shape inference code.

Impact on time per optimizer on inception graph:

model_pruner:          590 ms -> 550 ms   (-7%)
function_optimizer:    130 ms -> 130 ms   (-0%)
constant_folding:     7600 ms -> 7550 ms  (-0.7%)
arithmetic_optimizer: 1860 ms -> 1550 ms  (-20%)
loop_optimizer:        320 ms -> 320 ms   (-0%)
dependency_optimizer: 1300 ms -> 720 ms   (-45%)
layout:               1400 ms -> 1400 ms  (-0%)
memory_optimizer:     4200 ms -> 3540 ms  (-16%)
PiperOrigin-RevId: 192694528

6 years agoDocument support for boolean values in tf.contrib.training.HParams.
Stephan Hoyer [Thu, 12 Apr 2018 23:57:40 +0000 (16:57 -0700)]
Document support for boolean values in tf.contrib.training.HParams.

PiperOrigin-RevId: 192694244

6 years ago[XLA:GPU] Pass all four args to custom-call convs when they're created.
Justin Lebar [Thu, 12 Apr 2018 23:56:45 +0000 (16:56 -0700)]
[XLA:GPU] Pass all four args to custom-call convs when they're created.

A custom-call-conv should have four arguments: lhs, rhs, algorithm, and
use-tensor-cores.  CudnnAlgorithmPicker did the right thing, and that
path is exercised 99% of the time.  But CudnnAlgorithmPicker can fail,
and if it does, we're stuck with whatever we had before.  What we had
before only had three of the four args, which is bad.

In addition to fixing it, added an e2e test that catches the bug.

PiperOrigin-RevId: 192694119

6 years agoPropagate sharding of the source instruction to the copies added by layout assignment.
A. Unique TensorFlower [Thu, 12 Apr 2018 23:55:30 +0000 (16:55 -0700)]
Propagate sharding of the source instruction to the copies added by layout assignment.

PiperOrigin-RevId: 192693972

6 years agoChange assertions to use the tensor 'x' rather than 'x.op.name'. This enables eager...
A. Unique TensorFlower [Thu, 12 Apr 2018 23:51:43 +0000 (16:51 -0700)]
Change assertions to use the tensor 'x' rather than 'x.op.name'. This enables eager execution in validate_args=True contexts.

PiperOrigin-RevId: 192693458

6 years agoExposing tensorflow.contrib.proto in the pip package.
Jiri Simsa [Thu, 12 Apr 2018 23:35:47 +0000 (16:35 -0700)]
Exposing tensorflow.contrib.proto in the pip package.

PiperOrigin-RevId: 192691078

6 years agoAdd support for RNN state array of type tf.identity.
A. Unique TensorFlower [Thu, 12 Apr 2018 23:26:13 +0000 (16:26 -0700)]
Add support for RNN state array of type tf.identity.

PiperOrigin-RevId: 192689747

6 years agoAdded a utility to compute a topo ordering of a graph
Benoit Steiner [Thu, 12 Apr 2018 22:41:41 +0000 (15:41 -0700)]
Added a utility to compute a topo ordering of a graph

PiperOrigin-RevId: 192683166

6 years agoFix buildifier issues
Sami Kama [Thu, 12 Apr 2018 22:33:09 +0000 (15:33 -0700)]
Fix buildifier issues

6 years ago[tf.data] Clean up //tensorflow/contrib/data/python/ops/BUILD.
Derek Murray [Thu, 12 Apr 2018 22:20:34 +0000 (15:20 -0700)]
[tf.data] Clean up //tensorflow/contrib/data/python/ops/BUILD.

Create spearate targets for each submodule, so that each test can depend on
the appropriate subset of Python files.

PiperOrigin-RevId: 192679856

6 years agoCheck if the session has been deleted before releasing a callable.
Derek Murray [Thu, 12 Apr 2018 22:20:18 +0000 (15:20 -0700)]
Check if the session has been deleted before releasing a callable.

In some versions of Python, the Session._session field may be cleared
(in `Session.__del__()`) before a callable that has a reference to
that Session is deleted. Add a defensive check in the
`Session._Callable.__del__()` method.

PiperOrigin-RevId: 192679796

6 years agoRemove if_static import
Sami Kama [Thu, 12 Apr 2018 22:17:03 +0000 (15:17 -0700)]
Remove if_static import