platform/upstream/tensorflow.git
6 years agoFix test failure
Yuefeng Zhou [Tue, 20 Mar 2018 00:04:28 +0000 (17:04 -0700)]
Fix test failure

PiperOrigin-RevId: 189666053

6 years agoAutomated g4 rollback of changelist 188440916
Lukasz Kaiser [Mon, 19 Mar 2018 23:56:44 +0000 (16:56 -0700)]
Automated g4 rollback of changelist 188440916

PiperOrigin-RevId: 189664854

6 years agoDisable lstm test in generated_example due to state non-definitive init.
Zhixian Yan [Mon, 19 Mar 2018 22:50:02 +0000 (15:50 -0700)]
Disable lstm test in generated_example due to state non-definitive init.

PiperOrigin-RevId: 189654943

6 years agoA few changes to improve the real data performance:
Xiaoqiang Zheng [Mon, 19 Mar 2018 22:40:37 +0000 (15:40 -0700)]
A few changes to improve the real data performance:
* Turn off the force_gpu_compatible by default.
* Move the cast operator within the processing operator.
* Have the map_and_batch operator produce gpu_compatible output.
* Add an option to produce fp16 tensors for network transfer by default.

On DGX-1 V100, with resnet50, I got 5050 images/sec on real data, 5395 images/sec on synthetic data.
With trivial model, I got 13000+ images/sec on real data.

PiperOrigin-RevId: 189653575

6 years agoRun flatbuffer verifier before reading a TFLITE file into toco.
A. Unique TensorFlower [Mon, 19 Mar 2018 22:13:53 +0000 (15:13 -0700)]
Run flatbuffer verifier before reading a TFLITE file into toco.

PiperOrigin-RevId: 189649236

6 years agoUse fully-qualified function names and avoid the need to replace attributes.
A. Unique TensorFlower [Mon, 19 Mar 2018 22:09:23 +0000 (15:09 -0700)]
Use fully-qualified function names and avoid the need to replace attributes.

PiperOrigin-RevId: 189648496

6 years agoAllowing the FunctionBufferingResource to be passed in thread_pool_size=0 in which...
Rohan Jain [Mon, 19 Mar 2018 22:06:40 +0000 (15:06 -0700)]
Allowing the FunctionBufferingResource to be passed in thread_pool_size=0 in which case we wouldn't pass in a runner to the FLR::Run call and rely on the underlying device threadpool instead.

PiperOrigin-RevId: 189648051

6 years agoMaintain an updateable map of devices in the eager context.
Akshay Modi [Mon, 19 Mar 2018 21:57:09 +0000 (14:57 -0700)]
Maintain an updateable map of devices in the eager context.

PiperOrigin-RevId: 189646358

6 years agoFix build breakage with downloadable clang and -fopenmp.
Ilya Biryukov [Mon, 19 Mar 2018 21:48:23 +0000 (14:48 -0700)]
Fix build breakage with downloadable clang and -fopenmp.

By disabling openmp when building with clang.
If we want to enable openmp with clang, we'll probably have to have libomp as
an explicit dependency.

This fixes a breakage found by OS CI:
https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu-clang/215/

PiperOrigin-RevId: 189644968

6 years agoTFLite Delegate: Add an `allow_dynamic_tensors` parameter.
Yu-Cheng Ling [Mon, 19 Mar 2018 21:27:52 +0000 (14:27 -0700)]
TFLite Delegate: Add an `allow_dynamic_tensors` parameter.

PiperOrigin-RevId: 189641833

6 years agoEnable stack push removal optimization by default.
A. Unique TensorFlower [Mon, 19 Mar 2018 21:27:06 +0000 (14:27 -0700)]
Enable stack push removal optimization by default.

PiperOrigin-RevId: 189641729

6 years agoTurned on gradient optimization by default
Benoit Steiner [Mon, 19 Mar 2018 21:24:00 +0000 (14:24 -0700)]
Turned on gradient optimization by default

PiperOrigin-RevId: 189641300

6 years agoAdd a helper that allows constructing simple expression ASTs from string. Useful...
A. Unique TensorFlower [Mon, 19 Mar 2018 21:09:52 +0000 (14:09 -0700)]
Add a helper that allows constructing simple expression ASTs from string. Useful to simplify the representation of composite symbols, e.g. 'py2tf.foo'.

