platform/upstream/tensorflow.git
6 years agoChange back TFE_Execute logic to set '*num_retvals' on return.
A. Unique TensorFlower [Tue, 13 Mar 2018 18:36:28 +0000 (11:36 -0700)]
Change back TFE_Execute logic to set '*num_retvals' on return.

PiperOrigin-RevId: 188903892

6 years agoAdd TransformShardedTileShape helper method to HloSharding
A. Unique TensorFlower [Tue, 13 Mar 2018 18:34:23 +0000 (11:34 -0700)]
Add TransformShardedTileShape helper method to HloSharding

It transforms an existing sharding to be compatible with a new shape
with an optional transform method to adjust the tile size for the
sharded dimensions.

PiperOrigin-RevId: 188903257

6 years agoAutomated g4 rollback of changelist 188353354
A. Unique TensorFlower [Tue, 13 Mar 2018 18:30:20 +0000 (11:30 -0700)]
Automated g4 rollback of changelist 188353354

PiperOrigin-RevId: 188902517

6 years agoReplace the unknown dimension of signature input when building grappler items.
Yuefeng Zhou [Tue, 13 Mar 2018 18:27:46 +0000 (11:27 -0700)]
Replace the unknown dimension of signature input when building grappler items.
Fix the bug where same feed nodes or fetch nodes would be added more than once.

PiperOrigin-RevId: 188902101

6 years agoEnable arithmetic optimizations for Fill nodes that are all zeros or ones.
A. Unique TensorFlower [Tue, 13 Mar 2018 17:39:33 +0000 (10:39 -0700)]
Enable arithmetic optimizations for Fill nodes that are all zeros or ones.

PiperOrigin-RevId: 188893722

6 years agoAdd TFLite Interpreter bindings.
A. Unique TensorFlower [Tue, 13 Mar 2018 17:22:53 +0000 (10:22 -0700)]
Add TFLite Interpreter bindings.

PiperOrigin-RevId: 188890943

6 years agoPerforming the finalization of the LayerCollection outside of FisherEstimator's const...
A. Unique TensorFlower [Tue, 13 Mar 2018 17:13:45 +0000 (10:13 -0700)]
Performing the finalization of the LayerCollection outside of FisherEstimator's constructor.  This allows layers and losses to be registered after the FisherEstimator (or KFACOptimizer) has been constructed.

PiperOrigin-RevId: 188889252

6 years agoinclude the graph.pb->tensorboard script in pip package
Mark Daoust [Tue, 13 Mar 2018 17:09:03 +0000 (10:09 -0700)]
include the graph.pb->tensorboard script in pip package

This will allow you to run it with:

`python -m tensorflow.python.tools.import_pb_to_tensorboard ...`

Without any additional downloads or setup.

see #8854

PiperOrigin-RevId: 188888501

6 years agoInternal change
A. Unique TensorFlower [Tue, 13 Mar 2018 16:11:14 +0000 (09:11 -0700)]
Internal change

PiperOrigin-RevId: 188880419

6 years ago[TFLite] Don't always treat inputs and outputs as encoded floats.
Eugene Brevdo [Tue, 13 Mar 2018 16:09:57 +0000 (09:09 -0700)]
[TFLite] Don't always treat inputs and outputs as encoded floats.

PiperOrigin-RevId: 188880237

6 years agoIntroduce output fusion for (A dot B) * alpha
A. Unique TensorFlower [Tue, 13 Mar 2018 15:49:17 +0000 (08:49 -0700)]
Introduce output fusion for (A dot B) * alpha

We allow now to fuse (A dot B) times a constant, which is available in cublas.

PiperOrigin-RevId: 188878210

6 years agoPiperOrigin-RevId: 188860028
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId: 188860028

6 years agotfdbg: add reference to the TensorBoard Debugger Plugin in README.md
Shanqing Cai [Tue, 13 Mar 2018 05:38:48 +0000 (22:38 -0700)]
tfdbg: add reference to the TensorBoard Debugger Plugin in README.md
PiperOrigin-RevId: 188828898

