platform/upstream/tensorflow.git
6 years agoMerge pull request #18192 from karllessard/java-ops-2c-generator
Martin Wicke [Mon, 7 May 2018 17:44:07 +0000 (10:44 -0700)]
Merge pull request #18192 from karllessard/java-ops-2c-generator

Generate Java ops wrappers

6 years agoUpdate zlib version for cmake build (#19118)
Yong Tang [Mon, 7 May 2018 16:16:35 +0000 (18:16 +0200)]
Update zlib version for cmake build (#19118)

In cmake build, the zlib version was `50893291621658f355bc5b4d450a8d06a563053d`
which is equal to v1.2.8. This creates a discrepancy between cmake and bazel build.

This fix updates the zlib version to v1.2.11 that syncs with bazel build.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoEmbed Java license in generator code
karl@kubx.ca [Sun, 6 May 2018 14:11:35 +0000 (10:11 -0400)]
Embed Java license in generator code

6 years agoRemove comment left-over
Karl Lessard [Sat, 5 May 2018 14:48:22 +0000 (10:48 -0400)]
Remove comment left-over

6 years agoSkip all ops with function attribute by default
karl@kubx.ca [Sat, 5 May 2018 14:44:20 +0000 (10:44 -0400)]
Skip all ops with function attribute by default

6 years agoMerge pull request #19090 from caisq/branch_195443326
Shanqing Cai [Sat, 5 May 2018 01:34:58 +0000 (21:34 -0400)]
Merge pull request #19090 from caisq/branch_195443326

Branch 195443326

6 years agoMerge pull request #19087 from ManHyuk/fix_typo
Amit Patankar [Fri, 4 May 2018 20:16:29 +0000 (13:16 -0700)]
Merge pull request #19087 from ManHyuk/fix_typo

Fix typo

6 years agoMerge commit for internal changes
Shanqing Cai [Fri, 4 May 2018 18:53:06 +0000 (14:53 -0400)]
Merge commit for internal changes

6 years agoAdd operations before Identity operations should be quantized.
Suharsh Sivakumar [Fri, 4 May 2018 18:17:17 +0000 (11:17 -0700)]
Add operations before Identity operations should be quantized.

Fixes #19014

PiperOrigin-RevId: 195443326

6 years agoInternal clean up: change scanf to use int64_t instead of int64
A. Unique TensorFlower [Fri, 4 May 2018 17:50:29 +0000 (10:50 -0700)]
Internal clean up: change scanf to use int64_t instead of int64

PiperOrigin-RevId: 195438212

6 years agoImprove broadcast add implementation.
A. Unique TensorFlower [Fri, 4 May 2018 17:47:38 +0000 (10:47 -0700)]
Improve broadcast add implementation.

PiperOrigin-RevId: 195437679

6 years agoTFTS: Make it easier to swap in different autoregressive models.
Allen Lavoie [Fri, 4 May 2018 17:37:42 +0000 (10:37 -0700)]
TFTS: Make it easier to swap in different autoregressive models.

Adds a very simple LSTM encoder/decoder option as an example.

ARModel's new constructor argument is a bit awkward, since Estimator's new graphs mean we need a Model factory rather than a Model (or to un-build the model?). It's still a much more pleasant way to write autoregressive models than fiddling with ARModel directly, since ARModel handles collecting all the features (and the prediction loop, etc.). Happy to hear other ideas for an API.

PiperOrigin-RevId: 195436186

6 years agoImplement neg op
Alan Chiao [Fri, 4 May 2018 17:31:01 +0000 (10:31 -0700)]
Implement neg op

PiperOrigin-RevId: 195435079

6 years agoChange RecvTensor RPC implementation to use DeviceContext::CopyDeviceTensorToCPU...
Peter Hawkins [Fri, 4 May 2018 17:18:46 +0000 (10:18 -0700)]
Change RecvTensor RPC implementation to use DeviceContext::CopyDeviceTensorToCPU rather than calling GPUUtil::CopyGPUTensorToCPU. The direct call into the GPU code is problematic for non-GPU devices.

PiperOrigin-RevId: 195433287

6 years ago[XLA] Remove template keyword on non-template methods.
Benjamin Kramer [Fri, 4 May 2018 10:43:00 +0000 (03:43 -0700)]
[XLA] Remove template keyword on non-template methods.

This is an error with clang trunk.

PiperOrigin-RevId: 195394277

6 years agoFix HloSharding::GetSubSharding to return correct array shardings
A. Unique TensorFlower [Fri, 4 May 2018 10:27:18 +0000 (03:27 -0700)]
Fix HloSharding::GetSubSharding to return correct array shardings

Previously it always returned a tuple sharding even if the specified
index was referenceing a non-tuple element.

PiperOrigin-RevId: 195393313

6 years agoDo not crash on ROOT outfeed operations.
A. Unique TensorFlower [Fri, 4 May 2018 09:22:14 +0000 (02:22 -0700)]
Do not crash on ROOT outfeed operations.

PiperOrigin-RevId: 195388075

6 years agoFixing some linter errors in TF documentation (Github > GitHub, the the > the).
A. Unique TensorFlower [Fri, 4 May 2018 09:04:33 +0000 (02:04 -0700)]
Fixing some linter errors in TF documentation (Github > GitHub, the the > the).

PiperOrigin-RevId: 195386172

6 years agoPrefer non-nested GradientTape.gradient call when only one source is passed.
Tom Hennigan [Fri, 4 May 2018 08:57:02 +0000 (01:57 -0700)]
Prefer non-nested GradientTape.gradient call when only one source is passed.

PiperOrigin-RevId: 195385406

6 years ago * Don't copy on-host and on-device shapes locally.
A. Unique TensorFlower [Fri, 4 May 2018 08:47:12 +0000 (01:47 -0700)]
  * Don't copy on-host and on-device shapes locally.
  * Use ForEachMutableElement rather than the iterators, as it is much quicker.

There is still room for improvement; ForEachMutableElement is linear in the number of nodes in the shape tree but we want to be linear in the number of nodes in the sub shape tree. But I feel this is a good enough improvement.

PiperOrigin-RevId: 195384423

6 years agoAutomated g4 rollback of changelist 194829761
HyoukJoong Lee [Fri, 4 May 2018 07:51:58 +0000 (00:51 -0700)]
Automated g4 rollback of changelist 194829761

PiperOrigin-RevId: 195379693

6 years agoInternal change.
A. Unique TensorFlower [Fri, 4 May 2018 06:36:02 +0000 (23:36 -0700)]
Internal change.

PiperOrigin-RevId: 195374319

6 years agoAdd the MultiWorkerMirroredStrategy
Yuefeng Zhou [Fri, 4 May 2018 05:01:39 +0000 (22:01 -0700)]
Add the MultiWorkerMirroredStrategy

PiperOrigin-RevId: 195368876

6 years ago[XLA] Redesign: cleanup client_library_test_base.
A. Unique TensorFlower [Fri, 4 May 2018 02:45:59 +0000 (19:45 -0700)]
[XLA] Redesign: cleanup client_library_test_base.

PiperOrigin-RevId: 195357555

6 years ago[XLA] Make LocalShapedBuffer::FromLiteral fallible by passing StatusOr wrapper.
Chris Leary [Fri, 4 May 2018 01:08:34 +0000 (18:08 -0700)]
[XLA] Make LocalShapedBuffer::FromLiteral fallible by passing StatusOr wrapper.

PiperOrigin-RevId: 195345724

6 years agoClear the stat cache of the target when renaming the file.
Ruoxin Sang [Fri, 4 May 2018 00:21:26 +0000 (17:21 -0700)]
Clear the stat cache of the target when renaming the file.

PiperOrigin-RevId: 195337886

6 years ago[XLA] Redesign: deprecate ComputationBuilder.
A. Unique TensorFlower [Fri, 4 May 2018 00:03:03 +0000 (17:03 -0700)]
[XLA] Redesign: deprecate ComputationBuilder.

PiperOrigin-RevId: 195335330

6 years agoFix flaky test time-outs for dnn_test and rnn_test.
A. Unique TensorFlower [Thu, 3 May 2018 23:34:11 +0000 (16:34 -0700)]
Fix flaky test time-outs for dnn_test and rnn_test.

PiperOrigin-RevId: 195331183

6 years agoAdjust worker shutdown hooks for TPUs
Russell Power [Thu, 3 May 2018 23:16:05 +0000 (16:16 -0700)]
Adjust worker shutdown hooks for TPUs

PiperOrigin-RevId: 195328247

6 years agoFix bugs in LogicalBuffer::ToString and BufferValue::ToProto: these functions
Jeremy Lau [Thu, 3 May 2018 23:08:48 +0000 (16:08 -0700)]
Fix bugs in LogicalBuffer::ToString and BufferValue::ToProto: these functions
may be called before set_color(), but color() check fails when no color is set.

PiperOrigin-RevId: 195327063

6 years agoFix oom_test so that it doesn't try to allocate a giant host buffer when
Justin Lebar [Thu, 3 May 2018 22:58:43 +0000 (15:58 -0700)]
Fix oom_test so that it doesn't try to allocate a giant host buffer when
run without --config=cuda.  Sadly the best way I could come up with is
pretty hacky.

PiperOrigin-RevId: 195325149

6 years agoDo not hoist nodes that modify frame info.
A. Unique TensorFlower [Thu, 3 May 2018 22:42:23 +0000 (15:42 -0700)]
Do not hoist nodes that modify frame info.

PiperOrigin-RevId: 195322927

6 years agoUse tuple instead of list to reduce the chance of it being picked by the list convers...
Dan Moldovan [Thu, 3 May 2018 22:39:46 +0000 (15:39 -0700)]
Use tuple instead of list to reduce the chance of it being picked by the list conversions.

PiperOrigin-RevId: 195322522

6 years agoFix bug that disabled loop invariant node motion optimizer. Disable it options, since...
A. Unique TensorFlower [Thu, 3 May 2018 22:20:05 +0000 (15:20 -0700)]
Fix bug that disabled loop invariant node motion optimizer. Disable it options, since it is broken in the presence of gradient stacks.

Get rid of an unnecessary copy of the graph.

PiperOrigin-RevId: 195319766

6 years agoAdd tflite listed models with accuracy and performance numbers.
Zhixian Yan [Thu, 3 May 2018 21:34:27 +0000 (14:34 -0700)]
Add tflite listed models with accuracy and performance numbers.

PiperOrigin-RevId: 195312636

6 years agoAdd separate get_read and get_updated helpers that work on code exceprts. Handle...
A. Unique TensorFlower [Thu, 3 May 2018 21:18:07 +0000 (14:18 -0700)]
Add separate get_read and get_updated helpers that work on code exceprts. Handle corner case for AugAssign. Fix bug in _node_sets_self_attribute.

PiperOrigin-RevId: 195309809

6 years ago[TF:XLA] clean up interface to xla::VerifyHloModule
Nick Desaulniers [Thu, 3 May 2018 21:16:27 +0000 (14:16 -0700)]
[TF:XLA] clean up interface to xla::VerifyHloModule

It seems that the first argument, platform, is unused.

PiperOrigin-RevId: 195309504

6 years agoOptimize idempotent ops, e.g., Snapshot(Snapshot(x)) => Snapshot(x)
A. Unique TensorFlower [Thu, 3 May 2018 21:11:13 +0000 (14:11 -0700)]
Optimize idempotent ops, e.g., Snapshot(Snapshot(x)) => Snapshot(x)

PiperOrigin-RevId: 195308675

6 years ago[XLA:CPU] Remove dead function + DCHECK, NFC
Sanjoy Das [Thu, 3 May 2018 21:00:56 +0000 (14:00 -0700)]
[XLA:CPU] Remove dead function + DCHECK, NFC

There isn't a lot of benefit to fixing the function to do that it says it does
since I'm adding support for lowering batch matmul which will break this
precondition anyway.

PiperOrigin-RevId: 195306803

6 years agoFix a typo.
Jianwei Xie [Thu, 3 May 2018 20:54:29 +0000 (13:54 -0700)]
Fix a typo.

PiperOrigin-RevId: 195305770

6 years agoDocumentation for tf.contrib.eager.py_func
Akshay Agrawal [Thu, 3 May 2018 20:40:20 +0000 (13:40 -0700)]
Documentation for tf.contrib.eager.py_func

PiperOrigin-RevId: 195303454

6 years agoMerge branch 'fix_typo' of https://github.com/ManHyuk/tensorflow into fix_typo
manhyuk [Fri, 4 May 2018 16:54:16 +0000 (01:54 +0900)]
Merge branch 'fix_typo' of https://github.com/ManHyuk/tensorflow into fix_typo

6 years agofix typo
manhyuk [Fri, 4 May 2018 16:53:35 +0000 (01:53 +0900)]
fix typo

6 years agoAdd conditions:default to mkl build (#19008)
William D. Irons [Fri, 4 May 2018 13:19:03 +0000 (08:19 -0500)]
Add conditions:default to mkl build (#19008)

If building on a system that is not darwin, linux_x86_64, or
windows, the select statement in third_party/mkl/BUILD fails to
find a match and fails. Need to use no mkl libraries for non-x86
systems

Fixes #18084

6 years agoMerge pull request #19072 from caisq/branch_195301913
Shanqing Cai [Fri, 4 May 2018 13:08:57 +0000 (09:08 -0400)]
Merge pull request #19072 from caisq/branch_195301913

Branch 195301913

6 years agoSecond code review
karl@kubx.ca [Fri, 4 May 2018 02:39:35 +0000 (22:39 -0400)]
Second code review

6 years agoSimplify and improve generics handling in generator
karl@kubx.ca [Mon, 30 Apr 2018 11:38:48 +0000 (07:38 -0400)]
Simplify and improve generics handling in generator

6 years agoImprove again javadoc readability and quality
karl@kubx.ca [Wed, 25 Apr 2018 04:39:37 +0000 (00:39 -0400)]
Improve again javadoc readability and quality

6 years agoComments and little improvements to documentation parser
karl@kubx.ca [Tue, 24 Apr 2018 13:09:01 +0000 (09:09 -0400)]
Comments and little improvements to documentation parser

6 years agoImprove Javadoc and include first code review
karl@kubx.ca [Fri, 6 Apr 2018 12:56:54 +0000 (08:56 -0400)]
Improve Javadoc and include first code review

6 years agoParse op definition and generate a Java Op class.
Karl Lessard [Wed, 28 Mar 2018 21:28:16 +0000 (05:28 +0800)]
Parse op definition and generate a Java Op class.

6 years agoFix minor typos (#19070)
Sergii Khomenko [Fri, 4 May 2018 02:22:09 +0000 (04:22 +0200)]
Fix minor typos (#19070)

6 years agoMerge commit for internal changes
Shanqing Cai [Fri, 4 May 2018 00:34:51 +0000 (20:34 -0400)]
Merge commit for internal changes

6 years agotfdbg + tflearn: replace deprecated classes and methods in example & docs
Shanqing Cai [Thu, 3 May 2018 20:30:12 +0000 (13:30 -0700)]
tfdbg + tflearn: replace deprecated classes and methods in example & docs

* `tf.contrib.learn.Experiment` is deprecated. Remove it from debug_tflearn_iris.py.
* Use `tf.estimator.DNNClassifier`, instead of the older one from `tf.contrib.learn`.
* Use `train()`, instead of `fit()` of Estimators.
* `Estimator.predict()` supports hooks. Add example lines for that.

PiperOrigin-RevId: 195301913

6 years agoCheckpointable: Utilities to read object metadata
Allen Lavoie [Thu, 3 May 2018 20:22:33 +0000 (13:22 -0700)]
Checkpointable: Utilities to read object metadata

Useful for inspecting checkpoints programatically (e.g. in unit tests).

PiperOrigin-RevId: 195300780

6 years agoFix bugs in model pruner.
A. Unique TensorFlower [Thu, 3 May 2018 20:09:30 +0000 (13:09 -0700)]
Fix bugs in model pruner.

PiperOrigin-RevId: 195298816

6 years agoSimplified the implementation of shape_n since the optimized code path isn't needed...
Benoit Steiner [Thu, 3 May 2018 20:09:28 +0000 (13:09 -0700)]
Simplified the implementation of shape_n since the optimized code path isn't needed anymore and can be incorrect in some rare cases.

PiperOrigin-RevId: 195298813

6 years agoChange all std::bind usages in GCS to lambdas. Fix the wrong #define Guard name in...
Ruoxin Sang [Thu, 3 May 2018 20:03:48 +0000 (13:03 -0700)]
Change all std::bind usages in GCS to lambdas. Fix the wrong #define Guard name in retrying_file_system.h.

PiperOrigin-RevId: 195297877

6 years agoEnable unary chain hoisting optimization for concat/split/splitv by default.
A. Unique TensorFlower [Thu, 3 May 2018 20:00:56 +0000 (13:00 -0700)]
Enable unary chain hoisting optimization for concat/split/splitv by default.

PiperOrigin-RevId: 195297330

6 years ago[TF:XLA] Bump open source llvm revision to r331442
Sanjoy Das [Thu, 3 May 2018 19:59:33 +0000 (12:59 -0700)]
[TF:XLA] Bump open source llvm revision to r331442

PiperOrigin-RevId: 195297133

6 years agoSmall fix for an eager colab notebook.
Allen Lavoie [Thu, 3 May 2018 19:53:47 +0000 (12:53 -0700)]
Small fix for an eager colab notebook.

PiperOrigin-RevId: 195296384

6 years agoSimplify file reading and support SavedModel.
Yao Zhang [Thu, 3 May 2018 19:19:01 +0000 (12:19 -0700)]
Simplify file reading and support SavedModel.

PiperOrigin-RevId: 195291836

6 years agoDo not delegate temporary tensors to NNAPI.
A. Unique TensorFlower [Thu, 3 May 2018 19:00:57 +0000 (12:00 -0700)]
Do not delegate temporary tensors to NNAPI.
  - also added delegation for MUL, and set the default scale to be 0.0f.

PiperOrigin-RevId: 195288948

6 years ago[XLA] Redesign: add ExecuteGraph to grpc service.
A. Unique TensorFlower [Thu, 3 May 2018 18:16:06 +0000 (11:16 -0700)]
[XLA] Redesign: add ExecuteGraph to grpc service.

PiperOrigin-RevId: 195281004

6 years agoUpdate learning.py (#19064)
Aditya Yogi [Thu, 3 May 2018 18:13:40 +0000 (23:43 +0530)]
Update learning.py (#19064)

6 years agoFixed Typos (#18806)
Nicholas Nadeau, P.Eng., AVS [Thu, 3 May 2018 17:47:06 +0000 (13:47 -0400)]
Fixed Typos (#18806)

* fixed typos

6 years agoPost-transform pass to dedupe large constant arrays.
A. Unique TensorFlower [Thu, 3 May 2018 16:10:06 +0000 (09:10 -0700)]
Post-transform pass to dedupe large constant arrays.

PiperOrigin-RevId: 195260578

6 years agoGrammar fixes on architecture.md (#19035)
ctiijima [Thu, 3 May 2018 15:34:07 +0000 (08:34 -0700)]
Grammar fixes on architecture.md (#19035)

6 years agoMerge pull request #19040 from tensorflow/merge_branch
Amit Patankar [Thu, 3 May 2018 14:18:04 +0000 (07:18 -0700)]
Merge pull request #19040 from tensorflow/merge_branch

Merge r1.8 back to master after 1.8.0 release.

6 years agocorrect code snippets to python3 style (#19052)
Letian Feng [Thu, 3 May 2018 13:46:16 +0000 (15:46 +0200)]
correct code snippets to python3 style (#19052)

6 years agoUse tensorflow size to determine number of elements instead of the static shape,...
Suharsh Sivakumar [Thu, 3 May 2018 07:16:09 +0000 (00:16 -0700)]
Use tensorflow size to determine number of elements instead of the static shape, which can sometimes be missing.

PiperOrigin-RevId: 195209826

6 years agoEnabling support for S3 and Google Storage for the MKL Docker image. (#19039)
Elson Rodriguez [Thu, 3 May 2018 04:58:44 +0000 (21:58 -0700)]
Enabling support for S3 and Google Storage for the MKL Docker image. (#19039)

6 years agoSimplify getter and setter method for GraphOptimizationPass::name_
Tony Wang [Thu, 3 May 2018 04:37:04 +0000 (21:37 -0700)]
Simplify getter and setter method for GraphOptimizationPass::name_

PiperOrigin-RevId: 195199912

6 years agoExpose Interpreter to tensorflow.contrib.lite
Andrew Selle [Thu, 3 May 2018 04:15:01 +0000 (21:15 -0700)]
Expose Interpreter to tensorflow.contrib.lite

PiperOrigin-RevId: 195198645

6 years agoFix typos (#18475)
Taehoon Lee [Thu, 3 May 2018 03:01:04 +0000 (12:01 +0900)]
Fix typos (#18475)

6 years agoFix tf.variable_scope unique name after entering root scope
Mostafa Alaa [Thu, 3 May 2018 02:53:18 +0000 (19:53 -0700)]
Fix tf.variable_scope unique name after entering root scope
Closes #18702.

PiperOrigin-RevId: 195192460

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 3 May 2018 02:19:12 +0000 (19:19 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 195190335

6 years agoReplaced calls to tensorflow::StringPiece::ToString with std::string conversions.
A. Unique TensorFlower [Thu, 3 May 2018 01:52:02 +0000 (18:52 -0700)]
Replaced calls to tensorflow::StringPiece::ToString with std::string conversions.
That is, instances of sp.ToString() are replaced with std::string(sp).

This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view.

PiperOrigin-RevId: 195188185

6 years agoCompute shape of segment_ids dynamically in _unsorted_segment_N
A. Unique TensorFlower [Thu, 3 May 2018 01:35:55 +0000 (18:35 -0700)]
Compute shape of segment_ids dynamically in _unsorted_segment_N

PiperOrigin-RevId: 195186950

6 years agoRemove duplicated emplace_back floor operator.
A. Unique TensorFlower [Thu, 3 May 2018 01:19:16 +0000 (18:19 -0700)]
Remove duplicated emplace_back floor operator.

PiperOrigin-RevId: 195185567

6 years agoAutomated g4 rollback of changelist 195091587
A. Unique TensorFlower [Thu, 3 May 2018 01:11:25 +0000 (18:11 -0700)]
Automated g4 rollback of changelist 195091587

PiperOrigin-RevId: 195184798

6 years agoAdd complex128 support to FFT, FFT2D, FFT3D, IFFT, IFFT2D, and IFFT3D.
RJ Ryan [Thu, 3 May 2018 00:57:27 +0000 (17:57 -0700)]
Add complex128 support to FFT, FFT2D, FFT3D, IFFT, IFFT2D, and IFFT3D.

NumPy automatically upcasts to complex128 when computing FFTs, leading to issues like:
#10749

This change allows users to choose between 32-bit and 64-bit precision FFTs on CPU and GPU.

PiperOrigin-RevId: 195183206

6 years agoAdd go_package to proto definition files (#17262)
Yong Tang [Thu, 3 May 2018 00:45:29 +0000 (02:45 +0200)]
Add go_package to proto definition files (#17262)

* Add go_package to proto definition files

This fix tries to address the issue raised in 16282 by
add go_package to proto files, so that generated go files
have correct path.

This fix fixes 16282.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add go_package to proto definition in tensorflow/core/framework

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add go_package to proto definition in tensorflow/core/example

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add go_package to proto definition in tensorflow/core/example

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
6 years agoAdd a collect_trace option to run_op_benchmark for cases when callers just want
Anna R [Thu, 3 May 2018 00:41:26 +0000 (17:41 -0700)]
Add a collect_trace option to run_op_benchmark for cases when callers just want
to pass RunOptions.FULL_TRACE but don't want to store trace in extras.

PiperOrigin-RevId: 195181533

6 years agoBufferValue is a new base class for LogicalBuffer and HloValue. This makes it
Jeremy Lau [Thu, 3 May 2018 00:25:10 +0000 (17:25 -0700)]
BufferValue is a new base class for LogicalBuffer and HloValue. This makes it
easier to migrate from TuplePointsToAnalysis/LogicalBuffer to
HloDataflowAnalysis/HloValue. No functional changes.

PiperOrigin-RevId: 195179676

6 years agoHandle negative values when slicing symbolic shapes
Benoit Steiner [Thu, 3 May 2018 00:00:16 +0000 (17:00 -0700)]
Handle negative values when slicing symbolic shapes

PiperOrigin-RevId: 195176133

6 years agoAllow `Layer.add_loss` to receive non-tensor; fixes error triggered when using a...
Francois Chollet [Wed, 2 May 2018 23:58:35 +0000 (16:58 -0700)]
Allow `Layer.add_loss` to receive non-tensor; fixes error triggered when using a weight regularizer of factor 0.

PiperOrigin-RevId: 195175909

6 years agoEnable reshape of _ScopedAllocatorConcat output.
Ayush Dubey [Wed, 2 May 2018 23:13:06 +0000 (16:13 -0700)]
Enable reshape of _ScopedAllocatorConcat output.

The _ScopedAllocatorConcat kernel outputs the backing tensor after performing
runtime bounds checks.  However, the shape of the backing tensor may not match
the desired output shape of the concat operation.

This change adds a "reshape" boolean attribute to _ScopedAllocatorConcat kernel.
When this attribute is set to true, the kernel outputs a reshaped backing tensor
according to the "shape" attribute.

PiperOrigin-RevId: 195169105

6 years agoAdd RNNEstimator which takes in arbitrary heads.
A. Unique TensorFlower [Wed, 2 May 2018 23:05:43 +0000 (16:05 -0700)]
Add RNNEstimator which takes in arbitrary heads.

PiperOrigin-RevId: 195167853

6 years agoMark all nodes processed by AddOpsRewrite/MinBCast stages with a tag.
A. Unique TensorFlower [Wed, 2 May 2018 23:04:09 +0000 (16:04 -0700)]
Mark all nodes processed by AddOpsRewrite/MinBCast stages with a tag.

PiperOrigin-RevId: 195167597

6 years agoAllow evaluation and prediction through warm-starting (no current checkpoint / model_...
A. Unique TensorFlower [Wed, 2 May 2018 22:51:16 +0000 (15:51 -0700)]
Allow evaluation and prediction through warm-starting (no current checkpoint / model_dir).

PiperOrigin-RevId: 195165732

6 years agoAdds the EvalListener support for run_local.
Jianwei Xie [Wed, 2 May 2018 22:36:54 +0000 (15:36 -0700)]
Adds the EvalListener support for run_local.

PiperOrigin-RevId: 195163507

6 years agoAdding a version of rolled triangular solver code for the right-multiply case, which...
A. Unique TensorFlower [Wed, 2 May 2018 22:35:11 +0000 (15:35 -0700)]
Adding a version of rolled triangular solver code for the right-multiply case, which is used in Cholesky decomposition.  Replacing the unrolled version with a While loop drastically reduces XLA compilation times which allows much larger models to be run on TPU.

PiperOrigin-RevId: 195163298

6 years agoAdd prefetching to one device distribution strategy.
Priya Gupta [Wed, 2 May 2018 22:30:30 +0000 (15:30 -0700)]
Add prefetching to one device distribution strategy.

PiperOrigin-RevId: 195162570

6 years agoReplaced calls to tensorflow::StringPiece::ToString with std::string conversions.
Peter Hawkins [Wed, 2 May 2018 23:22:41 +0000 (16:22 -0700)]
Replaced calls to tensorflow::StringPiece::ToString with std::string conversions.
That is, instances of sp.ToString() are replaced with std::string(sp).

This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view.

PiperOrigin-RevId: 195162126

6 years agoMerge pull request #18909 from samikama/optimization_pass
gracehoney [Wed, 2 May 2018 22:50:03 +0000 (15:50 -0700)]
Merge pull request #18909 from samikama/optimization_pass

Optimization pass and Memory allocator integration

6 years agoMerge 1.8.0 back to master.
Yifei Feng [Wed, 2 May 2018 22:24:50 +0000 (15:24 -0700)]
Merge 1.8.0 back to master.

6 years agoOptimize LogicalOr and LogicalAnd with all true or false inputs:
A. Unique TensorFlower [Wed, 2 May 2018 22:21:17 +0000 (15:21 -0700)]
Optimize LogicalOr and LogicalAnd with all true or false inputs:

LogicalOr(x, true) = true
LogicalOr(x, false) = x
LogicalAnd(x, true) = x
LogicalAnd(x, false) = false

and similar if the first argument is constant.

PiperOrigin-RevId: 195161140

6 years ago[XLA] BF16 propagation: do not change if propagation is confined inside a fusion.
Yuanzhong Xu [Wed, 2 May 2018 22:14:08 +0000 (15:14 -0700)]
[XLA] BF16 propagation: do not change if propagation is confined inside a fusion.

We now use a set to track all the potential changes, and do the actual changes
on the HLOs at the end. This also makes the boolean return value (whether
anything is changed) correct.

PiperOrigin-RevId: 195160025

6 years ago[TF:XLA] Bump open source llvm revision to r331338
Sanjoy Das [Wed, 2 May 2018 22:05:58 +0000 (15:05 -0700)]
[TF:XLA] Bump open source llvm revision to r331338

PiperOrigin-RevId: 195158710