Jacques Pienaar [Sat, 5 May 2018 19:02:32 +0000 (12:02 -0700)]
[TPU] Add option to only compile a replicated graph.
Useful when wanting to compile a computation but not run it. Returns a serialized CompilationResult string with the error message.
PiperOrigin-RevId:
195547847
Shashi Shekhar [Sat, 5 May 2018 18:55:53 +0000 (11:55 -0700)]
Allow benchmark model graph to be specified in text proto format.
PiperOrigin-RevId:
195547670
Justin Lebar [Sat, 5 May 2018 18:24:06 +0000 (11:24 -0700)]
[XLA] Always be willing to duplicate widening kConvert instructions during fusion.
This has the effect of pushing widening kConvert HLOs into consumers.
This is what we want, because it means that the producer writes the
narrower type (e.g. f16) and the consumer reads it and internally
upcasts to the wider type (e.g. f32). This lets the producer and
consumer both run faster, because they have to touch less memory.
PiperOrigin-RevId:
195546910
Mingsheng Hong [Sat, 5 May 2018 14:10:58 +0000 (07:10 -0700)]
Part 2 of Swift<->TF sends/recvs: support receiving tensors in TF from
Swift via direct session.
The changes are:
1. Added a TF experimental C API for Swift host to enqueue a tensor for sending
to TF. Again, the C APIs can be removed once the Fifo-queue based design
proves stable later.
2. TFLowerGraph is extended to generate Fifo related nodes for TF to receive
tensors. This is similar to the extension for TF to send tensors.
3. TFPartition is extended to support host send (createHostSend()), which does
the tensor send via a new protocol method TensorSendableReceivable.sendToDevice().
The main complexity is in sending a scalar, where a new protocol method
TensorSendableReceivable.createScalarTensor() is called to first create a tensor
out of it, and then send it over to TF.
Also removed code for protocol conformance on AccelerableByTensorFlow. Instead
have compiler look up that conformance from the SILFunction on sending/receiving
tensors.
AccelerableByTensorFlow could be removed from the compiler-known protocol list
now, but we'll defer that till things can stabilized more (in the past this
protocol has been added to and removed from the list at different times).
PiperOrigin-RevId:
195539436
Sanjoy Das [Sat, 5 May 2018 05:04:20 +0000 (22:04 -0700)]
Remove uses of the kTransposeDot fusion
I didn't remove the enum itself, but after this change removing the enum should
be a simple NFC change (famous last words!).
This will make it easier to implement BatchDot on CPU.
The change removes usages of kTransposeDot by:
- Teaching TransposeFolding to "fuse" transposes into dots by flipping the
lhs_contracting_dims/rhs_contracting_dims fields.
- Replacing the notion of transpose_lhs/transpose_rhs in the IR emitters with
"has a non-canonical LHS contraction dimension"/"has a non-canonical RHS
contraction dimension" where the canonical LHS and RHS contraction dims [0]
are 1 and 0.
Some tests were getting away with creating Dot instructions with their
dimensions numbers unset. I've fixed these to create canonical dot operations
instead.
It is possible (but hard to tell without trying) that some of the IR emission
logic and Eigen runtime calls can now be simplified further. For instance,
instead of passing in a `transpose_lhs` and `transpose_rhs` to the Eigen GEMM
routines, we could instead pass in the LHS and RHS contraction dimensions
directly.
[0] See HloInstruction::CreateCanonicalDot.
PiperOrigin-RevId:
195514907
Shashi Shekhar [Sat, 5 May 2018 02:18:44 +0000 (19:18 -0700)]
Fix landscape layout.
PiperOrigin-RevId:
195506194
A. Unique TensorFlower [Sat, 5 May 2018 01:49:08 +0000 (18:49 -0700)]
OVIC Benchmarker App (current without the functionality to bind to a CPU).
PiperOrigin-RevId:
195503895
A. Unique TensorFlower [Sat, 5 May 2018 01:49:08 +0000 (18:49 -0700)]
add support for PadV2
PiperOrigin-RevId:
195503894
Allen Lavoie [Sat, 5 May 2018 01:25:18 +0000 (18:25 -0700)]
Checkpointable: A small utility for exempting objects from __setattr__ tracking
Exposes it as tf.contrib.checkpoint.NoDependency. Objects wrapped in a
NoDependency object get unwrapped in __setattr__ and not tracked.
Removes the _save_counter dependency from tf.train.Checkpoint (the save counter
is still tracked as "save_counter" and always has been, so this is a
backwards-compatible dependency removal).
PiperOrigin-RevId:
195502562
Max Galkin [Sat, 5 May 2018 01:17:45 +0000 (18:17 -0700)]
GuaranteeConst is a NoOp for the op_level_cost_estiamtor.
PiperOrigin-RevId:
195501990
A. Unique TensorFlower [Sat, 5 May 2018 01:07:41 +0000 (18:07 -0700)]
Internal Change
PiperOrigin-RevId:
195501342
A. Unique TensorFlower [Sat, 5 May 2018 00:46:13 +0000 (17:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId:
195499636
A. Unique TensorFlower [Sat, 5 May 2018 00:18:35 +0000 (17:18 -0700)]
Update ops-related pbtxt files.
PiperOrigin-RevId:
195497084
Jiri Simsa [Sat, 5 May 2018 00:03:52 +0000 (17:03 -0700)]
[tf.data] Adding `num_parallel_calls` to `map_and_batch`.
PiperOrigin-RevId:
195495206
Bjarke Hammersholt Roune [Fri, 4 May 2018 23:51:06 +0000 (16:51 -0700)]
Add infrastructure for a backend-specific configuration for each op. This is intentionally not exposed in ComputationBuilder and is not intended for use or to be set at all prior to the last backend-specific part of compilation.
PiperOrigin-RevId:
195493500
A. Unique TensorFlower [Fri, 4 May 2018 23:37:27 +0000 (16:37 -0700)]
Expose read-only versions of tensors in tflite.
PiperOrigin-RevId:
195491701
Karmel Allison [Fri, 4 May 2018 23:01:02 +0000 (16:01 -0700)]
Add the ability to export separate SavedModels for train and eval mode to Estimator with two new methods, available in tf.contrib: export_all_saved_models and export_saved_model_for_mode.
PiperOrigin-RevId:
195485922
Justin Lebar [Fri, 4 May 2018 22:40:07 +0000 (15:40 -0700)]
[XLA] Print allowed attributes when the user specifies an invalid attr.
PiperOrigin-RevId:
195482974
Benoit Steiner [Fri, 4 May 2018 22:14:00 +0000 (15:14 -0700)]
Identify and prune nodes that can never be executed
PiperOrigin-RevId:
195478951
James Qin [Fri, 4 May 2018 21:53:58 +0000 (14:53 -0700)]
Fix build failure for macos py3
PiperOrigin-RevId:
195475780
Justin Lebar [Fri, 4 May 2018 21:40:02 +0000 (14:40 -0700)]
[XLA:GPU] Mark floating-point division as an inexpensive op.
"Expensive" really means "so expensive you'd choose not to fuse in order
to avoid doing it twice". FP division definitely isn't that expensive.
PiperOrigin-RevId:
195473524
A. Unique TensorFlower [Fri, 4 May 2018 19:28:42 +0000 (12:28 -0700)]
Some fixes to support another TF graph:
1. Fix ResolveBatchNormalization to avoid deleting arrays that may still be
used.
2. Correctly count the number of ops using a given array, even when some ops
use the same array as more than one of their inputs.
3. In PropagateFixedSizes for Concatenation ops, when resolving a -1 wildcard
to a fixed value, we were doing so in a local 'axis' variable without actually
updating op->axis! The resulting -1 value still in op->axis tripped runtime code,
causing the concatenation to misbehave during inference.
PiperOrigin-RevId:
195454037
A. Unique TensorFlower [Fri, 4 May 2018 18:40:20 +0000 (11:40 -0700)]
[XLA] Redesign: migrate the SWIG wrapped xla client.
Added LocalOp that wraps XlaOp, so that it's fully visible to swig.
PiperOrigin-RevId:
195446939
A. Unique TensorFlower [Fri, 4 May 2018 18:40:01 +0000 (11:40 -0700)]
[XLA] Cleanup client_library_test_base: move definition of CreateParameterAndTransferLiteral to .cc file
PiperOrigin-RevId:
195446864
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
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
A. Unique TensorFlower [Fri, 4 May 2018 17:47:38 +0000 (10:47 -0700)]
Improve broadcast add implementation.
PiperOrigin-RevId:
195437679
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
Alan Chiao [Fri, 4 May 2018 17:31:01 +0000 (10:31 -0700)]
Implement neg op
PiperOrigin-RevId:
195435079
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
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
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
A. Unique TensorFlower [Fri, 4 May 2018 09:22:14 +0000 (02:22 -0700)]
Do not crash on ROOT outfeed operations.
PiperOrigin-RevId:
195388075
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
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
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
HyoukJoong Lee [Fri, 4 May 2018 07:51:58 +0000 (00:51 -0700)]
Automated g4 rollback of changelist
194829761
PiperOrigin-RevId:
195379693
A. Unique TensorFlower [Fri, 4 May 2018 06:36:02 +0000 (23:36 -0700)]
Internal change.
PiperOrigin-RevId:
195374319
Yuefeng Zhou [Fri, 4 May 2018 05:01:39 +0000 (22:01 -0700)]
Add the MultiWorkerMirroredStrategy
PiperOrigin-RevId:
195368876
A. Unique TensorFlower [Fri, 4 May 2018 02:45:59 +0000 (19:45 -0700)]
[XLA] Redesign: cleanup client_library_test_base.
PiperOrigin-RevId:
195357555
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
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
A. Unique TensorFlower [Fri, 4 May 2018 00:03:03 +0000 (17:03 -0700)]
[XLA] Redesign: deprecate ComputationBuilder.
PiperOrigin-RevId:
195335330
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
Russell Power [Thu, 3 May 2018 23:16:05 +0000 (16:16 -0700)]
Adjust worker shutdown hooks for TPUs
PiperOrigin-RevId:
195328247
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
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
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
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
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
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
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
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
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
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
Jianwei Xie [Thu, 3 May 2018 20:54:29 +0000 (13:54 -0700)]
Fix a typo.
PiperOrigin-RevId:
195305770
Akshay Agrawal [Thu, 3 May 2018 20:40:20 +0000 (13:40 -0700)]
Documentation for tf.contrib.eager.py_func
PiperOrigin-RevId:
195303454
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
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
A. Unique TensorFlower [Thu, 3 May 2018 20:09:30 +0000 (13:09 -0700)]
Fix bugs in model pruner.
PiperOrigin-RevId:
195298816
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
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
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
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
Allen Lavoie [Thu, 3 May 2018 19:53:47 +0000 (12:53 -0700)]
Small fix for an eager colab notebook.
PiperOrigin-RevId:
195296384
Yao Zhang [Thu, 3 May 2018 19:19:01 +0000 (12:19 -0700)]
Simplify file reading and support SavedModel.
PiperOrigin-RevId:
195291836
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
A. Unique TensorFlower [Thu, 3 May 2018 18:16:06 +0000 (11:16 -0700)]
[XLA] Redesign: add ExecuteGraph to grpc service.
PiperOrigin-RevId:
195281004
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
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
Tony Wang [Thu, 3 May 2018 04:37:04 +0000 (21:37 -0700)]
Simplify getter and setter method for GraphOptimizationPass::name_
PiperOrigin-RevId:
195199912
Andrew Selle [Thu, 3 May 2018 04:15:01 +0000 (21:15 -0700)]
Expose Interpreter to tensorflow.contrib.lite
PiperOrigin-RevId:
195198645
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
A. Unique TensorFlower [Thu, 3 May 2018 02:19:12 +0000 (19:19 -0700)]
Update ops-related pbtxt files.
PiperOrigin-RevId:
195190335
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
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
A. Unique TensorFlower [Thu, 3 May 2018 01:19:16 +0000 (18:19 -0700)]
Remove duplicated emplace_back floor operator.
PiperOrigin-RevId:
195185567
A. Unique TensorFlower [Thu, 3 May 2018 01:11:25 +0000 (18:11 -0700)]
Automated g4 rollback of changelist
195091587
PiperOrigin-RevId:
195184798
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
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
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
Benoit Steiner [Thu, 3 May 2018 00:00:16 +0000 (17:00 -0700)]
Handle negative values when slicing symbolic shapes
PiperOrigin-RevId:
195176133
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
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
A. Unique TensorFlower [Wed, 2 May 2018 23:05:43 +0000 (16:05 -0700)]
Add RNNEstimator which takes in arbitrary heads.
PiperOrigin-RevId:
195167853
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
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
Jianwei Xie [Wed, 2 May 2018 22:36:54 +0000 (15:36 -0700)]
Adds the EvalListener support for run_local.
PiperOrigin-RevId:
195163507
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
Priya Gupta [Wed, 2 May 2018 22:30:30 +0000 (15:30 -0700)]
Add prefetching to one device distribution strategy.
PiperOrigin-RevId:
195162570
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
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
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
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
Chris Ying [Wed, 2 May 2018 22:03:33 +0000 (15:03 -0700)]
Add steps_per_run to LoggingTensorHook and StepCounterHook and other logging bug fixes.
PiperOrigin-RevId:
195158238
A. Unique TensorFlower [Wed, 2 May 2018 21:58:57 +0000 (14:58 -0700)]
Fix support for batch_normalization with mixed precision
When the type of the input tensor `x` is not the same as the type of
the parameters `mean`, `variance`, `offset`, and `scale`, a cast is
required.
This mixed precision case occurs when using the BatchNormalization
layer with a data type of float16 or bfloat16.
PiperOrigin-RevId:
195157279
A. Unique TensorFlower [Wed, 2 May 2018 20:44:30 +0000 (13:44 -0700)]
Updated ABSL to latest version in workspace.bzl.
PiperOrigin-RevId:
195144612
A. Unique TensorFlower [Wed, 2 May 2018 20:42:40 +0000 (13:42 -0700)]
Fix a bug in create_python_api.py
I got an error complaining about "RuntimeError: dictionary changed size during iteration", this change fixes it.
PiperOrigin-RevId:
195144333
Sanjoy Das [Wed, 2 May 2018 20:36:31 +0000 (13:36 -0700)]
[XLA] Add new optimization that sinks constants into while loop bodies
Example transformation:
state = (..., const, ...)
while (pred(state)) {
(..., v, ...) = state
use(v)
state = (..., v, ...)
}
=>
state = (..., const, ...)
while (pred(state)) {
(..., v, ...) = state
use(const)
state = (..., v, ...)
}
PiperOrigin-RevId:
195143323
Jiri Simsa [Wed, 2 May 2018 20:29:01 +0000 (13:29 -0700)]
Re-enabling a test.
PiperOrigin-RevId:
195142105