6 years agoPiperOrigin-RevId: 188860028
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId: 188860028

6 years agotfdbg: add reference to the TensorBoard Debugger Plugin in README.md
Shanqing Cai [Tue, 13 Mar 2018 05:38:48 +0000 (22:38 -0700)]
tfdbg: add reference to the TensorBoard Debugger Plugin in README.md
PiperOrigin-RevId: 188828898

6 years agoPiperOrigin-RevId: 188860028
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId: 188860028

6 years agotfdbg: add reference to the TensorBoard Debugger Plugin in README.md
Shanqing Cai [Tue, 13 Mar 2018 05:38:48 +0000 (22:38 -0700)]
tfdbg: add reference to the TensorBoard Debugger Plugin in README.md
PiperOrigin-RevId: 188828898

6 years agoMerges (embedding|indicator)_column with their sequence counterparts, and exposes...
A. Unique TensorFlower [Tue, 13 Mar 2018 04:53:54 +0000 (21:53 -0700)]
Merges (embedding|indicator)_column with their sequence counterparts, and exposes sequence methods under tf.contrib.feature_column.

PiperOrigin-RevId: 188826187

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Tue, 13 Mar 2018 04:18:25 +0000 (21:18 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 188824362

6 years agoSupport NHWC <--> HWNC permutation.
A. Unique TensorFlower [Tue, 13 Mar 2018 04:12:52 +0000 (21:12 -0700)]
Support NHWC <--> HWNC permutation.

PiperOrigin-RevId: 188824058

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Tue, 13 Mar 2018 02:46:08 +0000 (19:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 188817976

6 years agoMerge changes from github.
Shanqing Cai [Tue, 13 Mar 2018 02:33:52 +0000 (19:33 -0700)]
Merge changes from github.

PiperOrigin-RevId: 188817194

6 years agoRemove integration_tests directory and associated files.
A. Unique TensorFlower [Tue, 13 Mar 2018 02:09:28 +0000 (19:09 -0700)]
Remove integration_tests directory and associated files.

PiperOrigin-RevId: 188815493

6 years agoDemystify MaterializeShapes a bit.
Max Galkin [Tue, 13 Mar 2018 01:35:15 +0000 (18:35 -0700)]
Demystify MaterializeShapes a bit.

PiperOrigin-RevId: 188812445

6 years agoMake tf.add_to_collections visible.
A. Unique TensorFlower [Tue, 13 Mar 2018 00:48:57 +0000 (17:48 -0700)]
Make tf.add_to_collections visible.

PiperOrigin-RevId: 188807786

6 years ago[XLA:Tools] Make hlo_runner understand --xla_hlo_profile.
A. Unique TensorFlower [Tue, 13 Mar 2018 00:13:09 +0000 (17:13 -0700)]
[XLA:Tools] Make hlo_runner understand --xla_hlo_profile.

PiperOrigin-RevId: 188803724

6 years agoDon't evaluate control flow in EvaluateConstantTensor.
Skye Wanderman-Milne [Tue, 13 Mar 2018 00:12:32 +0000 (17:12 -0700)]
Don't evaluate control flow in EvaluateConstantTensor.

ExtractConstantSubgraph doesn't copy control edges, which are sometimes necessary
to correctly evaluate conds (at the very least). Avoid evaluating conds at all to
address this.

PiperOrigin-RevId: 188803649

6 years agoBREAKING_CHANGE: Split out event_ndims=0 bijectors from Affine and CholeskyOuterProduct.
A. Unique TensorFlower [Mon, 12 Mar 2018 23:54:10 +0000 (16:54 -0700)]
BREAKING_CHANGE: Split out event_ndims=0 bijectors from Affine and CholeskyOuterProduct.
    - Deprecate event_ndims argument
    - Create a Square bijector for the scalar case of CholeskyOuterProduct (which now only operates on matrices).
    - Create a AffineScalar bijector for the scalar case of Affine (which now only operates on vectors)

PiperOrigin-RevId: 188801116

6 years agoSwitch BuildGraphOptions to wrap CallableOptions.
Derek Murray [Mon, 12 Mar 2018 23:46:48 +0000 (16:46 -0700)]
Switch BuildGraphOptions to wrap CallableOptions.

This change harmonizes the graph construction codepaths for DirectSession and
MasterSession, which will make it easier to add new subgraph creation features.

PiperOrigin-RevId: 188799932

6 years agoDon't use shapes unless it's safe to do so.
Benoit Steiner [Mon, 12 Mar 2018 23:25:46 +0000 (16:25 -0700)]
Don't use shapes unless it's safe to do so.

PiperOrigin-RevId: 188796626

6 years ago[tf.data] Enable Dataset.make_one_shot_iterator() and Dataset.__iter__() in eager...
Derek Murray [Mon, 12 Mar 2018 22:40:47 +0000 (15:40 -0700)]
[tf.data] Enable Dataset.make_one_shot_iterator() and Dataset.__iter__() in eager mode.

This change partially replicates the code in `tf.contrib.eager.Iterator`.
However, since that class depends on contrib-level functionality (viz.
cross-device prefetching support), we cannot move it wholesale to core.

PiperOrigin-RevId: 188790349

6 years agoTFLite Delegate: Expose input / output tensor indicies in `Init`
Yu-Cheng Ling [Mon, 12 Mar 2018 22:05:11 +0000 (15:05 -0700)]
TFLite Delegate: Expose input / output tensor indicies in `Init`

PiperOrigin-RevId: 188784614

6 years agoFix typo in the doc: tf.multiplytiply
Max Galkin [Mon, 12 Mar 2018 21:52:24 +0000 (14:52 -0700)]
Fix typo in the doc: tf.multiplytiply

https://www.tensorflow.org/api_docs/python/tf/multiply

PiperOrigin-RevId: 188782466

6 years agoK-FAC: FisherBlocks for tf.nn.{depthwise_conv2d, separable_conv2d, convolution}.
A. Unique TensorFlower [Mon, 12 Mar 2018 21:23:49 +0000 (14:23 -0700)]
K-FAC: FisherBlocks for tf.nn.{depthwise_conv2d, separable_conv2d, convolution}.

PiperOrigin-RevId: 188778072

6 years agoMove "hoist common factor out of aggregation" optimization
A. Unique TensorFlower [Mon, 12 Mar 2018 20:50:35 +0000 (13:50 -0700)]
Move "hoist common factor out of aggregation" optimization
to a separate stage.

1) Use a new naming scheme for optimized ops,
   share it with AddOpsRewrite
2) Make sure that tests actually test that optimized
   nodes exists in a graph