PiperOrigin-RevId: 189638901

6 years agoAutomated g4 rollback of changelist 189416074
Derek Murray [Mon, 19 Mar 2018 20:44:23 +0000 (13:44 -0700)]
Automated g4 rollback of changelist 189416074

PiperOrigin-RevId: 189634491

6 years agoMoves TFE_Executor to tensorflow::EagerExecutor in tensorflow/core/common_runtime...
Alexandre Passos [Mon, 19 Mar 2018 20:43:50 +0000 (13:43 -0700)]
Moves TFE_Executor to tensorflow::EagerExecutor in tensorflow/core/common_runtime/eager

PiperOrigin-RevId: 189634404

6 years agoTFE: Fix bug encountered when using `optimizer.apply_gradients` in a defun.
Akshay Agrawal [Mon, 19 Mar 2018 20:38:23 +0000 (13:38 -0700)]
TFE: Fix bug encountered when using `optimizer.apply_gradients` in a defun.

Prior to this change, `Optimizer` assumed that `not
context.executing_eagerly()` implied that every variable that it was to update
was constructed in a graph. That assumption is incorrect --- TensorFlow
functions can mutate variables captured from or lifted into the eager context. As such, this change removes that assumption.

Fixes #17792

PiperOrigin-RevId: 189633630

6 years agoAdd bfloat16 support for CPU ops.
A. Unique TensorFlower [Mon, 19 Mar 2018 20:26:19 +0000 (13:26 -0700)]
Add bfloat16 support for CPU ops.

PiperOrigin-RevId: 189631659

6 years agoExtract GraphOptimizer{Stage,Context}, and use it as a base class
A. Unique TensorFlower [Mon, 19 Mar 2018 20:03:22 +0000 (13:03 -0700)]
Extract GraphOptimizer{Stage,Context}, and use it as a base class
in ArithmeticOptimizer.

PiperOrigin-RevId: 189628227

6 years agoCheckpointable: Small cleanup making better use of NewCheckpointReader.
Allen Lavoie [Mon, 19 Mar 2018 20:01:58 +0000 (13:01 -0700)]
Checkpointable: Small cleanup making better use of NewCheckpointReader.

PiperOrigin-RevId: 189627956

6 years ago Add a map from TPU core id to name to TfOpStats.
A. Unique TensorFlower [Mon, 19 Mar 2018 19:15:59 +0000 (12:15 -0700)]
  Add a map from TPU core id to name to TfOpStats.

PiperOrigin-RevId: 189620850

6 years agoDo not use SparseMatmul to for bfloat16 as Matmul is already supported.
A. Unique TensorFlower [Mon, 19 Mar 2018 18:29:44 +0000 (11:29 -0700)]
Do not use SparseMatmul to for bfloat16 as Matmul is already supported.

PiperOrigin-RevId: 189614197

6 years agoInternal change
A. Unique TensorFlower [Mon, 19 Mar 2018 18:27:45 +0000 (11:27 -0700)]
Internal change

PiperOrigin-RevId: 189613870

6 years agoOptimizations to DepthwiseConv
A. Unique TensorFlower [Mon, 19 Mar 2018 18:11:28 +0000 (11:11 -0700)]
Optimizations to DepthwiseConv

PiperOrigin-RevId: 189610985

6 years agoDocumentation tweaks and tests for GradientTape with graph execution.
Asim Shankar [Mon, 19 Mar 2018 17:37:00 +0000 (10:37 -0700)]
Documentation tweaks and tests for GradientTape with graph execution.

PiperOrigin-RevId: 189604536

6 years agoFix misc typos in tensorflow/compiler/xla.
A. Unique TensorFlower [Mon, 19 Mar 2018 16:50:00 +0000 (09:50 -0700)]
Fix misc typos in tensorflow/compiler/xla.

PiperOrigin-RevId: 189596520

6 years agoSimple rewrite to remove negation nodes.
A. Unique TensorFlower [Mon, 19 Mar 2018 16:43:59 +0000 (09:43 -0700)]
Simple rewrite to remove negation nodes.

PiperOrigin-RevId: 189595735

6 years agoRefactor code to improve TensorDataSet construction speed.
A. Unique TensorFlower [Mon, 19 Mar 2018 16:42:14 +0000 (09:42 -0700)]
Refactor code to improve TensorDataSet construction speed.

