platform/upstream/tensorflow.git
6 years agoSupports optimizer arg in head.create_estimator_spec.
A. Unique TensorFlower [Thu, 22 Mar 2018 21:01:10 +0000 (14:01 -0700)]
Supports optimizer arg in head.create_estimator_spec.

PiperOrigin-RevId: 190121386

6 years agoFix cases where we export incorrect symbol with tf_export. This can happen when
Anna R [Thu, 22 Mar 2018 20:55:48 +0000 (13:55 -0700)]
Fix cases where we export incorrect symbol with tf_export. This can happen when
both generated op and its python wrapper have tf_export decorator.
create_python_api.py now checks that we don't export different symbols with same name. Also, simplified some logic.

PiperOrigin-RevId: 190120505

6 years agoCode cleanup: rather than storing the outside_compilation shape inference graph as...
A. Unique TensorFlower [Thu, 22 Mar 2018 20:41:13 +0000 (13:41 -0700)]
Code cleanup: rather than storing the outside_compilation shape inference graph as a serialized GraphDef in an attr, put it into the function library.

PiperOrigin-RevId: 190118116

6 years agoDisable all the automatic optimizations when testing, to ensure that we can
Benoit Steiner [Thu, 22 Mar 2018 20:24:51 +0000 (13:24 -0700)]
Disable all the automatic optimizations when testing, to ensure that we can
properly compare the results of the original graph against that of the hand
optimized graph.

PiperOrigin-RevId: 190115606

6 years agoAllow specifying in the arrays extra info file:
A. Unique TensorFlower [Thu, 22 Mar 2018 20:21:57 +0000 (13:21 -0700)]
Allow specifying in the arrays extra info file:
 - the shape of the array
 - the hardcoding of the values of the array as a single repeated constant
   scalar value, turning an activations array into a constant array.

PiperOrigin-RevId: 190115218

6 years agoDisable testing flaky tensorflow/contrib/eager/python/examples/spinn:spinn_test under py3
A. Unique TensorFlower [Thu, 22 Mar 2018 20:05:30 +0000 (13:05 -0700)]
Disable testing flaky tensorflow/contrib/eager/python/examples/spinn:spinn_test under py3

PiperOrigin-RevId: 190112748

6 years agoMake api_compatibility_test output verbose by default.
Martin Wicke [Thu, 22 Mar 2018 19:52:25 +0000 (12:52 -0700)]
Make api_compatibility_test output verbose by default.

PiperOrigin-RevId: 190110866