PiperOrigin-RevId: 188772892

6 years ago[TF:XLA] Bump open source llvm revision to r327201
Sanjoy Das [Mon, 12 Mar 2018 20:44:58 +0000 (13:44 -0700)]
[TF:XLA] Bump open source llvm revision to r327201

PiperOrigin-RevId: 188771994

6 years ago[TFLite] Don't require a std::vector for Interpreter::SetTensorParameters*.
Eugene Brevdo [Mon, 12 Mar 2018 20:35:03 +0000 (13:35 -0700)]
[TFLite] Don't require a std::vector for Interpreter::SetTensorParameters*.

PiperOrigin-RevId: 188770522

6 years agoMove `loss_reduction` argument from `replicate_model_fn` to `TowerOptimizer.
Igor Saprykin [Mon, 12 Mar 2018 20:07:12 +0000 (13:07 -0700)]
Move `loss_reduction` argument from `replicate_model_fn` to `TowerOptimizer.

PiperOrigin-RevId: 188766477

6 years agoAdd is_discrete, is_continuous, is_bounded methods to TensorSpecs.
A. Unique TensorFlower [Mon, 12 Mar 2018 20:05:26 +0000 (13:05 -0700)]
Add is_discrete, is_continuous, is_bounded methods to TensorSpecs.