PiperOrigin-RevId: 189595482

6 years agoRemove a few unused #includes
A. Unique TensorFlower [Mon, 19 Mar 2018 16:28:58 +0000 (09:28 -0700)]
Remove a few unused #includes

PiperOrigin-RevId: 189593522

6 years agoAdds missing protobuf dep to tf.contrib.data ops.
A. Unique TensorFlower [Mon, 19 Mar 2018 14:29:45 +0000 (07:29 -0700)]
Adds missing protobuf dep to tf.contrib.data ops.

PiperOrigin-RevId: 189580464

6 years agoAdding non-linear image warping ops to tf.contrib.image
A. Unique TensorFlower [Mon, 19 Mar 2018 13:27:00 +0000 (06:27 -0700)]
Adding non-linear image warping ops to tf.contrib.image

New ops are:
tf.contrib.image.sparse_image_warp, tf.contrib.image.dense_image_warp, and tf.contrib.image.interpolate_spline.

PiperOrigin-RevId: 189574951

6 years agoAdd new helpers to HLO sharding.
A. Unique TensorFlower [Mon, 19 Mar 2018 12:01:05 +0000 (05:01 -0700)]
Add new helpers to HLO sharding.

PiperOrigin-RevId: 189569053

6 years agoAdd precision and recall metrics to _BinaryLogisticHeadWithSigmoidCrossEntropyLoss.
A. Unique TensorFlower [Sun, 18 Mar 2018 22:18:06 +0000 (15:18 -0700)]
Add precision and recall metrics to _BinaryLogisticHeadWithSigmoidCrossEntropyLoss.

This change makes most of the binary classifiers in the canned estimators provide precision and recall metrics during evaluation. This matches the behavior of the canned estimators defined in the deprecated tf.contrib.learn.estimator.

PiperOrigin-RevId: 189522420

6 years agoFix build
A. Unique TensorFlower [Sun, 18 Mar 2018 14:48:30 +0000 (07:48 -0700)]
Fix build

PiperOrigin-RevId: 189506945

6 years agoNormally tf2xla (autoclustering, jit_scope and rewrite) rely on graph optimization
A. Unique TensorFlower [Sat, 17 Mar 2018 18:21:02 +0000 (11:21 -0700)]
Normally tf2xla (autoclustering, jit_scope and rewrite) rely on graph optimization
passes to outline subgraphs. The XLA device itself only sees Compute() calls for
_XlaLaunch ops. All other ops are registered with a dummy op factory that just
prints an error.

This patch adds an alternative, selected at registration time, that disables
default graph optimization and instead registers a non-dummy op implementation.

This op implementation compiles the op "on demand"; it generates a fake graph containing
_Arg and _Retval nodes and calls into the XlaCompiler code as usual.

This allows the device to be used as a "normal" TensorFlow device, as well as from
Eager mode, at the expense of performance.

Later additions will add the ability to create traces to amortize kernel launch overhead,
and the ability to combine op-by-op/tracing and autoclustering with jit_scope annotations.

PiperOrigin-RevId: 189463593

6 years ago[XLA] Fix points-to set calculation in HLO ListScheduler.
Peter Hawkins [Sat, 17 Mar 2018 16:57:03 +0000 (09:57 -0700)]
[XLA] Fix points-to set calculation in HLO ListScheduler.

Previously the list scheduler considered that an instruction used only the buffers defined by its operands. This is inaccurate in the presence of aliasing?an instruction may potentially use anything in the points-to set of the operand, including buffers defined by an ancestor of an operand. Change to use the full points-to set instead.

PiperOrigin-RevId: 189460681

6 years agoUpdate docs for fake quant to reflect support for bitwidths from 2 to 16 inclusive.
Raghuraman Krishnamoorthi [Sat, 17 Mar 2018 02:26:56 +0000 (19:26 -0700)]
Update docs for fake quant to reflect support for bitwidths from 2 to 16 inclusive.

PiperOrigin-RevId: 189426173

6 years agoAutomated g4 rollback of changelist 189228094
Derek Murray [Sat, 17 Mar 2018 00:10:16 +0000 (17:10 -0700)]
Automated g4 rollback of changelist 189228094

