platform/upstream/tensorflow.git
6 years agoArithemtic optimization: Rewite Sub(0, y) => Neg(y)
A. Unique TensorFlower [Mon, 26 Feb 2018 18:24:08 +0000 (10:24 -0800)]
Arithemtic optimization: Rewite Sub(0, y) => Neg(y)

PiperOrigin-RevId: 187041872

6 years agoGeneralize the gather_indices dimension that stores indices
Sanjoy Das [Mon, 26 Feb 2018 18:17:15 +0000 (10:17 -0800)]
Generalize the gather_indices dimension that stores indices

This is now exposed as a index_vector_dim dimension number.

Also fixed an off-by-one error in ValidateGatherDimensionNumbers in the
expression computing output_shape_rank.

PiperOrigin-RevId: 187040748

6 years agoFix some breakages in TensorFlow Windows build (#17271)
Yun Peng [Tue, 27 Feb 2018 06:36:01 +0000 (07:36 +0100)]
Fix some breakages in TensorFlow Windows build (#17271)

* Fix configure.py

* Add quantization_utils for building quantize_weights, quantize_nodes, round_weights

Caused by https://github.com/tensorflow/tensorflow/pull/16121

6 years agoUpgrade Jenkins/Docker build scripts to Bazel 0.11.0. (#17280)
Nick Kreeger [Tue, 27 Feb 2018 05:11:36 +0000 (21:11 -0800)]
Upgrade Jenkins/Docker build scripts to Bazel 0.11.0. (#17280)

The 0.10.0 bazel has problems with static-linking on linux:
https://github.com/bazelbuild/bazel/issues/4474. This PR bumps to the
latest bazel that produces proper binaries w/o the linking issue.

6 years agoFix bad wrong jpeg/nasm mirror (#17277)
Martin Wicke [Tue, 27 Feb 2018 02:32:36 +0000 (18:32 -0800)]
Fix bad wrong jpeg/nasm mirror (#17277)

6 years agoAdd missing `override' (#17098)
Daniel Trebbien [Mon, 26 Feb 2018 21:42:07 +0000 (13:42 -0800)]
Add missing `override' (#17098)

This fixes a warning produced by clang:
./tensorflow/core/common_runtime/gpu/gpu_device.h:70:10: warning: 'FillContextMap' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
  Status FillContextMap(const Graph* graph,
         ^
./tensorflow/core/common_runtime/device.h:124:18: note: overridden virtual function is here
  virtual Status FillContextMap(const Graph* graph,

6 years agoMerge pull request #17222 from kbsriram/pool-gradients
Appledore [Mon, 26 Feb 2018 19:31:28 +0000 (11:31 -0800)]
Merge pull request #17222 from kbsriram/pool-gradients

C++ gradients for MaxPool3D, AvgPool and AvgPool3D

6 years agoMerge pull request #17279 from gunan/branch_187038889
Gunhan Gulsoy [Mon, 26 Feb 2018 19:16:30 +0000 (11:16 -0800)]
Merge pull request #17279 from gunan/branch_187038889

Branch 187038889

6 years agoMerge commit for internal changes
Gunhan Gulsoy [Mon, 26 Feb 2018 18:20:02 +0000 (10:20 -0800)]
Merge commit for internal changes

6 years agoFix pip install examples to match text: Use pip and point to Py2 packages
A. Unique TensorFlower [Mon, 26 Feb 2018 18:07:09 +0000 (10:07 -0800)]
Fix pip install examples to match text: Use pip and point to Py2 packages

PiperOrigin-RevId: 187038889

6 years agoFix print format error.
Rui Zhao [Mon, 26 Feb 2018 17:32:47 +0000 (09:32 -0800)]
Fix print format error.

PiperOrigin-RevId: 187033623

6 years ago[XLA:GPU] Fix HLO profiling when multiple streams are involved.
Justin Lebar [Mon, 26 Feb 2018 17:24:38 +0000 (09:24 -0800)]
[XLA:GPU] Fix HLO profiling when multiple streams are involved.

We were enqueueing the timer on the main stream, but not blocking the
substreams, so the results were nonsensical.

PiperOrigin-RevId: 187032412

6 years agoAdd __str__ method to _RefVariableProcessor.
A. Unique TensorFlower [Mon, 26 Feb 2018 16:58:48 +0000 (08:58 -0800)]
Add __str__ method to _RefVariableProcessor.

PiperOrigin-RevId: 187029027

6 years agoDrop the getcallargs extension as its logic had to be moved to a higher level into...
A. Unique TensorFlower [Mon, 26 Feb 2018 16:04:09 +0000 (08:04 -0800)]
Drop the getcallargs extension as its logic had to be moved to a higher level into api.py.

PiperOrigin-RevId: 187022717

6 years agoAnnotate attribute nodes with the value or type of their parent. This helps with...
A. Unique TensorFlower [Mon, 26 Feb 2018 15:21:08 +0000 (07:21 -0800)]
Annotate attribute nodes with the value or type of their parent. This helps with resolving function owners, since using reflection to do it is unreliable.

PiperOrigin-RevId: 187017742

6 years agoFix typo (#17258)
ManHyuk [Sun, 25 Feb 2018 16:09:28 +0000 (01:09 +0900)]
Fix typo (#17258)

* fix typo

6 years ago[XLA] Remove bitcast-converts between same shape.
Jacques Pienaar [Sun, 25 Feb 2018 10:55:29 +0000 (02:55 -0800)]
[XLA] Remove bitcast-converts between same shape.

PiperOrigin-RevId: 186929931

6 years agoRe-enables moving_average_optimizer_test. Resource variable bug fixed by apassos@
A. Unique TensorFlower [Sun, 25 Feb 2018 07:51:54 +0000 (23:51 -0800)]
Re-enables moving_average_optimizer_test. Resource variable bug fixed by apassos@

PiperOrigin-RevId: 186921623

6 years agoupdate documentation to {0, 1} (#17245)
Ming Li [Sun, 25 Feb 2018 06:41:12 +0000 (14:41 +0800)]
update documentation to {0, 1} (#17245)

6 years agoShip TF Eager header with libtensorflow tarballs. (#17230)
Nick Kreeger [Sat, 24 Feb 2018 19:19:21 +0000 (11:19 -0800)]
Ship TF Eager header with libtensorflow tarballs. (#17230)

* Ship TF Eager header with libtensorflow tarballs.

6 years agoUse the new inspect_utils API to to get the function's namespace.
A. Unique TensorFlower [Sat, 24 Feb 2018 14:35:12 +0000 (06:35 -0800)]
Use the new inspect_utils API to to get the function's namespace.

PiperOrigin-RevId: 186884307

6 years agoMerge pull request #16503 from yongtang/16499-unique_with_counts-v2
Andrew M Dai [Sat, 24 Feb 2018 10:08:49 +0000 (02:08 -0800)]
Merge pull request #16503 from yongtang/16499-unique_with_counts-v2

Enable multi-dimensional and axis support for tf.unique_with_counts

6 years agoMerge pull request #17234 from tensorflow/martinwicke-patch-2
Amit Patankar [Sat, 24 Feb 2018 03:40:26 +0000 (19:40 -0800)]
Merge pull request #17234 from tensorflow/martinwicke-patch-2

Add nasm mirror

6 years agoUpdate api_def for UniqueWithCounts/UniqueWithCountsV2
Yong Tang [Sat, 24 Feb 2018 02:44:13 +0000 (02:44 +0000)]
Update api_def for UniqueWithCounts/UniqueWithCountsV2

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd test cases for unique_with_counts_v2
Yong Tang [Sat, 27 Jan 2018 19:58:54 +0000 (19:58 +0000)]
Add test cases for unique_with_counts_v2

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd python wrapper for unique_with_counts
Yong Tang [Sat, 27 Jan 2018 19:57:38 +0000 (19:57 +0000)]
Add python wrapper for unique_with_counts

to call gen_array_ops._unique_with_counts

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoHide UniqueWithCounts and UniqueWithCountsV2 in hidden_ops.txt
Yong Tang [Sat, 27 Jan 2018 19:56:33 +0000 (19:56 +0000)]
Hide UniqueWithCounts and UniqueWithCountsV2 in hidden_ops.txt

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoEnable multi-dimensional and axis support for tf.unique_with_counts
Yong Tang [Sat, 27 Jan 2018 19:48:35 +0000 (19:48 +0000)]
Enable multi-dimensional and axis support for tf.unique_with_counts

This fix tries to address the issue raised in 16499 to bring
multi-dimensional and axis support for `unique_with_counts`.

When `UniqueV2` kernel was added in 12952, it actually supports
multi-dimensional and axis support for `unique_with_counts` as well,
just not registered.

This fix:
1. Register `UniqueWithCountsV2` kernel to have axis support.
2. Hide both `UniqueWithCounts` and `UniqueWithCountsV2`
3. Add python unique_with_counts wrapper to call `gen_array_ops._unique_with_counts`
4. If APi review passes and the PR merges, `unique_with_counts` will switch to `gen_array_ops._unique_with_counts_v2` (in 3 weeks).

This fix fixes 16499.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoExclude more tests for cuda_on_cpu.
Guangda Lai [Sat, 24 Feb 2018 02:18:15 +0000 (18:18 -0800)]
Exclude more tests for cuda_on_cpu.

PiperOrigin-RevId: 186851831

6 years agoRefactor Keras engine by splitting it into short, specialized files.
Francois Chollet [Sat, 24 Feb 2018 01:32:14 +0000 (17:32 -0800)]
Refactor Keras engine by splitting it into short, specialized files.
The purpose of this change is to make the codebase more maintainable and readable.

Before:
engine/topology.py
models.py

After:
engine/base_layer.py
engine/input_layer.py
engine/network.py
engine/sequential.py
engine/saving.py

This is a large change but it only moves code around with no change in logic or API.

New files are all under 1000 lines of logic (network.py is 1500 lines, but under 1000 if you remove imports and docstrings), and often under 500.

PiperOrigin-RevId: 186847895

6 years agoAdd another utility that captures a function's namespace as a mapping from symbol...
A. Unique TensorFlower [Sat, 24 Feb 2018 01:22:37 +0000 (17:22 -0800)]
Add another utility that captures a function's namespace as a mapping from symbol names to actual values.
Update getmethodclass with a hopefully more robust method.

PiperOrigin-RevId: 186847003

6 years agoDropped from previous change.
Alexandre Passos [Sat, 24 Feb 2018 01:19:00 +0000 (17:19 -0800)]
Dropped from previous change.

PiperOrigin-RevId: 186846681

6 years agoCheckpointable: compatibility mode with name-based saving
Allen Lavoie [Sat, 24 Feb 2018 00:59:01 +0000 (16:59 -0800)]
Checkpointable: compatibility mode with name-based saving

Allows loading a name-based checkpoint using the object-based API. When
graph building it's quite seamless. There's no restore-on-create for
eager, so it would require program changes to do much useful there (i.e.
is not seamless).

Adds several tests for checkpoint compatibility (name->object in eager/graph,
and eager->graph/graph->eager for object-based saving)

PiperOrigin-RevId: 186844431

6 years agoMerge pull request #17134 from tensorflow/timeseries-head
Allen Lavoie [Sat, 24 Feb 2018 01:05:24 +0000 (17:05 -0800)]
Merge pull request #17134 from tensorflow/timeseries-head

TFTS: Enhancements to timeseries head

6 years agoCheckpointable: allow using Checkpointable objects in a tf.train.Saver()
Allen Lavoie [Sat, 24 Feb 2018 00:53:21 +0000 (16:53 -0800)]
Checkpointable: allow using Checkpointable objects in a tf.train.Saver()

Checkpointable objects in a Saver's var_list will be unpacked into their
SaveableObjects, possibly running some Python logic along the way.

This should help keep the transition from name-based saving smooth: to save
either way, just override CheckpointableBase._gather_saveables_for_checkpoint.

PiperOrigin-RevId: 186843857

6 years agoRegisters None gradients for ArgMax
Alexandre Passos [Sat, 24 Feb 2018 00:51:50 +0000 (16:51 -0800)]
Registers None gradients for ArgMax

PiperOrigin-RevId: 186843686

6 years agoInternal change.
Zhixian Yan [Sat, 24 Feb 2018 00:51:24 +0000 (16:51 -0800)]
Internal change.

PiperOrigin-RevId: 186843632

6 years agoInternal change.
Jeremy Lau [Sat, 24 Feb 2018 00:48:56 +0000 (16:48 -0800)]
Internal change.

PiperOrigin-RevId: 186843326

6 years agoAdd nasm mirror
Martin Wicke [Sat, 24 Feb 2018 00:26:54 +0000 (16:26 -0800)]
Add nasm mirror

6 years agoAdd Kumaraswamy Bijector, and let Kumaraswamy distribution depend on it.
A. Unique TensorFlower [Sat, 24 Feb 2018 00:05:57 +0000 (16:05 -0800)]
Add Kumaraswamy Bijector, and let Kumaraswamy distribution depend on it.

PiperOrigin-RevId: 186838045

6 years agoAdd custom registered graph optimizers run by MetaOptimizer.
Patrick Nguyen [Sat, 24 Feb 2018 00:04:38 +0000 (16:04 -0800)]
Add custom registered graph optimizers run by MetaOptimizer.

PiperOrigin-RevId: 186837828

6 years agoCheckpointable: Utility to gather initialization ops
Allen Lavoie [Fri, 23 Feb 2018 23:51:23 +0000 (15:51 -0800)]
Checkpointable: Utility to gather initialization ops

A bit safer, since only variables which will be saved get initialized. Graph
building then raises an error when you've used one which won't be saved. Reduces
the need for the global collection.

Makes it a bit easier to deal with initialization when writing graph/eager
agnostic programs.

PiperOrigin-RevId: 186835744

6 years agoeager: Change various examples to use tf.keras.Model instead of tfe.Network.
Asim Shankar [Fri, 23 Feb 2018 23:45:02 +0000 (15:45 -0800)]
eager: Change various examples to use tf.keras.Model instead of tfe.Network.

PiperOrigin-RevId: 186834891

6 years agoAdd test for bug in CUB that caused dynamic partition to fail on the GPU.
A. Unique TensorFlower [Fri, 23 Feb 2018 23:43:09 +0000 (15:43 -0800)]
Add test for bug in CUB that caused dynamic partition to fail on the GPU.

PiperOrigin-RevId: 186834668

6 years agoImprovement to the eager device placement heuristic.
Alexandre Passos [Fri, 23 Feb 2018 23:35:35 +0000 (15:35 -0800)]
Improvement to the eager device placement heuristic.

PiperOrigin-RevId: 186833677

6 years agoAdds unit tests for mean op with uint8_t input data.
A. Unique TensorFlower [Fri, 23 Feb 2018 23:33:22 +0000 (15:33 -0800)]
Adds unit tests for mean op with uint8_t input data.

PiperOrigin-RevId: 186833364

6 years agoEager/C: Add a TF_Status argument to a couple of functions.
A. Unique TensorFlower [Fri, 23 Feb 2018 23:06:46 +0000 (15:06 -0800)]
Eager/C: Add a TF_Status argument to a couple of functions.

PiperOrigin-RevId: 186829318

6 years agoMake tf.size() with optimize=True encode 0 if any dimension is 0.
Skye Wanderman-Milne [Fri, 23 Feb 2018 22:38:37 +0000 (14:38 -0800)]
Make tf.size() with optimize=True encode 0 if any dimension is 0.

PiperOrigin-RevId: 186824964

6 years agoMerge pull request #17148 from halhorn/beam_search_decoder_for_float16
ekelsen [Fri, 23 Feb 2018 22:41:06 +0000 (14:41 -0800)]
Merge pull request #17148 from halhorn/beam_search_decoder_for_float16

fix: Error on we feed float16 values into BeamSearchDecoder

6 years agoMerge pull request #17152 from facaiy/BLD/ci_allow_bad_user_name
ekelsen [Fri, 23 Feb 2018 22:40:50 +0000 (14:40 -0800)]
Merge pull request #17152 from facaiy/BLD/ci_allow_bad_user_name

docker ci allows bad name user

6 years agoMerge pull request #17224 from cclauss/patch-1
ekelsen [Fri, 23 Feb 2018 22:40:21 +0000 (14:40 -0800)]
Merge pull request #17224 from cclauss/patch-1

TF Lite: from six.moves import xrange for Python 3

6 years agoMerge pull request #17139 from deroneriksson/operation_semantics_typos
ekelsen [Fri, 23 Feb 2018 22:40:06 +0000 (14:40 -0800)]
Merge pull request #17139 from deroneriksson/operation_semantics_typos

Fix typos in Operation Semantics docs

6 years agoMake it easier to debug @assert_no_garbage_created unit test failures
Allen Lavoie [Fri, 23 Feb 2018 22:29:41 +0000 (14:29 -0800)]
Make it easier to debug @assert_no_garbage_created unit test failures

Prints a bunch of information about each object.

PiperOrigin-RevId: 186823593

6 years ago* CUB updated to 1.8.0
A. Unique TensorFlower [Fri, 23 Feb 2018 22:22:53 +0000 (14:22 -0800)]
* CUB updated to 1.8.0
* updated ShuffleIndex because of API change

PiperOrigin-RevId: 186822637

6 years agoPreserve user placement as much as possible when optimizing the graph
Benoit Steiner [Fri, 23 Feb 2018 22:22:06 +0000 (14:22 -0800)]
Preserve user placement as much as possible when optimizing the graph

PiperOrigin-RevId: 186822511

6 years agoAutomated g4 rollback of changelist 185688704
Noah Eisen [Fri, 23 Feb 2018 22:08:57 +0000 (14:08 -0800)]
Automated g4 rollback of changelist 185688704

PiperOrigin-RevId: 186820593

6 years agoRespects some form of log_device_placement in eager.
Alexandre Passos [Fri, 23 Feb 2018 22:06:49 +0000 (14:06 -0800)]
Respects some form of log_device_placement in eager.

PiperOrigin-RevId: 186820292

6 years agoMerge pull request #17111 from carlthome/patch-9
ekelsen [Fri, 23 Feb 2018 21:58:21 +0000 (13:58 -0800)]
Merge pull request #17111 from carlthome/patch-9

Add cast functions for complex64 and complex128

6 years ago[XLA] Fix BF16 propagation pass to produce matching fusion root and output.
Yuanzhong Xu [Fri, 23 Feb 2018 21:13:25 +0000 (13:13 -0800)]
[XLA] Fix BF16 propagation pass to produce matching fusion root and output.

Previously, the propagation pass might produce different procision in the fused
computation's root than the fusion itself, when the fused root doesn't define a buffer.

Add explicit converts at such fusion roots.

PiperOrigin-RevId: 186812368

6 years agoMerge pull request #17171 from ilya-biryukov/fix_cuda_compilation
ekelsen [Fri, 23 Feb 2018 21:09:05 +0000 (13:09 -0800)]
Merge pull request #17171 from ilya-biryukov/fix_cuda_compilation

Fix compiler error with cuda-clang

6 years agoMerge pull request #17226 from yifeif/branch_186777369
ekelsen [Fri, 23 Feb 2018 21:07:54 +0000 (13:07 -0800)]
Merge pull request #17226 from yifeif/branch_186777369

Branch 186777369

6 years agoAdd usage example to KMeans Estimator documentation.
A. Unique TensorFlower [Fri, 23 Feb 2018 20:24:53 +0000 (12:24 -0800)]
Add usage example to KMeans Estimator documentation.

PiperOrigin-RevId: 186805772

6 years ago[TF:XLA] Fix a bug where executor's device_ordinal should be passed to AllocateShaped...
Kay Zhu [Fri, 23 Feb 2018 20:24:19 +0000 (12:24 -0800)]
[TF:XLA] Fix a bug where executor's device_ordinal should be passed to AllocateShapedBuffer. Also enable C64 type for interpreter device.

PiperOrigin-RevId: 186805709

6 years agoCleanup for graph functions.
Akshay Agrawal [Fri, 23 Feb 2018 20:18:31 +0000 (12:18 -0800)]
Cleanup for graph functions.

(1) Define constants for the names of Arg and Retval ops, and use them in various places.
(2) Change the signature and documentation for `BuildControlFlow` to reflect the fact that the supplied Graph is not mutated.
(3) Expose the FunctionLibraryRuntime's DeviceMgr, in preparation for multi-device functions.

PiperOrigin-RevId: 186804968

6 years ago[XLA] Internal change.
Kay Zhu [Fri, 23 Feb 2018 19:58:10 +0000 (11:58 -0800)]
[XLA] Internal change.

PiperOrigin-RevId: 186802115

6 years agoRemove repeated defination due to auto-merge.
Yifei Feng [Fri, 23 Feb 2018 19:03:14 +0000 (11:03 -0800)]
Remove repeated defination due to auto-merge.

6 years agoMerge commit for internal changes
Yifei Feng [Fri, 23 Feb 2018 18:43:24 +0000 (10:43 -0800)]
Merge commit for internal changes

6 years agoRemove redundant line which is almost a duplicate of one a few lines below in
A. Unique TensorFlower [Fri, 23 Feb 2018 18:29:58 +0000 (10:29 -0800)]
Remove redundant line which is almost a duplicate of one a few lines below in
datasets_quickstart document.

PiperOrigin-RevId: 186788306

6 years agofrom six.moves import xrange for Python 3
cclauss [Fri, 23 Feb 2018 17:51:28 +0000 (18:51 +0100)]
from six.moves import xrange for Python 3

Lines 1785 and 1818 contain calls to the Python 2-only builtin function __xrange()__ which was removed in Python 3 in favor of __range()__.  This PR adds the line [__from six.moves import xrange__](https://pythonhosted.org/six/#module-six.moves) for compatibility with both Python 2 and Python 3.

6 years agoAllow setting of OpMetadata for Send HLOs.
A. Unique TensorFlower [Fri, 23 Feb 2018 17:15:58 +0000 (09:15 -0800)]
Allow setting of OpMetadata for Send HLOs.

PiperOrigin-RevId: 186777369

6 years agoC++ gradients for MaxPool3D, AvgPool and AvgPool3D
KB Sriram [Thu, 22 Feb 2018 15:21:39 +0000 (07:21 -0800)]
C++ gradients for MaxPool3D, AvgPool and AvgPool3D

Resolves tensorflow/tensorflow#17195

6 years agoLet variables initialized from checkpoints answer ".initialized_value()" correctly.
A. Unique TensorFlower [Fri, 23 Feb 2018 10:16:32 +0000 (02:16 -0800)]
Let variables initialized from checkpoints answer ".initialized_value()" correctly.

PiperOrigin-RevId: 186741832

6 years agoMerge pull request #17202 from yifeif/branch_186662441
Gunhan Gulsoy [Fri, 23 Feb 2018 05:42:51 +0000 (21:42 -0800)]
Merge pull request #17202 from yifeif/branch_186662441

Branch 186662441

6 years agoUnify metropolis_hastings interface with HMC kernel.
Dustin Tran [Fri, 23 Feb 2018 04:02:33 +0000 (20:02 -0800)]
Unify metropolis_hastings interface with HMC kernel.

PiperOrigin-RevId: 186716023

6 years agoEnable constant propagation across Switch(x,x) by rewriting the two outputs as Const...
A. Unique TensorFlower [Fri, 23 Feb 2018 03:47:03 +0000 (19:47 -0800)]
Enable constant propagation across Switch(x,x) by rewriting the two outputs as Const(false), Const(true) with appropriate control dependencies. This is a fairly common pattern when the graph contains assertions.

By rewriting the graph a bit, we can propagate the constants down the two output branches, and just use control dependencies to trigger the selected one at runtime. For example,
         +------+
     x-->|Switch|-->a
     x-->|      |-->b
         +------+

Is rewritten as

         +------+
     x-->|Switch|-->Identity--^>Const(false)-->a
     x-->|      |-->Identity--^>Const(true)-->b
         +------+

(In practice there may be multiple consumers of each output branch.)

PiperOrigin-RevId: 186714991

6 years agoPass 'mode' argument to input_fn if appropriate in TPUEstimator.
A. Unique TensorFlower [Fri, 23 Feb 2018 02:34:32 +0000 (18:34 -0800)]
Pass 'mode' argument to input_fn if appropriate in TPUEstimator.

PiperOrigin-RevId: 186709373

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Fri, 23 Feb 2018 02:18:20 +0000 (18:18 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 186707935

6 years ago[XLA] Add SliceInDim to the local Python XLA client.
A. Unique TensorFlower [Fri, 23 Feb 2018 02:13:40 +0000 (18:13 -0800)]
[XLA] Add SliceInDim to the local Python XLA client.
[XLA] Revise a comment regarding how the two-argument version of Reshape flattens dimensions (it's first-to-last, not major-to-minor since those terms apply to memory layout rather than logical dimensions, and the comment wasn't consistent about major-to-minor or minor-to-major).

PiperOrigin-RevId: 186707393

6 years agoAdd cost estimator tests for the BiasAdd, ReLU, and Conv2D operations.
A. Unique TensorFlower [Fri, 23 Feb 2018 02:02:04 +0000 (18:02 -0800)]
Add cost estimator tests for the BiasAdd, ReLU, and Conv2D operations.

PiperOrigin-RevId: 186705930

6 years agoFix fix Defun logic when returning a value captured from an outer scope.
Derek Murray [Fri, 23 Feb 2018 02:01:16 +0000 (18:01 -0800)]
Fix fix Defun logic when returning a value captured from an outer scope.

Previously, the following would fail:

```python
c = tf.constant(...)
@Defun(...)
def Foo(...):
  return c
```

The fix involves ensuring that every output of the function is a member of the function graph, and invoking the capturing logic if it is not.

PiperOrigin-RevId: 186705800

6 years agoTurn on strip_default_attrs by default during custom export.
A. Unique TensorFlower [Fri, 23 Feb 2018 01:52:58 +0000 (17:52 -0800)]
Turn on strip_default_attrs by default during custom export.

PiperOrigin-RevId: 186704976

6 years agoMoved LIBXSMM convolutions to a separate --define flag so that they are disabled...
A. Unique TensorFlower [Fri, 23 Feb 2018 01:19:49 +0000 (17:19 -0800)]
Moved LIBXSMM convolutions to a separate --define flag so that they are disabled by default.

PiperOrigin-RevId: 186700936

6 years agoLSTM support: Quantized types, quantization params for 16-bit unfused LSTMs.
A. Unique TensorFlower [Fri, 23 Feb 2018 00:53:40 +0000 (16:53 -0800)]
LSTM support: Quantized types, quantization params for 16-bit unfused LSTMs.

PiperOrigin-RevId: 186697357

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Fri, 23 Feb 2018 00:50:27 +0000 (16:50 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 186696903

6 years agoClarify ownership story of TfLiteIntArray* nodes_to_replace
Andrew Selle [Fri, 23 Feb 2018 00:49:48 +0000 (16:49 -0800)]
Clarify ownership story of TfLiteIntArray* nodes_to_replace

PiperOrigin-RevId: 186696787

6 years agoSupport degenerate strided slicing under XLA.
Igor Ganichev [Fri, 23 Feb 2018 00:42:55 +0000 (16:42 -0800)]
Support degenerate strided slicing under XLA.

For example, when start, end, and stride are all positive, but `start` is
greater than `end`, tf2xla used to raise an error instead of returning a
tensor with that dimension size being 0. Latter is the regular
tensorflow and python behavior. This change makes XLA behave the same
way.

PiperOrigin-RevId: 186695842

6 years agoInternal change.
A. Unique TensorFlower [Fri, 23 Feb 2018 00:40:41 +0000 (16:40 -0800)]
Internal change.

PiperOrigin-RevId: 186695534

6 years ago[XLA] Enable most xla/tests for interpreter.
Kay Zhu [Fri, 23 Feb 2018 00:40:19 +0000 (16:40 -0800)]
[XLA] Enable most xla/tests for interpreter.

PiperOrigin-RevId: 186695486

6 years agoAdd to disabled tests the date they were last ran and failed.
Bixia Zheng [Fri, 23 Feb 2018 00:37:30 +0000 (16:37 -0800)]
Add to disabled tests the date they were last ran and failed.

This is to address the comments in cl/186664459.

PiperOrigin-RevId: 186695081

6 years agoAdd integration tests for remote build execution.
A. Unique TensorFlower [Fri, 23 Feb 2018 00:34:47 +0000 (16:34 -0800)]
Add integration tests for remote build execution.

PiperOrigin-RevId: 186694734

6 years agoNew Mutex operations for a distributed-happy and Function-less CriticalSection.
Eugene Brevdo [Fri, 23 Feb 2018 00:18:34 +0000 (16:18 -0800)]
New Mutex operations for a distributed-happy and Function-less CriticalSection.

Original idea by Alex Passos; impl and cancellation handling by Eugene Brevdo with help from Alex.

PiperOrigin-RevId: 186692306

6 years agoAdd a regression test for virtual_scheduler.
Max Galkin [Fri, 23 Feb 2018 00:13:00 +0000 (16:13 -0800)]
Add a regression test for virtual_scheduler.

PiperOrigin-RevId: 186691392

6 years agoImplement the logic to parse TensorProto (the tensor value for input or filter shape...
A. Unique TensorFlower [Thu, 22 Feb 2018 23:34:50 +0000 (15:34 -0800)]
Implement the logic to parse TensorProto (the tensor value for input or filter shape info) in op_level_cost_estimator.

PiperOrigin-RevId: 186685409

6 years ago[tf.data] Handle a function-raised OutOfRange error correctly in ParallelMapDataset.
Derek Murray [Thu, 22 Feb 2018 23:06:45 +0000 (15:06 -0800)]
[tf.data] Handle a function-raised OutOfRange error correctly in ParallelMapDataset.

PiperOrigin-RevId: 186680982

6 years agoMerge changes from github.
Yifei Feng [Thu, 22 Feb 2018 22:24:57 +0000 (14:24 -0800)]
Merge changes from github.

PiperOrigin-RevId: 186674197

6 years agoInternal change.
Jeremy Lau [Thu, 22 Feb 2018 22:20:35 +0000 (14:20 -0800)]
Internal change.

PiperOrigin-RevId: 186673561

6 years agoAdds support for identifying dilated convolution emulation.
A. Unique TensorFlower [Thu, 22 Feb 2018 21:54:25 +0000 (13:54 -0800)]
Adds support for identifying dilated convolution emulation.

Dilated convolution can be emulated by a chain of SpaceToBatchND -> Conv2D -> BatchtoSpaceND. This change adds a graph transformation that identifies this pattern, and variations of it, and substitutes a true dilated convolution instead.

PiperOrigin-RevId: 186669260

6 years agoEnable int64 outfeed.
Jacques Pienaar [Thu, 22 Feb 2018 21:43:57 +0000 (13:43 -0800)]
Enable int64 outfeed.

PiperOrigin-RevId: 186667574

6 years ago[XLA] Enable F16 convolution test for CPU.
Bixia Zheng [Thu, 22 Feb 2018 21:23:47 +0000 (13:23 -0800)]
[XLA] Enable F16 convolution test for CPU.

Remove TODO(b/72509305) as the issue has been fixed.

PiperOrigin-RevId: 186664459

6 years agoMerge commit for internal changes
Yifei Feng [Thu, 22 Feb 2018 21:24:35 +0000 (13:24 -0800)]
Merge commit for internal changes