PiperOrigin-RevId: 188766232

6 years agoFix another eager PyObject leak
Allen Lavoie [Mon, 12 Mar 2018 20:00:24 +0000 (13:00 -0700)]
Fix another eager PyObject leak

Shockingly this one was also due to PySequence_GetItem.

PiperOrigin-RevId: 188765548

6 years agoAdd custom_gradient function.
Joshua V. Dillon [Mon, 12 Mar 2018 19:58:49 +0000 (12:58 -0700)]
Add custom_gradient function.

PiperOrigin-RevId: 188765271

6 years agoExtend TF Eager C API to allow asynchronous execution.
A. Unique TensorFlower [Mon, 12 Mar 2018 19:44:29 +0000 (12:44 -0700)]
Extend TF Eager C API to allow asynchronous execution.

PiperOrigin-RevId: 188763442

6 years ago[XLA] [Copy insertion] Deterministically iterate through instructions to copy
Yunxing Dai [Mon, 12 Mar 2018 18:49:36 +0000 (11:49 -0700)]
[XLA] [Copy insertion] Deterministically iterate through instructions to copy

- Use HloInstructionMap to get deterministic iteration order.

PiperOrigin-RevId: 188755375

6 years agoSwitch op_hint.py to use _set_attr.
Skye Wanderman-Milne [Mon, 12 Mar 2018 18:43:57 +0000 (11:43 -0700)]
Switch op_hint.py to use _set_attr.

This is in preparation for enabling the C API. Modifying an op's NodeDef
directly has no effect with the C API enabled.

PiperOrigin-RevId: 188754464

6 years agoStandardize "op" capitalization, see "adding_an_op".
Mark Daoust [Mon, 12 Mar 2018 18:39:08 +0000 (11:39 -0700)]
Standardize "op" capitalization, see "adding_an_op".

PiperOrigin-RevId: 188753529

6 years agoImprove usability of `tf.contrib.bayesflow.custom_gradient` by removing need for...
Joshua V. Dillon [Mon, 12 Mar 2018 18:29:24 +0000 (11:29 -0700)]
Improve usability of `tf.contrib.bayesflow.custom_gradient` by removing need for `axis` arg and support taking lists.

PiperOrigin-RevId: 188751894

6 years agoTransposes are can be merged into reshapes when the ordering of non-one
A. Unique TensorFlower [Mon, 12 Mar 2018 18:24:22 +0000 (11:24 -0700)]
Transposes are can be merged into reshapes when the ordering of non-one
dimensions remains unchanged.

PiperOrigin-RevId: 188751074

6 years agoboosted_trees: infer the output shapes of Quantiles Op from the input shapes.
A. Unique TensorFlower [Mon, 12 Mar 2018 18:19:08 +0000 (11:19 -0700)]
boosted_trees: infer the output shapes of Quantiles Op from the input shapes.

PiperOrigin-RevId: 188750079

6 years agoAvoid capturing unused variables in lambda functions
Benoit Steiner [Mon, 12 Mar 2018 18:04:59 +0000 (11:04 -0700)]
Avoid capturing unused variables in lambda functions

PiperOrigin-RevId: 188747641

6 years agoFix race in C API.
Skye Wanderman-Milne [Mon, 12 Mar 2018 18:02:29 +0000 (11:02 -0700)]
Fix race in C API.

RecordMutation could race with ExtendSessionGraphHelper, which would
release the graph lock and only keep the session lock when extending
the session.

Also makes sure thread annotations are on declarations, not definitions
(otherwise they have no effect).

PiperOrigin-RevId: 188747158

6 years agoTurn trivial Pack ops with a single input into ExpandDims ops to avoid copying the...
A. Unique TensorFlower [Mon, 12 Mar 2018 17:37:20 +0000 (10:37 -0700)]
Turn trivial Pack ops with a single input into ExpandDims ops to avoid copying the tensor.

PiperOrigin-RevId: 188742516