PiperOrigin-RevId: 189416074

6 years agoAdd user_ops.my_fact to the new TensorFlow API.
Anna R [Sat, 17 Mar 2018 00:05:51 +0000 (17:05 -0700)]
Add user_ops.my_fact to the new TensorFlow API.

PiperOrigin-RevId: 189415577

6 years agoTFTS: Allow cold-starting from SavedModels
Allen Lavoie [Sat, 17 Mar 2018 00:00:17 +0000 (17:00 -0700)]
TFTS: Allow cold-starting from SavedModels

This means the model starts from its default start state and is fed a series
(filtering) to warm up its state. This warmed up state can then be used to
make predictions.

Some shape fiddling with the receiver_fn to make feeding state optional, and a
new signature for cold-starting which uses the model's default start state.

Some other shape fiddling to make feeding strings to SavedModels work more
smoothly in the cold-start part of the LSTM example. I was squeezing out the
last dimension of "scalar" exogenous features, now I'm leaving them, which
matches the placeholder generation logic.

PiperOrigin-RevId: 189414869

6 years agoRelax "_output_shapes" error checking in C++ graph importer.
Skye Wanderman-Milne [Fri, 16 Mar 2018 23:27:02 +0000 (16:27 -0700)]
Relax "_output_shapes" error checking in C++ graph importer.

This is to make the behavior inline with what Python's
import_graph_def does. It'd probably be better to raise an error, but
some people are already depending on the import_graph_def behavior in
order to import modified ops.

PiperOrigin-RevId: 189411025

6 years agoAlways sets self._built in tfe.metrics when build() is called.
Alexandre Passos [Fri, 16 Mar 2018 23:10:46 +0000 (16:10 -0700)]
Always sets self._built in tfe.metrics when build() is called.

PiperOrigin-RevId: 189408745

6 years agoDeleted dead code
Benoit Steiner [Fri, 16 Mar 2018 23:07:06 +0000 (16:07 -0700)]
Deleted dead code

PiperOrigin-RevId: 189408200

6 years agoIncrease kMaxEagerTensorParentSize to 64.
A. Unique TensorFlower [Fri, 16 Mar 2018 23:00:11 +0000 (16:00 -0700)]
Increase kMaxEagerTensorParentSize to 64.

PiperOrigin-RevId: 189407226

6 years agoRemove identity transpose nodes.
A. Unique TensorFlower [Fri, 16 Mar 2018 22:55:14 +0000 (15:55 -0700)]
Remove identity transpose nodes.

PiperOrigin-RevId: 189406518

6 years agoConsolidate all moving_average updates in batchnorm into one implementation.
Yuefeng Zhou [Fri, 16 Mar 2018 22:36:15 +0000 (15:36 -0700)]
Consolidate all moving_average updates in batchnorm into one implementation.

PiperOrigin-RevId: 189404070

6 years agoDon't fail when optimizing the gradients of noinline functions
Benoit Steiner [Fri, 16 Mar 2018 22:31:10 +0000 (15:31 -0700)]
Don't fail when optimizing the gradients of noinline functions

PiperOrigin-RevId: 189403170

6 years ago[XLA] Fix forward for HLO profiling test, explicitly set profiling preference.
Chris Leary [Fri, 16 Mar 2018 22:13:25 +0000 (15:13 -0700)]
[XLA] Fix forward for HLO profiling test, explicitly set profiling preference.

PiperOrigin-RevId: 189400869

6 years agoDon't inline functions in the grappler item builder since this part of the code doesn't
Benoit Steiner [Fri, 16 Mar 2018 22:10:39 +0000 (15:10 -0700)]
Don't inline functions in the grappler item builder since this part of the code doesn't
support custom ops. Instead we will rely on the function optimizer.

PiperOrigin-RevId: 189400462

6 years agoDowngrade run-after-mutation error to a log warning.
Skye Wanderman-Milne [Fri, 16 Mar 2018 21:39:08 +0000 (14:39 -0700)]
Downgrade run-after-mutation error to a log warning.

This is to ease the transition to the C API. Some tests currently mutate the
graph after running it but currently pass. This error was meant to guard
against existing behavior, so it's not a regression to make it a warning
instead for now.

PiperOrigin-RevId: 189395472