6 years agoAdd tf.contrib.framework.argsort, wrapping tf.nn.top_k (#288).
Dan Ringwalt [Thu, 22 Mar 2018 19:45:24 +0000 (12:45 -0700)]
Add tf.contrib.framework.argsort, wrapping tf.nn.top_k (#288).

Comparable to np.argsort.

PiperOrigin-RevId: 190109968

6 years agoMerges predict export_outputs in multi_head.
A. Unique TensorFlower [Thu, 22 Mar 2018 19:34:02 +0000 (12:34 -0700)]
Merges predict export_outputs in multi_head.

PiperOrigin-RevId: 190108434

6 years agoMake GetLocalTemporaryDirectories() a virtual method of Env, that is overriden
A. Unique TensorFlower [Thu, 22 Mar 2018 18:55:34 +0000 (11:55 -0700)]
Make GetLocalTemporaryDirectories() a virtual method of Env, that is overriden
by the implementations.

PiperOrigin-RevId: 190102851

6 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Thu, 22 Mar 2018 18:55:11 +0000 (11:55 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 190102805

6 years agoCleanup: replace an errant `in_eager_mode()` with `executing_eagerly()`.
Akshay Agrawal [Thu, 22 Mar 2018 18:29:25 +0000 (11:29 -0700)]
Cleanup: replace an errant `in_eager_mode()` with `executing_eagerly()`.

PiperOrigin-RevId: 190098277

6 years agoAdd new Ops for ScopedAllocator and the associated Concat and Split. The
Ayush Dubey [Thu, 22 Mar 2018 18:25:58 +0000 (11:25 -0700)]
Add new Ops for ScopedAllocator and the associated Concat and Split.  The
ScopedAllocatorOp allocates a large backing tensor whose slices may be
concatenated or splitted with ScopedAllocatorConcatOp and
ScopedAllocatorSplitOp respectively.  These ops should only be added via
Grappler optimizations on the dataflow graph provided by the user.

PiperOrigin-RevId: 190097586

6 years agoSupports PReLU in TFLite & Toco.
Yu-Cheng Ling [Thu, 22 Mar 2018 18:25:49 +0000 (11:25 -0700)]
Supports PReLU in TFLite & Toco.

PiperOrigin-RevId: 190097557

6 years agoRun the grappler optimizer tests both on GPU and CPU
Benoit Steiner [Thu, 22 Mar 2018 18:23:26 +0000 (11:23 -0700)]
Run the grappler optimizer tests both on GPU and CPU

PiperOrigin-RevId: 190097168

6 years agoEager/g3doc: Gradients with respect to constants are None and not 0.
Asim Shankar [Thu, 22 Mar 2018 18:21:52 +0000 (11:21 -0700)]
Eager/g3doc: Gradients with respect to constants are None and not 0.

Same behavior as tf.gradients() for graphs.
Some discussion of this choice in #783

PiperOrigin-RevId: 190096919

6 years agoAdds remaining validations in sequence_numeric_column.
A. Unique TensorFlower [Thu, 22 Mar 2018 18:12:10 +0000 (11:12 -0700)]
Adds remaining validations in sequence_numeric_column.

PiperOrigin-RevId: 190094883

6 years agoAutomated g4 rollback of changelist 189819449
A. Unique TensorFlower [Thu, 22 Mar 2018 17:28:56 +0000 (10:28 -0700)]
Automated g4 rollback of changelist 189819449

PiperOrigin-RevId: 190087074

6 years agoSmall cleanup StrCat related number formatting
A. Unique TensorFlower [Thu, 22 Mar 2018 17:21:59 +0000 (10:21 -0700)]
Small cleanup StrCat related number formatting

- Resolve inconsistency in return values (pointer to start vs end of buffer)
- Instead, return the number of chars written as this turns out to be most useful to callers
- Removes the need for redundant strlen calls.

PiperOrigin-RevId: 190085812

6 years agoMark tensor as const in a function that does not mutate a tensor.
A. Unique TensorFlower [Thu, 22 Mar 2018 17:21:39 +0000 (10:21 -0700)]
Mark tensor as const in a function that does not mutate a tensor.

PiperOrigin-RevId: 190085757

6 years agoOmit tensorflow/python/estimator:replicate_model_fn_test from asan builds.
A. Unique TensorFlower [Thu, 22 Mar 2018 17:17:18 +0000 (10:17 -0700)]
Omit tensorflow/python/estimator:replicate_model_fn_test from asan builds.
It gets flaky timeouts.

PiperOrigin-RevId: 190084932

6 years agoTemplate system improvements: allow replacing keyword args. Allow using function...
A. Unique TensorFlower [Thu, 22 Mar 2018 17:10:18 +0000 (10:10 -0700)]
Template system improvements: allow replacing keyword args. Allow using function calls and dicts in name replacements.

PiperOrigin-RevId: 190083700

6 years agoSimplifying "is" and "is not" dispatch
A. Unique TensorFlower [Thu, 22 Mar 2018 16:43:32 +0000 (09:43 -0700)]
Simplifying "is" and "is not" dispatch

PiperOrigin-RevId: 190078959

6 years ago[XLA] Only overwrite the hlo_profiling flag when it's not enabled by default.
Benjamin Kramer [Thu, 22 Mar 2018 16:34:29 +0000 (09:34 -0700)]
[XLA] Only overwrite the hlo_profiling flag when it's not enabled by default.

This got broken in 504d103a405654f029e8902d97d4dd8f3aa07513

PiperOrigin-RevId: 190077360

6 years agoDisable over-aggressive shape inference
A. Unique TensorFlower [Thu, 22 Mar 2018 16:14:07 +0000 (09:14 -0700)]
Disable over-aggressive shape inference

PiperOrigin-RevId: 190074445

6 years agoMethods to work with symbolic tensor shapes.
A. Unique TensorFlower [Thu, 22 Mar 2018 15:51:43 +0000 (08:51 -0700)]
Methods to work with symbolic tensor shapes.

PiperOrigin-RevId: 190071400

6 years agoFix QN for Calls.
A. Unique TensorFlower [Thu, 22 Mar 2018 15:19:21 +0000 (08:19 -0700)]
Fix QN for Calls.

PiperOrigin-RevId: 190067548

6 years agoAutomatically insert api-links.
Mark Daoust [Thu, 22 Mar 2018 12:50:56 +0000 (05:50 -0700)]
Automatically insert api-links.

If the contents of a pair of back-ticks match a public api symbol name insert a link.

PiperOrigin-RevId: 190051941

6 years agoUpdate file due to changes in Bazel (PACKAGE_NAME is deprecated)
A. Unique TensorFlower [Thu, 22 Mar 2018 12:46:07 +0000 (05:46 -0700)]
Update file due to changes in Bazel (PACKAGE_NAME is deprecated)

PiperOrigin-RevId: 190051589

6 years agoAllow to download clang and use clang for CPU builds.
Ilya Biryukov [Thu, 22 Mar 2018 12:33:42 +0000 (05:33 -0700)]
Allow to download clang and use clang for CPU builds.

Previously we only allowed to download clang when doing GPU builds.

The added skylark files use bazel's autoconf scripts, which were only added in
0.10.0. To provide nice error message for older versions of bazel
(i.e. 'version is less than 0.10' vs 'can't load @bazel_tools/cpp/...'), we
move the bazel version check into WORKSPACE file from workspace.bzl.

PiperOrigin-RevId: 190050798

6 years agoAdd a utility that converts call keyword arguments into dicts, in AST space.
A. Unique TensorFlower [Thu, 22 Mar 2018 11:50:42 +0000 (04:50 -0700)]
Add a utility that converts call keyword arguments into dicts, in AST space.

PiperOrigin-RevId: 190047495

6 years agoJava: Release 1.7.0-rc1
Asim Shankar [Thu, 22 Mar 2018 07:48:30 +0000 (00:48 -0700)]
Java: Release 1.7.0-rc1

PiperOrigin-RevId: 190028714

6 years agoTFLite: Ensure only 1 scale/zero_point is in QuantizationParam.
Yu-Cheng Ling [Thu, 22 Mar 2018 07:26:33 +0000 (00:26 -0700)]
TFLite: Ensure only 1 scale/zero_point is in QuantizationParam.
PiperOrigin-RevId: 190027163

6 years agoMinor style improvement in TFLite interpreter_test.py
Yu-Cheng Ling [Thu, 22 Mar 2018 07:26:31 +0000 (00:26 -0700)]
Minor style improvement in TFLite interpreter_test.py

PiperOrigin-RevId: 190027161

6 years agoAutomated g4 rollback of changelist 190001737
A. Unique TensorFlower [Thu, 22 Mar 2018 06:11:40 +0000 (23:11 -0700)]
Automated g4 rollback of changelist 190001737

PiperOrigin-RevId: 190021164

6 years agoMerge changes from github.
Sourabh Bajaj [Thu, 22 Mar 2018 06:04:59 +0000 (23:04 -0700)]
Merge changes from github.

PiperOrigin-RevId: 190020572

6 years agoSimplified the experimental APIs related to TPU execution, by moving the graph
Mingsheng Hong [Thu, 22 Mar 2018 05:11:10 +0000 (22:11 -0700)]
Simplified the experimental APIs related to TPU execution, by moving the graph
rewrite functionality out of it.

PiperOrigin-RevId: 190016936

6 years agoAdd tensor quantization info to python wrapper
A. Unique TensorFlower [Thu, 22 Mar 2018 02:12:18 +0000 (19:12 -0700)]
Add tensor quantization info to python wrapper

PiperOrigin-RevId: 190005998

6 years agoMoves TFE_Executor to common_runtime
Alexandre Passos [Thu, 22 Mar 2018 01:22:36 +0000 (18:22 -0700)]
Moves TFE_Executor to common_runtime

PiperOrigin-RevId: 190001737

6 years ago[tf.data] Do not crash when combining .cache().take().repeat()
Brennan Saeta [Thu, 22 Mar 2018 01:02:01 +0000 (18:02 -0700)]
[tf.data] Do not crash when combining .cache().take().repeat()

Currently, if the .cache() iterator is not fully consumed before
being repeated, it will cause an exception to be raised to Python.
Instead, cache should act as an identity transformation and log
an error, as this will not affect the correctness of the user's
program (at the cost of an unexpected performance cost: i.e. not
actually caching).

PiperOrigin-RevId: 189999552

6 years agoAdded an experimental C API to dump TF_Graph in a human-readable format, for
Mingsheng Hong [Thu, 22 Mar 2018 00:38:04 +0000 (17:38 -0700)]
Added an experimental C API to dump TF_Graph in a human-readable format, for
debugging purposes.

PiperOrigin-RevId: 189997099

6 years agoSmall convenience changes.
A. Unique TensorFlower [Thu, 22 Mar 2018 00:34:52 +0000 (17:34 -0700)]
Small convenience changes.

PiperOrigin-RevId: 189996801

6 years agoShorter definitions for elementwise_ops in op_level_cost_estimator.
Max Galkin [Wed, 21 Mar 2018 23:00:44 +0000 (16:00 -0700)]
Shorter definitions for elementwise_ops in op_level_cost_estimator.

PiperOrigin-RevId: 189983460

6 years agoChange Softmax on CUDA to use fp32 for denominator when input/output are fp16.
James Qin [Wed, 21 Mar 2018 22:55:30 +0000 (15:55 -0700)]
Change Softmax on CUDA to use fp32 for denominator when input/output are fp16.

This avoids potential overflow in the denominator, also makes sure accumulation is done
in high precision.

PiperOrigin-RevId: 189982655

6 years ago[TF:XLA] do not emit bfloat16 sum reductions from tf2xla
Nick Desaulniers [Wed, 21 Mar 2018 22:23:07 +0000 (15:23 -0700)]
[TF:XLA] do not emit bfloat16 sum reductions from tf2xla

bfloat16 is a storage format, not a computation format. Doing reductions in
this reduced precision is prone to quickly overflow.  Instead, emit a float32
computation, and wrap the reduce params and result in conversions to and from float32.

PiperOrigin-RevId: 189977590

6 years agoAdd an alternative "no_contrib" BUILD target to tensorflow/python to avoid including...
A. Unique TensorFlower [Wed, 21 Mar 2018 21:59:06 +0000 (14:59 -0700)]
Add an alternative "no_contrib" BUILD target to tensorflow/python to avoid including contrib packages

PiperOrigin-RevId: 189973359

6 years agoAvoid taking a reference on a temporary value
Benoit Steiner [Wed, 21 Mar 2018 21:26:14 +0000 (14:26 -0700)]
Avoid taking a reference on a temporary value

PiperOrigin-RevId: 189967517

6 years ago[XLA][BF16] Add bf16 rounding function.
Yunxing Dai [Wed, 21 Mar 2018 21:12:07 +0000 (14:12 -0700)]
[XLA][BF16] Add bf16 rounding function.

We now use truncation to convert a F32 to BF16 by default. This CL adds a rounding method (basically a roll forward of the rounding part in cl/175252067).

PiperOrigin-RevId: 189965138

6 years ago[docs] Update explicit latest_checkpoint with `path` returned while saving for object...
Shivani Agrawal [Wed, 21 Mar 2018 20:57:29 +0000 (13:57 -0700)]
[docs] Update explicit latest_checkpoint with `path` returned while saving for object-based checkpointing.

PiperOrigin-RevId: 189962437

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

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 21 Mar 2018 20:30:26 +0000 (13:30 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 189957912

6 years ago[TF CriticalSection] Bugfix when Execute() inside a while_loop has a dep on a Variabl...
Eugene Brevdo [Wed, 21 Mar 2018 20:28:11 +0000 (13:28 -0700)]
[TF CriticalSection] Bugfix when Execute() inside a while_loop has a dep on a Variable outside of it.

PiperOrigin-RevId: 189957569

6 years agoMake strcat.{h,cc} independent of Eigen.
A. Unique TensorFlower [Wed, 21 Mar 2018 20:08:02 +0000 (13:08 -0700)]
Make strcat.{h,cc} independent of Eigen.

PiperOrigin-RevId: 189954596

6 years agoTemporarily disable constant folding past Enter, since a few breakages have been...
A. Unique TensorFlower [Wed, 21 Mar 2018 19:53:53 +0000 (12:53 -0700)]
Temporarily disable constant folding past Enter, since a few breakages have been observed.

PiperOrigin-RevId: 189952252

6 years agoFurther improve accuracy of op_level_cost_estimator (Gather, GatherV2, Slice).
Max Galkin [Wed, 21 Mar 2018 19:53:04 +0000 (12:53 -0700)]
Further improve accuracy of op_level_cost_estimator (Gather, GatherV2, Slice).

PiperOrigin-RevId: 189952132

6 years ago[XLA] Adding more tests for ReduceWindow.
A. Unique TensorFlower [Wed, 21 Mar 2018 19:40:08 +0000 (12:40 -0700)]
[XLA] Adding more tests for ReduceWindow.

PiperOrigin-RevId: 189950361

6 years agoMade sure to compare all the attributes when comparing nodes
Benoit Steiner [Wed, 21 Mar 2018 19:14:30 +0000 (12:14 -0700)]
Made sure to compare all the attributes when comparing nodes

PiperOrigin-RevId: 189946858

6 years agoMerge changes from github.
Jacques Pienaar [Wed, 21 Mar 2018 19:07:51 +0000 (12:07 -0700)]
Merge changes from github.

PiperOrigin-RevId: 189945839

6 years agoFix compilation error with clang.
Ilya Biryukov [Wed, 21 Mar 2018 19:00:04 +0000 (12:00 -0700)]
Fix compilation error with clang.

Link to breaking CI build:
https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu-clang/232

PiperOrigin-RevId: 189944547

6 years agoDon't run data_utils_test without optimizations.
Justin Lebar [Wed, 21 Mar 2018 18:41:12 +0000 (11:41 -0700)]
Don't run data_utils_test without optimizations.

PiperOrigin-RevId: 189941645

6 years agoMake the graph_editor C-API friendly: always construct ops with their inputs.
Frank Perbet [Wed, 21 Mar 2018 18:40:25 +0000 (11:40 -0700)]
Make the graph_editor C-API friendly: always construct ops with their inputs.

PiperOrigin-RevId: 189941495

6 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 21 Mar 2018 18:18:02 +0000 (11:18 -0700)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 189937564

6 years agoAllowing dnn tree combined estimator to work with core versions of feature columns...
A. Unique TensorFlower [Wed, 21 Mar 2018 18:16:13 +0000 (11:16 -0700)]
Allowing dnn tree combined estimator to work with core versions of feature columns and losses

PiperOrigin-RevId: 189937063

6 years agoMoves KernelAndDevice to common_runtime
Alexandre Passos [Wed, 21 Mar 2018 18:12:28 +0000 (11:12 -0700)]
Moves KernelAndDevice to common_runtime

PiperOrigin-RevId: 189936396

6 years agoAdding `drop_remainder` option for the `map_and_batch` transformation, which allows...
Jiri Simsa [Wed, 21 Mar 2018 18:10:13 +0000 (11:10 -0700)]
Adding `drop_remainder` option for the `map_and_batch` transformation, which allows the user to express whether they wish to drop the last batch if its size is smaller than desired; the default is not to drop the smaller batch.

PiperOrigin-RevId: 189936029

6 years agoUpdate the doc to reflect the change of replacing std::clock with random::New64(...
A. Unique TensorFlower [Wed, 21 Mar 2018 18:01:54 +0000 (11:01 -0700)]
Update the doc to reflect the change of replacing std::clock with random::New64() as random number generator seed.

PiperOrigin-RevId: 189934377

6 years ago[XLA:GPU] Don't crash if a GTE feeds into a bitcast.
Justin Lebar [Wed, 21 Mar 2018 17:47:18 +0000 (10:47 -0700)]
[XLA:GPU] Don't crash if a GTE feeds into a bitcast.

GTE and bitcast are sort of "implicitly fused", so we have to handle
them in this way.

PiperOrigin-RevId: 189931422

6 years agoFix zipfile path for MacOS builds.
Michael Case [Wed, 21 Mar 2018 17:26:49 +0000 (10:26 -0700)]
Fix zipfile path for MacOS builds.

For some reason, the zipfile module on Macs appears to work differently and
complains about the whl file we are trying to extract not being found.

PiperOrigin-RevId: 189928007

6 years agoCollapse adjacent dimensions that have no paddings.
Jingyue Wu [Wed, 21 Mar 2018 17:20:25 +0000 (10:20 -0700)]
Collapse adjacent dimensions that have no paddings.

For example,

tf.pad(<4D tensor>, [[0, 0], [0, 0], [0, 0], [0, 1]])

is equivalent to a 2D pad, which is faster.

PiperOrigin-RevId: 189926996

6 years agoAdded an option to run shape analysis assuming the shapes of the feed nodes are
Benoit Steiner [Wed, 21 Mar 2018 16:59:18 +0000 (09:59 -0700)]
Added an option to run shape analysis assuming the shapes of the feed nodes are
valid.

PiperOrigin-RevId: 189923541

6 years agoDeletes sequential_feature_column(|_test).py.
A. Unique TensorFlower [Wed, 21 Mar 2018 16:26:16 +0000 (09:26 -0700)]
Deletes sequential_feature_column(|_test).py.

PiperOrigin-RevId: 189919029

6 years agoDon't run tensorflow/python:function_test under fastbuild.
Justin Lebar [Wed, 21 Mar 2018 16:20:28 +0000 (09:20 -0700)]
Don't run tensorflow/python:function_test under fastbuild.

It gets flaky timeouts.

PiperOrigin-RevId: 189918276

6 years agoDeleted dead code and fixed compilation warnings
Benoit Steiner [Wed, 21 Mar 2018 16:19:11 +0000 (09:19 -0700)]
Deleted dead code and fixed compilation warnings

PiperOrigin-RevId: 189918110

6 years agoRefactor pruning code to support custom node rewrites for feeds and fetches.
Derek Murray [Wed, 21 Mar 2018 15:45:19 +0000 (08:45 -0700)]
Refactor pruning code to support custom node rewrites for feeds and fetches.

PiperOrigin-RevId: 189913309

6 years agoMore accurate shape inference for TensorArrayGatherV3 and TensorArrayScatterV3
Benoit Steiner [Wed, 21 Mar 2018 15:40:35 +0000 (08:40 -0700)]
More accurate shape inference for TensorArrayGatherV3 and TensorArrayScatterV3

PiperOrigin-RevId: 189912762

6 years ago[tf.contrib CriticalSection] Avoid deadlocks using additional control dependencies...
Eugene Brevdo [Wed, 21 Mar 2018 15:25:34 +0000 (08:25 -0700)]
[tf.contrib CriticalSection] Avoid deadlocks using additional control dependencies on the lock op.

PiperOrigin-RevId: 189910726

6 years agoAutomated g4 rollback of changelist 189888700
A. Unique TensorFlower [Wed, 21 Mar 2018 15:21:28 +0000 (08:21 -0700)]
Automated g4 rollback of changelist 189888700

PiperOrigin-RevId: 189910239

6 years agoInstall documentation: adds note for virtual env with fish shell
A. Unique TensorFlower [Wed, 21 Mar 2018 14:34:28 +0000 (07:34 -0700)]
Install documentation: adds note for virtual env with fish shell

PiperOrigin-RevId: 189904848

6 years ago[XLA] Initialize arrays using cudaMemset when possible.
Justin Lebar [Wed, 21 Mar 2018 14:33:03 +0000 (07:33 -0700)]
[XLA] Initialize arrays using cudaMemset when possible.

Previously we were using our own hand-rolled initializer thunk.  This
worked OK for reduces, because the amount of data we were initializing
is usually small.  But for e.g. select-and-scatter, it's quite slow.

This patch lets us use cudaMemset instead.

PiperOrigin-RevId: 189904720

6 years agoTensorflow/GCS: Check whether we are running under GCE before trying to obtain auth...
A. Unique TensorFlower [Wed, 21 Mar 2018 13:57:06 +0000 (06:57 -0700)]
Tensorflow/GCS: Check whether we are running under GCE before trying to obtain auth token from GCE. Before this change, if a process is not running under GCE, the token request to metadata server would time out after 3+ minutes of retry. After this change, the check is bypassed, and we return an empty token to the caller. At that point, the caller's request to read/write a file in GCS would either succeed or fail depending on whether the bucket is publicly accessible.

PiperOrigin-RevId: 189900977

6 years agoMinor cosmetic improvement to error message.
A. Unique TensorFlower [Wed, 21 Mar 2018 12:55:32 +0000 (05:55 -0700)]
Minor cosmetic improvement to error message.

PiperOrigin-RevId: 189895415

6 years agoWe were ValueOrDie()ing in one place, and TF_CHECK_OK()ing in another. Both should...
A. Unique TensorFlower [Wed, 21 Mar 2018 11:09:32 +0000 (04:09 -0700)]
We were ValueOrDie()ing in one place, and TF_CHECK_OK()ing in another. Both should gracefully return an error condition.

Add some tests to check this.

PiperOrigin-RevId: 189888700

6 years agoMake graph's name scope thread local so that two threads opening the same scope don...
Priya Gupta [Wed, 21 Mar 2018 06:07:37 +0000 (23:07 -0700)]
Make graph's name scope thread local so that two threads opening the same scope don't get nested under each other.

PiperOrigin-RevId: 189865854

6 years agoMake variable scope and scope counts local to current thread so that they work correc...
Priya Gupta [Wed, 21 Mar 2018 04:39:16 +0000 (21:39 -0700)]
Make variable scope and scope counts local to current thread so that they work correctly in multi-threaded environments.

PiperOrigin-RevId: 189860229

6 years agoC API: fix device + colocation edge case in import_graph_def
Skye Wanderman-Milne [Wed, 21 Mar 2018 04:30:02 +0000 (21:30 -0700)]
C API: fix device + colocation edge case in import_graph_def

This change makes the C API consistent with the Python API, by making
sure that all nodes in a colocation group have the device of the op
named in the "_class" attr (all other ops' devices are ignored). This
is currently done by preserving the current Python logic for
colocation and devices, which only works if all ops start with no
device set. Without this change, imported nodes would have the device
specified in the GraphDef. This change unsets any device before
running the Python logic.

PiperOrigin-RevId: 189859688

6 years agoRemove recently introduced LOG INFO statements from AvgPoolingOp
Smit Hinsu [Wed, 21 Mar 2018 03:25:03 +0000 (20:25 -0700)]
Remove recently introduced LOG INFO statements from AvgPoolingOp

PiperOrigin-RevId: 189856039

6 years agoAdd reduce window tests for the cases when the input shape has 1 element.
A. Unique TensorFlower [Wed, 21 Mar 2018 02:48:18 +0000 (19:48 -0700)]
Add reduce window tests for the cases when the input shape has 1 element.

PiperOrigin-RevId: 189853631

6 years ago[XLA] Plumb hlo dump options via local client.
Chris Leary [Wed, 21 Mar 2018 02:14:26 +0000 (19:14 -0700)]
[XLA] Plumb hlo dump options via local client.

PiperOrigin-RevId: 189851211

6 years agoMinor documentation fix
A. Unique TensorFlower [Wed, 21 Mar 2018 01:45:17 +0000 (18:45 -0700)]
Minor documentation fix

PiperOrigin-RevId: 189848838

6 years ago[XLA] Simpify XlaBuilder: extract common add instruction logic.
A. Unique TensorFlower [Wed, 21 Mar 2018 01:36:33 +0000 (18:36 -0700)]
[XLA] Simpify XlaBuilder: extract common add instruction logic.

PiperOrigin-RevId: 189848174

6 years ago Fixing bug in MultitaskOptimizerWrapper where types of tensors were mismatching.
A. Unique TensorFlower [Wed, 21 Mar 2018 00:00:33 +0000 (17:00 -0700)]
 Fixing bug in MultitaskOptimizerWrapper where types of tensors were mismatching.

PiperOrigin-RevId: 189837743

6 years agoUse softmax_crossentropy_with_logits_v2 in tf.keras since softmax_crossentropy_with_l...
Anjali Sridhar [Tue, 20 Mar 2018 23:32:22 +0000 (16:32 -0700)]
Use softmax_crossentropy_with_logits_v2 in tf.keras since softmax_crossentropy_with_logits is deprecated.

PiperOrigin-RevId: 189833677

6 years ago[XLA] Use IDs instead of names to represent the edges of HLO graph in hlo.proto.
A. Unique TensorFlower [Tue, 20 Mar 2018 23:13:58 +0000 (16:13 -0700)]
[XLA] Use IDs instead of names to represent the edges of HLO graph in hlo.proto.

PiperOrigin-RevId: 189831057

6 years ago[XLA] Make HLO memory schedulers pluggable. Introduce a typedef MemorySchedulerAlgori...
Peter Hawkins [Tue, 20 Mar 2018 23:11:23 +0000 (16:11 -0700)]
[XLA] Make HLO memory schedulers pluggable. Introduce a typedef MemorySchedulerAlgorithm  which is a function instead of an enum to allow experimentation with non-standard schedulers. Refactoring only; no functional changes to the scheduling itself.

PiperOrigin-RevId: 189830685

6 years agoTweak statistical testing test to avoid making a zillion TF session.run calls.
A. Unique TensorFlower [Tue, 20 Mar 2018 22:10:07 +0000 (15:10 -0700)]
Tweak statistical testing test to avoid making a zillion TF session.run calls.

PiperOrigin-RevId: 189819449

6 years ago[XLA] Simplify the HLO proto: don't nest the fusion computation in an fusion HloInstr...
A. Unique TensorFlower [Tue, 20 Mar 2018 21:33:19 +0000 (14:33 -0700)]
[XLA] Simplify the HLO proto: don't nest the fusion computation in an fusion HloInstructionProto.

PiperOrigin-RevId: 189811729

6 years ago[tf.data] Improve docstring for `tf.contrib.data.Counter`.
Derek Murray [Tue, 20 Mar 2018 21:30:36 +0000 (14:30 -0700)]
[tf.data] Improve docstring for `tf.contrib.data.Counter`.

PiperOrigin-RevId: 189811108

6 years agoInternal Change.
Anjali Sridhar [Tue, 20 Mar 2018 21:23:39 +0000 (14:23 -0700)]
Internal Change.

PiperOrigin-RevId: 189809845

6 years agoMakes protobuf dep in tf.contrib.data conditional using if_static().
Terry Koo [Tue, 20 Mar 2018 20:39:42 +0000 (13:39 -0700)]
Makes protobuf dep in tf.contrib.data conditional using if_static().

In non-monolithic builds, adding it unconditionally would duplicate of protobuf symbols among tf.contrib op libraries.  Guarding it with if_static() restricts the dep to monolithic builds, which should be able to dedupe the symbols at link time.

PiperOrigin-RevId: 189800612

6 years agoBuild tflite interpreter from buffer in python interface
A. Unique TensorFlower [Tue, 20 Mar 2018 20:38:09 +0000 (13:38 -0700)]
Build tflite interpreter from buffer in python interface

PiperOrigin-RevId: 189800400