6 years agoMake default number of threads trigger the default behavior for both eigen
A. Unique TensorFlower [Mon, 12 Mar 2018 17:34:34 +0000 (10:34 -0700)]
Make default number of threads trigger the default behavior for both eigen
and gemmlowp. In gemmlowp the default is '1', while in eigen it is 'number of
processors'.

PiperOrigin-RevId: 188742087

6 years agoConvert Squeeze into Reshape: Support empty output shapes.
A. Unique TensorFlower [Mon, 12 Mar 2018 17:24:56 +0000 (10:24 -0700)]
Convert Squeeze into Reshape: Support empty output shapes.

PiperOrigin-RevId: 188740288

6 years agoSupporting quantization of Gather ops and removal of trivial Relu1s when quantized.
A. Unique TensorFlower [Mon, 12 Mar 2018 17:12:22 +0000 (10:12 -0700)]
Supporting quantization of Gather ops and removal of trivial Relu1s when quantized.

PiperOrigin-RevId: 188738133

6 years agoPlug a few more PyObject leaks, test for them.
Allen Lavoie [Mon, 12 Mar 2018 16:28:18 +0000 (09:28 -0700)]
Plug a few more PyObject leaks, test for them.

PiperOrigin-RevId: 188731961

6 years agoDon't let the grappler item builder fail if the graph contains unknown custom
Benoit Steiner [Mon, 12 Mar 2018 16:16:08 +0000 (09:16 -0700)]
Don't let the grappler item builder fail if the graph contains unknown custom
ops.

PiperOrigin-RevId: 188730560

6 years agoDon't remove identity nodes if they follow a device crossing and have consumers on...
A. Unique TensorFlower [Mon, 12 Mar 2018 16:12:41 +0000 (09:12 -0700)]
Don't remove identity nodes if they follow a device crossing and have consumers on a device different than themselves. They may be used to cache or route data between devices in a deliberate manner.

Simplify code in DependencyOptimizer a bit.

PiperOrigin-RevId: 188730185

6 years agoResourceScatterUpdate: Gracefully handle inconsistent indices and updates in
Asim Shankar [Mon, 12 Mar 2018 16:05:33 +0000 (09:05 -0700)]
ResourceScatterUpdate: Gracefully handle inconsistent indices and updates in
the kernel.

With graph execution, consistency between the shapes of the arguments to
ResourceScatterUpdate is validated by the shape inference functions at graph
construction time.

With eager execution, the shape inference logic isn't executed, so inconsistent
arguments could be provided to the kernel, which would result in a segmentation
fault prior to this change. As demonstrated by the added tests.

PiperOrigin-RevId: 188729154

6 years agoTurn on function optimization by default
Benoit Steiner [Mon, 12 Mar 2018 15:03:54 +0000 (08:03 -0700)]
Turn on function optimization by default

PiperOrigin-RevId: 188722505

6 years agoReuse the linear index when broadcasting a contiguous range of dimensions.
A. Unique TensorFlower [Mon, 12 Mar 2018 14:26:13 +0000 (07:26 -0700)]
Reuse the linear index when broadcasting a contiguous range of dimensions.

This potentially allows us to get rid of additional mod and div operations.

PiperOrigin-RevId: 188719238

6 years agoLint some files.
A. Unique TensorFlower [Mon, 12 Mar 2018 10:13:15 +0000 (03:13 -0700)]
Lint some files.

PiperOrigin-RevId: 188698275

6 years agothis test is also timing out in cuda so disabling for now
Olivia Nordquist [Mon, 12 Mar 2018 07:30:38 +0000 (00:30 -0700)]
this test is also timing out in cuda so disabling for now

PiperOrigin-RevId: 188685611

6 years agopropagate fix from tensorflow/models#3561
Mark Daoust [Mon, 12 Mar 2018 04:23:15 +0000 (21:23 -0700)]
propagate fix from tensorflow/models#3561

PiperOrigin-RevId: 188675327