6 years agoFixed a typo.
A. Unique TensorFlower [Fri, 16 Mar 2018 20:43:12 +0000 (13:43 -0700)]
Fixed a typo.

PiperOrigin-RevId: 189386932

6 years agoEstimate prediction size and error out if it is larger than protobuf limit.
Jianwei Xie [Fri, 16 Mar 2018 20:11:36 +0000 (13:11 -0700)]
Estimate prediction size and error out if it is larger than protobuf limit.

PiperOrigin-RevId: 189382429

6 years agoMove if_op kernel to //third_party/tensorflow/compiler/tf2xla/kernels
A. Unique TensorFlower [Fri, 16 Mar 2018 20:00:31 +0000 (13:00 -0700)]
Move if_op kernel to //third_party/tensorflow/compiler/tf2xla/kernels

PiperOrigin-RevId: 189381067

6 years ago[XLA] BF16 conversion folding for CRS; remove no-op conversions in propagation.
Yuanzhong Xu [Fri, 16 Mar 2018 19:56:26 +0000 (12:56 -0700)]
[XLA] BF16 conversion folding for CRS; remove no-op conversions in propagation.

If CRS has tuple output, it needs special handling in conversion folding.
BF16 propagation could result in BF16->BF16 conversions, which can be removed.

PiperOrigin-RevId: 189380578

6 years agoBREAKING_CHANGE: Remove SigmoidCentered bijector.
A. Unique TensorFlower [Fri, 16 Mar 2018 19:55:18 +0000 (12:55 -0700)]
BREAKING_CHANGE: Remove SigmoidCentered bijector.
 - SoftmaxCentered solely works on vector events, and supports broadcasting.
 - Sigmoid exists for event_ndims=0 cases.

PiperOrigin-RevId: 189380445

6 years ago[XLA:python] Plumb hlo_profile flag.
Chris Leary [Fri, 16 Mar 2018 19:34:34 +0000 (12:34 -0700)]
[XLA:python] Plumb hlo_profile flag.

PiperOrigin-RevId: 189377860

6 years agoRemove empty buckets in latency_stats as it makes the report unreadable. This is...
A. Unique TensorFlower [Fri, 16 Mar 2018 19:12:52 +0000 (12:12 -0700)]
Remove empty buckets in latency_stats as it makes the report unreadable. This is also consistent with how SummaryHistoOp in summary_op.cc works.

PiperOrigin-RevId: 189375113

6 years ago[tf.data] Fix typo in `Dataset.prefetch()` docstring.
Derek Murray [Fri, 16 Mar 2018 19:11:18 +0000 (12:11 -0700)]
[tf.data] Fix typo in `Dataset.prefetch()` docstring.

PiperOrigin-RevId: 189374898

6 years ago[TF:XLA] Bump open source llvm revision to r327616
Sanjoy Das [Fri, 16 Mar 2018 18:53:14 +0000 (11:53 -0700)]
[TF:XLA] Bump open source llvm revision to r327616

PiperOrigin-RevId: 189372065

6 years agoAllow variable lists to change when saving repeatedly using tfe.Checkpoint
Allen Lavoie [Fri, 16 Mar 2018 18:47:26 +0000 (11:47 -0700)]
Allow variable lists to change when saving repeatedly using tfe.Checkpoint

For example allows saving a checkpoint before slot variables have been created

When graph building, restore() is still bound to a frozen set of variables.

PiperOrigin-RevId: 189371256

6 years agoSet number of threads at Java interpreter constructor so that Conv Kernels can be...
A. Unique TensorFlower [Fri, 16 Mar 2018 18:45:42 +0000 (11:45 -0700)]
Set number of threads at Java interpreter constructor so that Conv Kernels can be selected properly.
Remove setNumThreads in the Java API as its behavior is ambiguous.

PiperOrigin-RevId: 189370770

6 years agoFixing constant output arrays by inserting synthetic reshapes.
A. Unique TensorFlower [Fri, 16 Mar 2018 18:29:00 +0000 (11:29 -0700)]
Fixing constant output arrays by inserting synthetic reshapes.

PiperOrigin-RevId: 189368237

6 years agoAutomated g4 rollback of changelist 189346024
Frank Perbet [Fri, 16 Mar 2018 17:48:32 +0000 (10:48 -0700)]
Automated g4 rollback of changelist 189346024