6 years agoFix assets for the TF camera example.
Shashi Shekhar [Mon, 12 Mar 2018 03:20:45 +0000 (20:20 -0700)]
Fix assets for the TF camera example.

Mobile net model is downloaded from tf_http_archive("tf_mobilenet") rule and renaming the asset file in assets folder has no effect.

PiperOrigin-RevId: 188672531

6 years agodisable flaky asan test
Olivia Nordquist [Mon, 12 Mar 2018 02:35:34 +0000 (19:35 -0700)]
disable flaky asan test

PiperOrigin-RevId: 188670616

6 years agoFix typo in description of INTERNAL error code.
Derek Murray [Mon, 12 Mar 2018 00:49:34 +0000 (17:49 -0700)]
Fix typo in description of INTERNAL error code.

PiperOrigin-RevId: 188666142

6 years agoRemoved duplicate statement.
A. Unique TensorFlower [Sun, 11 Mar 2018 23:22:47 +0000 (16:22 -0700)]
Removed duplicate statement.

PiperOrigin-RevId: 188663018

6 years agoFixes a race condition in function instantiation.
Derek Murray [Sun, 11 Mar 2018 22:38:16 +0000 (15:38 -0700)]
Fixes a race condition in function instantiation.

Previously, if the same function was being concurrently instantiated
and released:

1. Thread one could begin to instantiate the function, determine
   that it already existed in the runtime, then be preempted.
2. Thread two could release the handle on the function, causing it to
   be freed and removed from the `FunctionLibraryRuntime::items_` map.
3. Thread one could then incorrectly assume that the function still
   existed, and fail to find it in the `FunctionLibraryRuntime::items_`
   map, causing a segfault when it attempted to increment the refcount
   on an uninitialized object.

PiperOrigin-RevId: 188661500

6 years agoSpecify the `maximum_iterations` to tf.while_loop in tf.scan to be compatible with...
A. Unique TensorFlower [Sun, 11 Mar 2018 17:44:02 +0000 (10:44 -0700)]
Specify the `maximum_iterations` to tf.while_loop in tf.scan to be compatible with XLA.

PiperOrigin-RevId: 188652533

6 years agoSelectively re-enable bfloat16 tests for the GPU backend.
Bixia Zheng [Sun, 11 Mar 2018 17:15:18 +0000 (10:15 -0700)]
Selectively re-enable bfloat16 tests for the GPU backend.

PiperOrigin-RevId: 188651655

6 years agoImprove errors raised when an object does not match the RNNCell interface.
A. Unique TensorFlower [Sun, 11 Mar 2018 17:00:02 +0000 (10:00 -0700)]
Improve errors raised when an object does not match the RNNCell interface.

PiperOrigin-RevId: 188651070

6 years agoFix windows GPU build scripts.
Gunhan Gulsoy [Sun, 11 Mar 2018 06:18:23 +0000 (22:18 -0800)]
Fix windows GPU build scripts.

PiperOrigin-RevId: 188629017

6 years agoAdds a warning to help user to debug the TPU program hanging for predict() call.
Jianwei Xie [Sun, 11 Mar 2018 03:44:13 +0000 (19:44 -0800)]
Adds a warning to help user to debug the TPU program hanging for predict() call.

PiperOrigin-RevId: 188624174

6 years agoTurn the following ops into Identity.
A. Unique TensorFlower [Sat, 10 Mar 2018 20:03:19 +0000 (12:03 -0800)]
Turn the following ops into Identity.
 * Slice when the Size input matches the size of the input tensor
 * Tile when the multiples input is a tensor of '1'
 * Pad/PadV2 when the paddings input is a tensor of 0
 * Squeeze when the squeeze dimensions are known to be > 1

PiperOrigin-RevId: 188609800

6 years agoIncrement node_ids when merging CostGraphDef.
Rui Zhao [Sat, 10 Mar 2018 08:29:37 +0000 (00:29 -0800)]
Increment node_ids when merging CostGraphDef.

PiperOrigin-RevId: 188586552