PiperOrigin-RevId: 189361083

6 years agoFix naming BatchNorm_Fold//batch_norm_correction -> BatchNorm_Fold/batch_norm_correction.
A. Unique TensorFlower [Fri, 16 Mar 2018 17:29:11 +0000 (10:29 -0700)]
Fix naming BatchNorm_Fold//batch_norm_correction -> BatchNorm_Fold/batch_norm_correction.

PiperOrigin-RevId: 189358090

6 years agoFix sed invocation in copy_binary.py script for Mac.
Michael Case [Fri, 16 Mar 2018 17:23:41 +0000 (10:23 -0700)]
Fix sed invocation in copy_binary.py script for Mac.

Script was explicitly calling /bin/sed which was not being found on MacOS Kokoro builds.
Removing calling "sed" in script.

PiperOrigin-RevId: 189357296

6 years agoAdded StrContains, StartsWith, and EndsWith functions to str_util.h.
A. Unique TensorFlower [Fri, 16 Mar 2018 17:10:16 +0000 (10:10 -0700)]
Added StrContains, StartsWith, and EndsWith functions to str_util.h.
Marked contains, starts_with, ends_with, and consume StringPiece methods as deprecated.

This will allow tensorflow::StringPiece to be more easily replaced with absl::string_view (once the deprecated methods are removed) as absl::string_view does not contain those methods.

PiperOrigin-RevId: 189355316

6 years agoMove CreateSubProcess from test.h to subprocess.h
A. Unique TensorFlower [Fri, 16 Mar 2018 16:54:27 +0000 (09:54 -0700)]
Move CreateSubProcess from test.h to subprocess.h

PiperOrigin-RevId: 189353033

6 years agoEliminate use of grpc::CoreCodegenInterface, which is marked as an internal interface
A. Unique TensorFlower [Fri, 16 Mar 2018 16:53:20 +0000 (09:53 -0700)]
Eliminate use of grpc::CoreCodegenInterface, which is marked as an internal interface

PiperOrigin-RevId: 189352860

6 years agoDoc grammar and style fixes for macOS installation.
A. Unique TensorFlower [Fri, 16 Mar 2018 16:42:45 +0000 (09:42 -0700)]
Doc grammar and style fixes for macOS installation.

PiperOrigin-RevId: 189351224

6 years agoUpgrade gRPC version used in OSS Tensorflow
A. Unique TensorFlower [Fri, 16 Mar 2018 16:32:43 +0000 (09:32 -0700)]
Upgrade gRPC version used in OSS Tensorflow

PiperOrigin-RevId: 189349737

6 years agoMake the graph_editor C-API friendly: always construct ops with their inputs.
Frank Perbet [Fri, 16 Mar 2018 16:02:48 +0000 (09:02 -0700)]
Make the graph_editor C-API friendly: always construct ops with their inputs.

PiperOrigin-RevId: 189346024

6 years agoFix a typo in docstring for index_table_from_tensor.
A. Unique TensorFlower [Fri, 16 Mar 2018 15:59:02 +0000 (08:59 -0700)]
Fix a typo in docstring for index_table_from_tensor.

PiperOrigin-RevId: 189345585

6 years ago- Adds support for shared embedding layers (e.g. in RNNs), and shared Conv2D layers.
A. Unique TensorFlower [Fri, 16 Mar 2018 14:54:08 +0000 (07:54 -0700)]
- Adds support for shared embedding layers (e.g. in RNNs), and shared Conv2D layers.
- Some minor refactoring of internal structure in fisher_blocks and layer_collection

PiperOrigin-RevId: 189338874

6 years ago[XLA:python] Fix a bug where returning an status would not incref Py_None.
Chris Leary [Fri, 16 Mar 2018 14:40:49 +0000 (07:40 -0700)]
[XLA:python] Fix a bug where returning an status would not incref Py_None.

PiperOrigin-RevId: 189337748

6 years agoClean up and clarify the 'install from source' page.
A. Unique TensorFlower [Fri, 16 Mar 2018 12:53:38 +0000 (05:53 -0700)]
Clean up and clarify the 'install from source' page.

Remove reference to CUDA and cuDNN versions for 'install from source' from the 'install Linux' documentation. The 'install from source' should be the authoritative page for this.

PiperOrigin-RevId: 189328669

6 years ago[tf2xla] Introduce XlaTensorInfo
A. Unique TensorFlower [Fri, 16 Mar 2018 10:45:32 +0000 (03:45 -0700)]
[tf2xla] Introduce XlaTensorInfo

XlaTensorInfo is side-band data for Tensors. It can be used to store
information about Tensors that is not possible to store in the Tensor
itself.  The XlaTensorInfos are managed by XlaTensorInfoManager, which
is an Allocator, which allows it to release the TensorInfos when the
underlying Tensor is released.  Looking up an XlaTensorInfo for a
Tensor requires a hash table lookup. This implementation keeps this
off the fast path and only looks the tensorinfos up when they are
required.

PiperOrigin-RevId: 189319553

6 years agoDon't put quantization variables in EMA collection by default.
Suharsh Sivakumar [Fri, 16 Mar 2018 06:56:10 +0000 (23:56 -0700)]
Don't put quantization variables in EMA collection by default.

PiperOrigin-RevId: 189302082

6 years agoPropagate min-max when resolving constant Reshape op.
A. Unique TensorFlower [Fri, 16 Mar 2018 05:28:26 +0000 (22:28 -0700)]
Propagate min-max when resolving constant Reshape op.

PiperOrigin-RevId: 189296593

6 years agoAutomated g4 rollback of changelist 189234789
Gunhan Gulsoy [Fri, 16 Mar 2018 04:39:15 +0000 (21:39 -0700)]
Automated g4 rollback of changelist 189234789

PiperOrigin-RevId: 189293458

6 years agoImplement out of bounds behavior for gather in the HLO evaluator
Sanjoy Das [Fri, 16 Mar 2018 04:33:44 +0000 (21:33 -0700)]
Implement out of bounds behavior for gather in the HLO evaluator

This makes the OOB behavior of gather in the HLO evaluator consistent with
DynamicSlice while we figure out the semantics we want long term.

The HLO->HLO gather expander inherits the wrapping behavior of dynamic-slice
because it lowers the gather ops to loops of dynamic slices.

PiperOrigin-RevId: 189293175

6 years agoInternal cleanup.
A. Unique TensorFlower [Fri, 16 Mar 2018 01:22:09 +0000 (18:22 -0700)]
Internal cleanup.