6 years ago[XLA] Speed up colocated buffer merging.
Michael Kuperstein [Sat, 10 Mar 2018 06:49:30 +0000 (22:49 -0800)]
[XLA] Speed up colocated buffer merging.

PiperOrigin-RevId: 188581202

6 years agoFix DepthToSpace and SpaceToDepth to silently return instead of failing when the...
A. Unique TensorFlower [Sat, 10 Mar 2018 06:43:51 +0000 (22:43 -0800)]
Fix DepthToSpace and SpaceToDepth to silently return instead of failing when the input tensor is empty.

PiperOrigin-RevId: 188580972

6 years agoFix docstring for `embedding_lookup_sparse`.
A. Unique TensorFlower [Sat, 10 Mar 2018 04:50:32 +0000 (20:50 -0800)]
Fix docstring for `embedding_lookup_sparse`.

Example with weighted mean combiner implies that single-key embeddings not normalized (the weighted sum answer). However, the code and test shows normalization regardless of number of keys.

PiperOrigin-RevId: 188575982

6 years agoUnified test util PlaceHolderFloat() into PlaceHolder(), and extended the latter
Mingsheng Hong [Sat, 10 Mar 2018 03:07:44 +0000 (19:07 -0800)]
Unified test util PlaceHolderFloat() into PlaceHolder(), and extended the latter
to take a TF_DataType param.

PiperOrigin-RevId: 188570493

6 years agoPropagate min/max for StridedSlice
A. Unique TensorFlower [Sat, 10 Mar 2018 02:54:41 +0000 (18:54 -0800)]
Propagate min/max for StridedSlice

PiperOrigin-RevId: 188569611

6 years agoMove optimizations to arithmetic optimizer stages
A. Unique TensorFlower [Sat, 10 Mar 2018 02:50:06 +0000 (18:50 -0800)]
Move optimizations to arithmetic optimizer stages

1) Redundant Bitcast
2) Redundant Cast
3) Remove inverse transpose

PiperOrigin-RevId: 188569367

6 years agoAdd experimental Session::MakeCallable() API and implement it for DirectSession.
Derek Murray [Sat, 10 Mar 2018 02:12:02 +0000 (18:12 -0800)]
Add experimental Session::MakeCallable() API and implement it for DirectSession.

The intent of this new API matches the Python `tf.Session.make_callable()`
method: it splits the two roles of the `Session::Run()` method into separate
methods:

1. `Session::MakeCallable()` takes information about a subgraph (such as the
   names of nodes to feed and fetch), and prunes and optimizes that graph,
   returning a simple handle.
2. `Session::RunCallable()` takes that handle, plus any values to be fed,
   and executes the graph, returning whatever outputs are produced.

This split moves string processing off the critical path of running a
step. We also add a new method `Session::ReleaseCallable()` that makes
it possible to free the resources associated with a cached subgraph,
and could be useful for seldom-executed graphs such as initializers.

PiperOrigin-RevId: 188566635

6 years agoFix flakiness in common_runtime/function_test.cc.
Derek Murray [Sat, 10 Mar 2018 02:00:26 +0000 (18:00 -0800)]
Fix flakiness in common_runtime/function_test.cc.

The flakiness was due to nondeterministic names being chosen for
folded constants; the fix was to split out the source of the
nondetermism into a separate test.

PiperOrigin-RevId: 188565362

6 years agoAllowing ReorderActivationFunctions to reorder output arrays and adding support for...
A. Unique TensorFlower [Sat, 10 Mar 2018 00:34:42 +0000 (16:34 -0800)]
Allowing ReorderActivationFunctions to reorder output arrays and adding support for propagating activation functions into Gather ops and as constant ops.

PiperOrigin-RevId: 188556574

6 years ago[XLA] Add a whole graph execution interface.
A. Unique TensorFlower [Sat, 10 Mar 2018 00:17:08 +0000 (16:17 -0800)]
[XLA] Add a whole graph execution interface.

PiperOrigin-RevId: 188554206