PiperOrigin-RevId: 189278596

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Fri, 16 Mar 2018 00:46:39 +0000 (17:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 189274859

6 years agoSymbolic gradient optimization
Benoit Steiner [Thu, 15 Mar 2018 23:52:23 +0000 (16:52 -0700)]
Symbolic gradient optimization

PiperOrigin-RevId: 189268327

6 years agoAdd initial host transfer ops for XLA support for computation on the host during...
A. Unique TensorFlower [Thu, 15 Mar 2018 23:29:14 +0000 (16:29 -0700)]
Add initial host transfer ops for XLA support for computation on the host during a compiled computation.

PiperOrigin-RevId: 189265297

6 years agoClarifying when is it possible to use a tape while it is still active.
Alexandre Passos [Thu, 15 Mar 2018 22:58:44 +0000 (15:58 -0700)]
Clarifying when is it possible to use a tape while it is still active.

PiperOrigin-RevId: 189260773

6 years agoRename CreateXyzHlo utilities to MakeXyzHlo as discussed on cr/188968478; NFC
Sanjoy Das [Thu, 15 Mar 2018 22:47:09 +0000 (15:47 -0700)]
Rename CreateXyzHlo utilities to MakeXyzHlo as discussed on cr/188968478; NFC

The rationale here is that MakeXyzHlo is less likely to be confused with
HloInstruction::CreateXyz and we already have a convention of using a "Make"
prefix for ergonomic factory functions.
PiperOrigin-RevId: 189259036

6 years agoAutomated g4 rollback of changelist 189231636
A. Unique TensorFlower [Thu, 15 Mar 2018 22:44:56 +0000 (15:44 -0700)]
Automated g4 rollback of changelist 189231636

PiperOrigin-RevId: 189258641

6 years agoPass error reporter to file copy allocation,
A. Unique TensorFlower [Thu, 15 Mar 2018 22:29:39 +0000 (15:29 -0700)]
Pass error reporter to file copy allocation,
and avoid loading model from file twice

PiperOrigin-RevId: 189256489

6 years agoPIE binaries that depends on static libraries usually have text relocations in the...
A. Unique TensorFlower [Thu, 15 Mar 2018 22:16:38 +0000 (15:16 -0700)]
PIE binaries that depends on static libraries usually have text relocations in the final executable, which causes link warnings/errors (different linker behaves differently). The optimal way to fix this is to link the binary with shared library, however, the libraries are NVIDIA-proprietary, not all of them have shared version (for example: cuda_9_0/lib64/libculibos.a)

PiperOrigin-RevId: 189254317

6 years agoChange ParseAndVerifyModule to take a StringPiece; NFC
Sanjoy Das [Thu, 15 Mar 2018 21:53:52 +0000 (14:53 -0700)]
Change ParseAndVerifyModule to take a StringPiece; NFC

PiperOrigin-RevId: 189250126

6 years agoCheck for very large chunk sizes in WAV decoding
Pete Warden [Thu, 15 Mar 2018 21:45:34 +0000 (14:45 -0700)]
Check for very large chunk sizes in WAV decoding
Change how chunk sizes larger than 2GB are handled, since they're stored as
unsigned int32s, so there are lots of ways for conversions to confuse the
decoding logic. The new behavior is to fail with an error, since such
large WAV files are not common, and are unsupported by many readers.

PiperOrigin-RevId: 189248857

6 years agoAdds a GPU kernel registration for PlaceholderWithDefault, so we can avoid the issue
A. Unique TensorFlower [Thu, 15 Mar 2018 21:40:12 +0000 (14:40 -0700)]
Adds a GPU kernel registration for PlaceholderWithDefault, so we can avoid the issue
of using it with a registered GPU device without soft placement.

PiperOrigin-RevId: 189248024

6 years ago[Checkpointable] Make EagerIterator checkpointable.
Shivani Agrawal [Thu, 15 Mar 2018 21:38:25 +0000 (14:38 -0700)]
[Checkpointable] Make EagerIterator checkpointable.

Use object-based save/restore to make dataset/iterator checkpointable in eager mode, this could potentially be extended to graph mode as well.

PiperOrigin-RevId: 189247720

6 years agoInternal cleanup.
A. Unique TensorFlower [Thu, 15 Mar 2018 21:36:53 +0000 (14:36 -0700)]
Internal cleanup.

PiperOrigin-RevId: 189247461

6 years agoFix the HLO alias analysis and copy insertion to cope with the new kConditional instr...
A. Unique TensorFlower [Thu, 15 Mar 2018 21:27:04 +0000 (14:27 -0700)]
Fix the HLO alias analysis and copy insertion to cope with the new kConditional instruction.

PiperOrigin-RevId: 189245979

6 years agoFix a bug which caused slot variables to be shared when executing eagerly
Allen Lavoie [Thu, 15 Mar 2018 20:52:16 +0000 (13:52 -0700)]
Fix a bug which caused slot variables to be shared when executing eagerly

Threads the uid() name of a ResourceVariable through to the Optimizer. Tests
that slot variables are unique in several ways.

Previously ResourceVariable._shared_name was the Optimizer's slot key for a
variable, which for tfe.Variable() is just the non-uniquified name.

PiperOrigin-RevId: 189240115

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 15 Mar 2018 20:46:52 +0000 (13:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 189239161

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Thu, 15 Mar 2018 20:19:16 +0000 (13:19 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 189234789

6 years agoAdd mean-only FID and diagonal-covariance-only FID variants to TFGAN.
Surya Bhupatiraju [Thu, 15 Mar 2018 20:02:23 +0000 (13:02 -0700)]
Add mean-only FID and diagonal-covariance-only FID variants to TFGAN.

PiperOrigin-RevId: 189232299

6 years agoTFLite iOS Makefile: Disable SSE4.1 for x86_64 build.
Yu-Cheng Ling [Thu, 15 Mar 2018 20:01:28 +0000 (13:01 -0700)]
TFLite iOS Makefile: Disable SSE4.1 for x86_64 build.

PiperOrigin-RevId: 189232136

6 years agoMerge changes from github.
Jacques Pienaar [Thu, 15 Mar 2018 19:58:08 +0000 (12:58 -0700)]
Merge changes from github.

PiperOrigin-RevId: 189231636