6 years agoProcFLR: Include the remote function target in the function_key
Brennan Saeta [Fri, 9 Mar 2018 23:39:11 +0000 (15:39 -0800)]
ProcFLR: Include the remote function target in the function_key

PiperOrigin-RevId: 188548941

6 years agoMove a utility function into the eager C internal API
Akshay Modi [Fri, 9 Mar 2018 23:34:44 +0000 (15:34 -0800)]
Move a utility function into the eager C internal API

PiperOrigin-RevId: 188548393

6 years agoCopy `replicate_model_fn` to core.
Igor Saprykin [Fri, 9 Mar 2018 23:28:15 +0000 (15:28 -0800)]
Copy `replicate_model_fn` to core.

PiperOrigin-RevId: 188547527

6 years agoMigrate tf.contrib.bayesflow.optimizers to tfp.optimziers.
Joshua V. Dillon [Fri, 9 Mar 2018 23:27:50 +0000 (15:27 -0800)]
Migrate tf.contrib.bayesflow.optimizers to tfp.optimziers.

PiperOrigin-RevId: 188547477

6 years agoEager: Fix a Dimension PyObject leak, test for it.
Allen Lavoie [Fri, 9 Mar 2018 22:42:51 +0000 (14:42 -0800)]
Eager: Fix a Dimension PyObject leak, test for it.

PiperOrigin-RevId: 188540944

6 years agoInternal Change.
Michael Case [Fri, 9 Mar 2018 22:41:06 +0000 (14:41 -0800)]
Internal Change.

PiperOrigin-RevId: 188540659

6 years agoPart of the update of tf.keras to the Keras 2.1.5 API.
Francois Chollet [Fri, 9 Mar 2018 22:40:18 +0000 (14:40 -0800)]
Part of the update of tf.keras to the Keras 2.1.5 API.

PiperOrigin-RevId: 188540513

6 years agoAutomated g4 rollback of changelist 188501394
A. Unique TensorFlower [Fri, 9 Mar 2018 22:17:03 +0000 (14:17 -0800)]
Automated g4 rollback of changelist 188501394

PiperOrigin-RevId: 188536863

6 years ago[TF:XLA] Bump open source llvm revision to r326989
Sanjoy Das [Fri, 9 Mar 2018 22:15:23 +0000 (14:15 -0800)]
[TF:XLA] Bump open source llvm revision to r326989

PiperOrigin-RevId: 188536576

6 years agoAdd smart_case that calls smart_cond.
Skye Wanderman-Milne [Fri, 9 Mar 2018 22:00:23 +0000 (14:00 -0800)]
Add smart_case that calls smart_cond.

PiperOrigin-RevId: 188534066

6 years agoRemove the nondeterminism from a test for initializing variables from checkpoints.
A. Unique TensorFlower [Fri, 9 Mar 2018 21:54:17 +0000 (13:54 -0800)]
Remove the nondeterminism from a test for initializing variables from checkpoints.

PiperOrigin-RevId: 188533156

6 years ago[XLA:Doc] Fix an typo "Alternately" -> "Alternatively".
Kay Zhu [Fri, 9 Mar 2018 21:47:36 +0000 (13:47 -0800)]
[XLA:Doc] Fix an typo "Alternately" -> "Alternatively".

PiperOrigin-RevId: 188532135

6 years agoLSTM support: Add non-uint8 quantized operators.
A. Unique TensorFlower [Fri, 9 Mar 2018 21:26:41 +0000 (13:26 -0800)]
LSTM support: Add non-uint8 quantized operators.

PiperOrigin-RevId: 188529107

6 years agoInternal Change
A. Unique TensorFlower [Fri, 9 Mar 2018 21:24:23 +0000 (13:24 -0800)]
Internal Change

PiperOrigin-RevId: 188528771

6 years agoAutomated g4 rollback of changelist 188492233
A. Unique TensorFlower [Fri, 9 Mar 2018 21:00:12 +0000 (13:00 -0800)]
Automated g4 rollback of changelist 188492233

PiperOrigin-RevId: 188525453