platform/upstream/tensorflow.git
7 years agoFix a bug in updating NodeMap, where the node name without port number should
Yao Zhang [Thu, 11 Jan 2018 00:13:09 +0000 (16:13 -0800)]
Fix a bug in updating NodeMap, where the node name without port number should
have been used.

PiperOrigin-RevId: 181532901

7 years agoImproved performance of tf.image.rgb_to_grayscale. Roughly 4 times faster on CPU...
A. Unique TensorFlower [Wed, 10 Jan 2018 23:38:44 +0000 (15:38 -0800)]
Improved performance of tf.image.rgb_to_grayscale. Roughly 4 times faster on CPU and 10% faster on GPU.

PiperOrigin-RevId: 181528321

7 years agoMake test_utils_test.py work with C API enabled.
Skye Wanderman-Milne [Wed, 10 Jan 2018 23:35:12 +0000 (15:35 -0800)]
Make test_utils_test.py work with C API enabled.

PiperOrigin-RevId: 181527872

7 years agoAdd --fat_apk_cpu=arm64-v8a for arm64 Android builds
Austin Anderson [Wed, 10 Jan 2018 23:16:01 +0000 (15:16 -0800)]
Add --fat_apk_cpu=arm64-v8a for arm64 Android builds

Bazel silently uses the wrong build settings for --config=android_arm64 (--cpu=arm64-v8a is not enough), and actually still uses armeabi-v7a in at least some cases. --fat_apk_cpu fixes this.

See #15581 for more.

PiperOrigin-RevId: 181525260

7 years agoReverted Raspberry Pi Docker files back to Ubuntu 14.04, instead of 16.04, to fix...
Pete Warden [Wed, 10 Jan 2018 23:13:17 +0000 (15:13 -0800)]
Reverted Raspberry Pi Docker files back to Ubuntu 14.04, instead of 16.04, to fix toolchain installation error

PiperOrigin-RevId: 181524891

7 years agoPropagate static shape info in AttentionWrapperState.clone() if possible.
Rui Zhao [Wed, 10 Jan 2018 23:03:47 +0000 (15:03 -0800)]
Propagate static shape info in AttentionWrapperState.clone() if possible.

Fixes #15737

PiperOrigin-RevId: 181523430

7 years agoDo not optimize out Identity nodes if specified as output.
A. Unique TensorFlower [Wed, 10 Jan 2018 23:02:32 +0000 (15:02 -0800)]
Do not optimize out Identity nodes if specified as output.

PiperOrigin-RevId: 181523204

7 years ago[TF:XLA] Fix infinite loop in HLO data flow analysis.
A. Unique TensorFlower [Wed, 10 Jan 2018 22:52:27 +0000 (14:52 -0800)]
[TF:XLA] Fix infinite loop in HLO data flow analysis.

Merge input values at phi nodes correctly: If a phi operand is the phi itself,
and the other operands are all the same, then the phi node is redundant.

PiperOrigin-RevId: 181521522

7 years agoAdded a utility function to create a grappler item from a function definition
Benoit Steiner [Wed, 10 Jan 2018 22:39:49 +0000 (14:39 -0800)]
Added a utility function to create a grappler item from a function definition

PiperOrigin-RevId: 181519635

7 years ago[XLA] Clean up our handling of ExecutionProfile and add a test case
Sanjoy Das [Wed, 10 Jan 2018 22:28:01 +0000 (14:28 -0800)]
[XLA] Clean up our handling of ExecutionProfile and add a test case

ExecutionProfile::compute_cycle_count never worked for CPU and GPU with Hlo
profiling disabled, as far as I can tell.
PiperOrigin-RevId: 181517824

7 years agoFix bug in the conversion of while loops. The while_loop's initial value needs to...
A. Unique TensorFlower [Wed, 10 Jan 2018 21:50:08 +0000 (13:50 -0800)]
Fix bug in the conversion of while loops. The while_loop's initial value needs to use the scope symbols, not their last assigned value.

PiperOrigin-RevId: 181511978

7 years agoRemove host_spec attr from TPU configuration ops since it isn't used any more.
A. Unique TensorFlower [Wed, 10 Jan 2018 21:49:23 +0000 (13:49 -0800)]
Remove host_spec attr from TPU configuration ops since it isn't used any more.

PiperOrigin-RevId: 181511871

7 years agoFix python/framework/subscribe.py and test to work with C API enabled.
Skye Wanderman-Milne [Wed, 10 Jan 2018 21:44:27 +0000 (13:44 -0800)]
Fix python/framework/subscribe.py and test to work with C API enabled.

PiperOrigin-RevId: 181511142

7 years agoRevert PlaceholderWithDefault logic in constant_folding.cc.
Skye Wanderman-Milne [Wed, 10 Jan 2018 21:40:36 +0000 (13:40 -0800)]
Revert PlaceholderWithDefault logic in constant_folding.cc.

Runtime constant folding after the graph has been rewritten to include any
feeds, so it's safe and desirable to constant fold PlaceholderWithDefaults
at this point.

PiperOrigin-RevId: 181510650

7 years agoAdding a new test case for tf.contrib.receptive_field.
A. Unique TensorFlower [Wed, 10 Jan 2018 21:23:59 +0000 (13:23 -0800)]
Adding a new test case for tf.contrib.receptive_field.

PiperOrigin-RevId: 181508517

7 years agoRemove the gradients function converter now that we can use the tape method.
A. Unique TensorFlower [Wed, 10 Jan 2018 21:09:04 +0000 (13:09 -0800)]
Remove the gradients function converter now that we can use the tape method.

PiperOrigin-RevId: 181506626

7 years agoSupport nesting EagerTemplate objects.
Akshay Agrawal [Wed, 10 Jan 2018 21:08:52 +0000 (13:08 -0800)]
Support nesting EagerTemplate objects.

* Nesting is implemented by sharing a single EagerVariableStore among a top-level EagerTemplate and all children EagerTemplate objects that are nested underneath it. Variables added to an EagerTemplate object are also added to all EagerTemplate objects under which it is nested.
* This change also simplifies the implementation of __call__ for both Template and EagerTemplate.

PiperOrigin-RevId: 181506600

7 years agoAttempt to fix #15951
Brian Patton [Wed, 10 Jan 2018 21:06:33 +0000 (13:06 -0800)]
Attempt to fix #15951

MacOS build fails for missing include of <array>

PiperOrigin-RevId: 181506335

7 years agoFix flaky training tests. Reenable the tests.
A. Unique TensorFlower [Wed, 10 Jan 2018 20:58:02 +0000 (12:58 -0800)]
Fix flaky training tests. Reenable the tests.

PiperOrigin-RevId: 181505090

7 years agoAllow gRPC Workers to use configure the number of threads driving work on both client...
Noah Eisen [Wed, 10 Jan 2018 20:51:47 +0000 (12:51 -0800)]
Allow gRPC Workers to use configure the number of threads driving work on both client and server side. Thread count is hardcoded to 8 for now, should be tuned in the future.

PiperOrigin-RevId: 181504374

7 years agoAdd lite version of ios_tensorflow_lib to exclude operations. This makes it easier...
A. Unique TensorFlower [Wed, 10 Jan 2018 20:46:25 +0000 (12:46 -0800)]
Add lite version of ios_tensorflow_lib to exclude operations. This makes it easier to package custom ops (tfmini) with the core binary on iOS.

PiperOrigin-RevId: 181503662

7 years agoExtend `assertAllClose()` so it supports namedtuples.
A. Unique TensorFlower [Wed, 10 Jan 2018 20:31:08 +0000 (12:31 -0800)]
Extend `assertAllClose()` so it supports namedtuples.
For example, if you have defined a namedtuple called `MyNamedTuple`, and there are two variables `a=MyNamedTuple(...)`, and `b=MyNamedTuple(...)`, you can directly call `assertAllClose(a, b)` if you intend to know if the two namedtuples are close elementwise.

PiperOrigin-RevId: 181501832

7 years ago[XLA] Name conv/dot fusion nodes conv_fusion.42 / dot_fusion.42.
Justin Lebar [Wed, 10 Jan 2018 20:11:13 +0000 (12:11 -0800)]
[XLA] Name conv/dot fusion nodes conv_fusion.42 / dot_fusion.42.

These fusion categories are really just a way of expressing a particular
kind of dot or conv. This makes them easier to differentiate from
"proper" fusion nodes.

We also change the category of these instructions so that in the HLO
profile, e.g. conv-fusion shows up under the convolution category,
rather than under "fusion".

PiperOrigin-RevId: 181499300

7 years agoMerge changes from github.
Frank Chen [Wed, 10 Jan 2018 19:36:52 +0000 (11:36 -0800)]
Merge changes from github.

PiperOrigin-RevId: 181494416

7 years agoAdd BF16 test for reverse.
Yuanzhong Xu [Wed, 10 Jan 2018 19:35:26 +0000 (11:35 -0800)]
Add BF16 test for reverse.

PiperOrigin-RevId: 181494232

7 years agoRelax text comparison for numpy formatting of arrays
Shanqing Cai [Wed, 10 Jan 2018 19:34:56 +0000 (11:34 -0800)]
Relax text comparison for numpy formatting of arrays

* Previously, strong assumptions were made about how numpy.ndarrays
  are formatted as strings. This led to breakages due to certain
  unclear changes in numpy or its dependencies. This CL relaxes the
  assumption and fix the affected tests for tfdbg and eager.
* The tests in tensor_format_test.py are simplified through helper
  methods.

PiperOrigin-RevId: 181494182

7 years agoThe gan training test is flaky. Disabling it.
Amit Patankar [Wed, 10 Jan 2018 19:29:21 +0000 (11:29 -0800)]
The gan training test is flaky. Disabling it.

PiperOrigin-RevId: 181493377

7 years agoAdd support for method calls with no return value. Only supports objects of types...
A. Unique TensorFlower [Wed, 10 Jan 2018 19:29:06 +0000 (11:29 -0800)]
Add support for method calls with no return value. Only supports objects of types whitelisted to remain uncompiled.

PiperOrigin-RevId: 181493349

7 years agoCleanup (remove unused method) before adding tensorrt configurations.
Guangda Lai [Wed, 10 Jan 2018 16:32:47 +0000 (08:32 -0800)]
Cleanup (remove unused method) before adding tensorrt configurations.

PiperOrigin-RevId: 181469026

7 years ago1) Bug fix: reuse discriminator_scope when re-applying discriminator_fn.
A. Unique TensorFlower [Wed, 10 Jan 2018 16:21:22 +0000 (08:21 -0800)]
1) Bug fix: reuse discriminator_scope when re-applying discriminator_fn.
2) Bug fix: explicitly set tensor pool output_values shape.

PiperOrigin-RevId: 181467812

7 years agoAdd support for more types for Pad.
Nupur Garg [Wed, 10 Jan 2018 16:19:48 +0000 (08:19 -0800)]
Add support for more types for Pad.

PiperOrigin-RevId: 181467627

7 years agoHandle empty squeeze dimensions.
Yao Zhang [Wed, 10 Jan 2018 06:58:39 +0000 (22:58 -0800)]
Handle empty squeeze dimensions.

PiperOrigin-RevId: 181422479

7 years ago[TF:XLA] Reduce boilerplate in ComputationBuilder op implementations.
Todd Wang [Wed, 10 Jan 2018 04:51:23 +0000 (20:51 -0800)]
[TF:XLA] Reduce boilerplate in ComputationBuilder op implementations.

This makes the code a bit easier to read, and less likely we'll accidentally
forget to set common fields for any new ops. A similar pattern is used for every
op:

  ComputationDataHandle ComputationBuilder::Foo(...) {
    OpRequest op_request;
    FooRequest* request = op_request.mutable_foo_request();
    // ... fill in specific request ...
    return RunOpAndParseResponse(&op_request);
  }

No functional changes.

PiperOrigin-RevId: 181415608

7 years ago[XLA::GPU] Pass xla_backend_extra_options to the GPU backend.
A. Unique TensorFlower [Wed, 10 Jan 2018 04:37:15 +0000 (20:37 -0800)]
[XLA::GPU] Pass xla_backend_extra_options to the GPU backend.

Move InitializeLLVMCommandLineOptions from cpu_compiler.cc to llvm_util.cc to
make it available to the GPU backend.
Call InitializeLLVMCommandLineOptions when initializing the GPU backend.

PiperOrigin-RevId: 181414589

7 years ago[XLA] Ensure that IR is dumped if the LLVM verifier fails.
Justin Lebar [Wed, 10 Jan 2018 03:34:40 +0000 (19:34 -0800)]
[XLA] Ensure that IR is dumped if the LLVM verifier fails.

Without this change, if verification of the LLVM IR failed, we'd bail
out before dumping the IR.  All this even though our error message
helpfully suggests passing --xla_dump_ir_to!

PiperOrigin-RevId: 181410671

7 years agoRemove smart pointers from SQLite veneer
Justine Tunney [Wed, 10 Jan 2018 03:30:14 +0000 (19:30 -0800)]
Remove smart pointers from SQLite veneer

Sqlite now extends tensorflow::core::RefCounted which is a better practice for
code in the TensorFlow codebase.

A few other trivial changes were snuck in. There's now a db->changes() method.
Error messages will also display the SQLite extended result code, which can be
looked up by hand with some difficulty, just in case the error message string
doesn't reflect the whole nuance of something like an i/o error.

PiperOrigin-RevId: 181410358

7 years agoAdd assertion to prevent generation of degenerate linear_to_mel_weight_matrix.
A. Unique TensorFlower [Wed, 10 Jan 2018 02:42:32 +0000 (18:42 -0800)]
Add assertion to prevent generation of degenerate linear_to_mel_weight_matrix.

Prior to this change if upper_edge_hertz is larger than sample_rate / 2 (the highest frequency present in the linear spectrogram), the returned matrix would contain columns that are all zeros.

This is likely a surprising result for those that are unfamiliar with signal processing, so it seems safer to raise an exception on such a misconfiguration than to silently allow users to generate poorly behaved features.

PiperOrigin-RevId: 181407176

7 years agoUpdate ops-related pbtxt files.
A. Unique TensorFlower [Wed, 10 Jan 2018 02:23:54 +0000 (18:23 -0800)]
Update ops-related pbtxt files.

PiperOrigin-RevId: 181405525

7 years agoRaise an error if the variable names in WarmStartSettings aren't actually used.
A. Unique TensorFlower [Wed, 10 Jan 2018 02:17:28 +0000 (18:17 -0800)]
Raise an error if the variable names in WarmStartSettings aren't actually used.

PiperOrigin-RevId: 181404919

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Wed, 10 Jan 2018 01:17:58 +0000 (17:17 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 181398752

7 years agoprofiler C++ API.
A. Unique TensorFlower [Wed, 10 Jan 2018 01:05:15 +0000 (17:05 -0800)]
profiler C++ API.

PiperOrigin-RevId: 181397308

7 years agoAdded a "Getting Started with TensorFlow for ML Beginners" chapter to Get
A. Unique TensorFlower [Wed, 10 Jan 2018 00:59:01 +0000 (16:59 -0800)]
Added a "Getting Started with TensorFlow for ML Beginners" chapter to Get
Started section.

PiperOrigin-RevId: 181396430

7 years agoReplace get_started
Mark Daoust [Wed, 10 Jan 2018 00:40:47 +0000 (16:40 -0800)]
Replace get_started

Also add sub-sections to leftnav files,
and sync leftnav and index files.

PiperOrigin-RevId: 181394206

7 years ago[tf.data] Store the `FunctionLibraryDefinition` for restored iterators in the resource.
Derek Murray [Wed, 10 Jan 2018 00:31:04 +0000 (16:31 -0800)]
[tf.data] Store the `FunctionLibraryDefinition` for restored iterators in the resource.

This will make it possible to use the experimental `overlay_lib` to
instantiate and run functions from a restored iterator's graph using
the shared `FunctionLibraryRuntime`.

PiperOrigin-RevId: 181392925

7 years agoRemove regex for Gather tests. We don't test int64 indices at all.
A. Unique TensorFlower [Wed, 10 Jan 2018 00:11:07 +0000 (16:11 -0800)]
Remove regex for Gather tests. We don't test int64 indices at all.

PiperOrigin-RevId: 181390058

7 years agoDo not record operations or watch tensors/variables when the thread tape is disabled.
Alexandre Passos [Wed, 10 Jan 2018 00:11:01 +0000 (16:11 -0800)]
Do not record operations or watch tensors/variables when the thread tape is disabled.

PiperOrigin-RevId: 181390045

7 years agoMake replicate_model_fn more flexible to simplify users' model_fn.
Igor Saprykin [Tue, 9 Jan 2018 23:58:52 +0000 (15:58 -0800)]
Make replicate_model_fn more flexible to simplify users' model_fn.

If there is only one device then replication/aggregation overhead isn't added.  It is okay to not use TowerEstimator if there is only one device.  It is okay to use TowerEstimator but not use replicate_model_fn.

PiperOrigin-RevId: 181388296

7 years ago [tpu:profiler] Capture the data for generating an overview page of the profiling...
A. Unique TensorFlower [Tue, 9 Jan 2018 23:56:37 +0000 (15:56 -0800)]
   [tpu:profiler] Capture the data for generating an overview page of the profiling results.

PiperOrigin-RevId: 181387984

7 years agoRemoving op_gen_overrides.proto and references. Overrides in op_gen_overrides.pbtxt...
Anna R [Tue, 9 Jan 2018 23:49:09 +0000 (15:49 -0800)]
Removing op_gen_overrides.proto and references. Overrides in op_gen_overrides.pbtxt are a part of tensorflow/core/api_def/base_api/.

PiperOrigin-RevId: 181386873

7 years agoAllow 1D, 2D and 3D tensors in L2Norm
A. Unique TensorFlower [Tue, 9 Jan 2018 23:31:45 +0000 (15:31 -0800)]
Allow 1D, 2D and 3D tensors in L2Norm

PiperOrigin-RevId: 181384430

7 years agoSimplify replicate_model_fn.GatheringOptimizer inspired by the past comments.
Igor Saprykin [Tue, 9 Jan 2018 23:12:55 +0000 (15:12 -0800)]
Simplify replicate_model_fn.GatheringOptimizer inspired by the past comments.

- I worked around the need to rely on Optimizer.__class__ for keeping track of the gradients. Now we are relying on the order of collecting them.  I also added a basic verification that all towers have indeed called the same number of optimizers.
- I now allow the user to increment global step however many times they wish.

The changes above allowed me to support using the same optimizer class multiple times in a tower.

I also renamed GatheringOptimizer to TowerOptimizer, which is a breaking change.  #lifeincontrib

PiperOrigin-RevId: 181381569

7 years agoBetter detect the amount of device memory that's available
Benoit Steiner [Tue, 9 Jan 2018 23:12:13 +0000 (15:12 -0800)]
Better detect the amount of device memory that's available

PiperOrigin-RevId: 181381477

7 years agoDisable contrib/data interleave_dataset_op_test as it is timing out on some Kokoro...
Frank Chen [Tue, 9 Jan 2018 22:25:55 +0000 (14:25 -0800)]
Disable contrib/data interleave_dataset_op_test as it is timing out on some Kokoro runs: https://source.cloud.google.com/results/invocations/d276e288-4664-4b17-aac2-b0dfaff45b17/targets/%2F%2Ftensorflow%2Fcontrib%2Fdata%2Fpython%2Fkernel_tests:interleave_dataset_op_test/tests

PiperOrigin-RevId: 181374381

7 years ago[TF:XLA] Bump open source llvm revision to r322011
Sanjoy Das [Tue, 9 Jan 2018 22:20:48 +0000 (14:20 -0800)]
[TF:XLA] Bump open source llvm revision to r322011

PiperOrigin-RevId: 181373542

7 years ago[TF:XLA] Use broadcasts instead of larger constants for image resizing.
Blake Hechtman [Tue, 9 Jan 2018 21:56:07 +0000 (13:56 -0800)]
[TF:XLA] Use broadcasts instead of larger constants for image resizing.

PiperOrigin-RevId: 181369272

7 years agoAutomated g4 rollback of changelist 180691955
Anna R [Tue, 9 Jan 2018 21:32:17 +0000 (13:32 -0800)]
Automated g4 rollback of changelist 180691955

PiperOrigin-RevId: 181365803

7 years agoExtend the type info analyzer to cover variables declared using with statements.
A. Unique TensorFlower [Tue, 9 Jan 2018 20:42:10 +0000 (12:42 -0800)]
Extend the type info analyzer to cover variables declared using with statements.
This allows constructs of the kind:

  with tfe.GradientTape() as tape:
    tape.gradients(...)

PiperOrigin-RevId: 181358791

7 years agoIntroduce global_id_in_cluster in RunConfig.
Jianwei Xie [Tue, 9 Jan 2018 20:12:37 +0000 (12:12 -0800)]
Introduce global_id_in_cluster in RunConfig.

PiperOrigin-RevId: 181354785

7 years agoHigh level API. The public interface is found in api.py.
A. Unique TensorFlower [Tue, 9 Jan 2018 20:01:48 +0000 (12:01 -0800)]
High level API. The public interface is found in api.py.

PiperOrigin-RevId: 181352929

7 years ago[XLA] Make HLO categorization a bit more sane.
A. Unique TensorFlower [Tue, 9 Jan 2018 20:01:28 +0000 (12:01 -0800)]
[XLA] Make HLO categorization a bit more sane.

Remove meaningless distinctions between fusion nodes. Knowing whether a loop fusion op is "elementwise" (~ doesn't contain any broadcast inputs) doesn't provide any useful information.

PiperOrigin-RevId: 181352880

7 years agoAdd experimental `FunctionLibraryRuntime::InstantiateOptions::overlay_lib`.
Derek Murray [Tue, 9 Jan 2018 19:56:51 +0000 (11:56 -0800)]
Add experimental `FunctionLibraryRuntime::InstantiateOptions::overlay_lib`.

This option makes it possible to instantiate functions from a library
that has been loaded separately from the runtime's own library. We
plan to use this as part of the `tf.data` checkpoint restore process,
which might load an iterator whose state includes functions that
aren't present in the original graph. (This is currently achieved by
creating an isolated `FunctionLibraryRuntime` for each function-using
`Dataset`, but that is inefficient and prevents using features of the
main runtime, such as cross-device function calls.)

PiperOrigin-RevId: 181352217

7 years agoImplement `tf.data.Iterator` methods and properties in `tf.contrib.eager.Iterator`.
Derek Murray [Tue, 9 Jan 2018 19:47:06 +0000 (11:47 -0800)]
Implement `tf.data.Iterator` methods and properties in  `tf.contrib.eager.Iterator`.

Also fixes `tf.contrib.eager.Iterator` so that it can work with
datasets containing `tf.SparseTensor` components.

This change allows you to use the `get_next()` method, `output_types`
property, `output_shapes` property, and `output_classes` property from
`tf.data.Iterator` when constructing a `tf.contrib.eager.Iterator`;
and therefore makes it easier to write code that operates on an
`Iterator` in both eager and graph mode.

PiperOrigin-RevId: 181350797

7 years agoReplaces std::random_shuffle by std::shuffle for C++17 compatibility.
A. Unique TensorFlower [Tue, 9 Jan 2018 19:46:32 +0000 (11:46 -0800)]
Replaces std::random_shuffle by std::shuffle for C++17 compatibility.

PiperOrigin-RevId: 181350723

7 years ago[XLA] Elide unnecessary local client creations in SWIG API.
Chris Leary [Tue, 9 Jan 2018 19:45:29 +0000 (11:45 -0800)]
[XLA] Elide unnecessary local client creations in SWIG API.

PiperOrigin-RevId: 181350574

7 years agoRemoving dnn_linear_combined_test from msan testing.
Amit Patankar [Tue, 9 Jan 2018 19:34:52 +0000 (11:34 -0800)]
Removing dnn_linear_combined_test from msan testing.

PiperOrigin-RevId: 181349010

7 years agoFix type attribute name for Cast.
Yao Zhang [Tue, 9 Jan 2018 19:31:05 +0000 (11:31 -0800)]
Fix type attribute name for Cast.

PiperOrigin-RevId: 181348431

7 years agoAdding support for const ops that "broadcast" their own values.
A. Unique TensorFlower [Tue, 9 Jan 2018 19:14:31 +0000 (11:14 -0800)]
Adding support for const ops that "broadcast" their own values.

PiperOrigin-RevId: 181345661

7 years agoSupport FusedBatchNorm layer in receptive field calculation.
A. Unique TensorFlower [Tue, 9 Jan 2018 19:12:26 +0000 (11:12 -0800)]
Support FusedBatchNorm layer in receptive field calculation.

PiperOrigin-RevId: 181345319

7 years agoAdding a CLIF library for generic_tree_model.proto
A. Unique TensorFlower [Tue, 9 Jan 2018 18:51:31 +0000 (10:51 -0800)]
Adding a CLIF library for generic_tree_model.proto

PiperOrigin-RevId: 181341793

7 years agoFix _warmstart_var_with_vocab to truly accept either a checkpoint dir or a direct...
A. Unique TensorFlower [Tue, 9 Jan 2018 18:49:16 +0000 (10:49 -0800)]
Fix _warmstart_var_with_vocab to truly accept either a checkpoint dir or a direct path to checkpoint files.

PiperOrigin-RevId: 181341437

7 years agoFix typo in ValueError string.
A. Unique TensorFlower [Tue, 9 Jan 2018 18:41:06 +0000 (10:41 -0800)]
Fix typo in ValueError string.

PiperOrigin-RevId: 181340112

7 years ago[XLA] Run the LLVM verifier after lowering HLO -> LLVM IR.
Justin Lebar [Tue, 9 Jan 2018 18:06:58 +0000 (10:06 -0800)]
[XLA] Run the LLVM verifier after lowering HLO -> LLVM IR.

This way if we generate bad IR, we emit a nice error message, instead of
(probably) crashing somewhere in LLVM.

PiperOrigin-RevId: 181334588

7 years agoExposes runmetadata from tfe in python.
Alexandre Passos [Tue, 9 Jan 2018 15:37:55 +0000 (07:37 -0800)]
Exposes runmetadata from tfe in python.

PiperOrigin-RevId: 181317960

7 years agoDon't pass '-no-canonical-prefixes' when collecting builtin includes.
Ilya Biryukov [Tue, 9 Jan 2018 13:27:43 +0000 (05:27 -0800)]
Don't pass '-no-canonical-prefixes' when collecting builtin includes.

It matches the way bazel's autoconf works and seems to be the right thing to
do.
This change should fix #14380.

PiperOrigin-RevId: 181305871

7 years agoForward-mode automatic differentiation for Tensorflow.
A. Unique TensorFlower [Tue, 9 Jan 2018 11:49:52 +0000 (03:49 -0800)]
Forward-mode automatic differentiation for Tensorflow.

PiperOrigin-RevId: 181297995

7 years ago[XLA:Tool] Fix an error message in the Hlo parser: should report unexpected subattrib...
A. Unique TensorFlower [Tue, 9 Jan 2018 05:45:02 +0000 (21:45 -0800)]
[XLA:Tool] Fix an error message in the Hlo parser: should report unexpected subattribute's location correctly.

PiperOrigin-RevId: 181265992

7 years agoAvoid deadlock by sleeping for a longer duration.
Frank Chen [Tue, 9 Jan 2018 05:11:20 +0000 (21:11 -0800)]
Avoid deadlock by sleeping for a longer duration.

PiperOrigin-RevId: 181263637

7 years agosubtract the task's size from the batch's when removing it.
A. Unique TensorFlower [Tue, 9 Jan 2018 04:53:48 +0000 (20:53 -0800)]
subtract the task's size from the batch's when removing it.

PiperOrigin-RevId: 181262266

7 years agoAutomated g4 rollback of changelist 181243048
A. Unique TensorFlower [Tue, 9 Jan 2018 04:36:13 +0000 (20:36 -0800)]
Automated g4 rollback of changelist 181243048

PiperOrigin-RevId: 181260801

7 years agoFix typo in comment TFE_Execute
Igor Ganichev [Tue, 9 Jan 2018 04:35:21 +0000 (20:35 -0800)]
Fix typo in comment TFE_Execute

PiperOrigin-RevId: 181260751

7 years ago[TF:XLA] Bump open source llvm revision to r321863
Sanjoy Das [Tue, 9 Jan 2018 04:15:33 +0000 (20:15 -0800)]
[TF:XLA] Bump open source llvm revision to r321863

PiperOrigin-RevId: 181259191

7 years ago[TF:XLA] Add while loop invariant code motion
Sanjoy Das [Tue, 9 Jan 2018 03:41:05 +0000 (19:41 -0800)]
[TF:XLA] Add while loop invariant code motion

This new pass extracts out loop invariant computations out of while loops into
their parent computations.

Right now this is enabled only for the CPU backend.

PiperOrigin-RevId: 181256166

7 years ago[XLA] Fix spelling in error message; NFC
Sanjoy Das [Tue, 9 Jan 2018 03:39:41 +0000 (19:39 -0800)]
[XLA] Fix spelling in error message; NFC

PiperOrigin-RevId: 181256065

7 years agoDon't treat PlaceholderWithDefaults as constants.
Skye Wanderman-Milne [Tue, 9 Jan 2018 03:09:47 +0000 (19:09 -0800)]
Don't treat PlaceholderWithDefaults as constants.

Without this, the shape refiner will use the shape of the default, which may
be more precise than the specified shape. This would cause util_test to
fail with the C API enabled.

PiperOrigin-RevId: 181253665

7 years agoMake meta_graph_test.py work with C API enabled.
Skye Wanderman-Milne [Tue, 9 Jan 2018 02:57:44 +0000 (18:57 -0800)]
Make meta_graph_test.py work with C API enabled.

This mainly means changing test_util.assert_meta_graph_protos_equal to
call assert_equal_graph_def instead of comparing the GraphDef protos
using assertEquals, since the NodeDefs are in a different order with
the C API enabled. It also makes assert_equal_graph_def treat inputs
'tensor' and 'tensor:0' as equal (they're both valid).

PiperOrigin-RevId: 181252488

7 years agoIgnore nodes that are going to be swapped when computing max memory usage
Benoit Steiner [Tue, 9 Jan 2018 02:15:51 +0000 (18:15 -0800)]
Ignore nodes that are going to be swapped when computing max memory usage

PiperOrigin-RevId: 181248577

7 years agoGo: Update generated wrapper functions for TensorFlow ops.
A. Unique TensorFlower [Tue, 9 Jan 2018 02:08:47 +0000 (18:08 -0800)]
Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 181247809

7 years agoFix the threading model of gradient tapes.
Alexandre Passos [Tue, 9 Jan 2018 01:59:58 +0000 (17:59 -0800)]
Fix the threading model of gradient tapes.

The set of tapes needs to be global to enable multithreaded programming
(when it's natural for tensors to cross threads during reduction operations)
but each thread still needs to be able to locally pause recording while
it does gradient-related bookkeeping (like custom gradients or initialization).

Also removes a mutex from the thread-local structure since it's unnecessary
as we're always holding the GIL while calling across the python-c boundary
unless we explicitly release it.

PiperOrigin-RevId: 181246570

7 years ago[XLA] Initial sparse layout support
A. Unique TensorFlower [Tue, 9 Jan 2018 01:36:56 +0000 (17:36 -0800)]
[XLA] Initial sparse layout support

Adds SparseIndexArray and support methods to Literal. SparseIndexArray manages
the array of sparse indices and is exposed by sparse Literals.

Also adds HloSupportChecker classes for CPU and GPU.  This will be run as the
first HloPass during compilation, and verifies that the graph is supported by
the backend.  Currently only verifies shapes, and that the layout is not sparse
since no backend supports sparse layouts yet.

PiperOrigin-RevId: 181244401

7 years ago[TF:XLA] Pass CompileOptions into XlaCompilationCache::Compile.
A. Unique TensorFlower [Tue, 9 Jan 2018 01:23:57 +0000 (17:23 -0800)]
[TF:XLA] Pass CompileOptions into XlaCompilationCache::Compile.

PiperOrigin-RevId: 181243048

7 years agoMaterialize BroadcastGradientArgs by default instead of just doing so in aggressive...
Benoit Steiner [Tue, 9 Jan 2018 01:21:43 +0000 (17:21 -0800)]
Materialize BroadcastGradientArgs by default instead of just doing so in aggressive mode. This ensures that we optimize gradient computations in the presence of variable batch sizes.

PiperOrigin-RevId: 181242749

7 years agoFixes the TF Lite Makefile so that it correctly adds flags to link with the dl
A. Unique TensorFlower [Tue, 9 Jan 2018 00:56:43 +0000 (16:56 -0800)]
Fixes the TF Lite Makefile so that it correctly adds flags to link with the dl
lib on Linux.  This matches the configuration in the contrib/makefile/Makefile.

PiperOrigin-RevId: 181239691

7 years ago[XLA] Add tests for conditionals that return tuples and whose predicate operands...
A. Unique TensorFlower [Tue, 9 Jan 2018 00:38:01 +0000 (16:38 -0800)]
[XLA] Add tests for conditionals that return tuples and whose predicate operands are external parameters.

PiperOrigin-RevId: 181237427

7 years ago[XLA:GPU] Warn if ptxas or the driver JIT has known bugs.
Justin Lebar [Tue, 9 Jan 2018 00:19:30 +0000 (16:19 -0800)]
[XLA:GPU] Warn if ptxas or the driver JIT has known bugs.

We try to compile ptx->sass using ptxas, and fall back to the driver JIT
only if this fails.  So we only warn about a bad driver JIT version if
we actually use the driver to compile our ptx.

This change also quiets a LOG(INFO) to a VLOG(1) in cuda_diagnostics.cc
so we don't spit out the full contents of the driver file when we query
it.

PiperOrigin-RevId: 181235275

7 years agoEnable _warmstart() to work with un-partitioned variables.
A. Unique TensorFlower [Tue, 9 Jan 2018 00:08:44 +0000 (16:08 -0800)]
Enable _warmstart() to work with un-partitioned variables.

PiperOrigin-RevId: 181233898

7 years agograbbing the graph_def from the C API instead of depending on the python graph_def...
Olivia Nordquist [Tue, 9 Jan 2018 00:07:58 +0000 (16:07 -0800)]
grabbing the graph_def from the C API instead of depending on the python graph_def: the C-API had an experimental field that is stripped when empty to match the python implementation.

PiperOrigin-RevId: 181233777

7 years agoFix sample_benchmark target path in documentation.
Anna R [Mon, 8 Jan 2018 23:59:58 +0000 (15:59 -0800)]
Fix sample_benchmark target path in documentation.

PiperOrigin-RevId: 181232554

7 years agoFix bug in template_test's test_nested_templates method.
Akshay Agrawal [Mon, 8 Jan 2018 23:42:33 +0000 (15:42 -0800)]
Fix bug in template_test's test_nested_templates method.

PiperOrigin-RevId: 181230269

7 years agoRemove third_party/ prefixes.
Yifei Feng [Mon, 8 Jan 2018 23:06:59 +0000 (15:06 -0800)]
Remove third_party/ prefixes.
Closes #15674.

PiperOrigin-RevId: 181225180

7 years agoVery minor edits to performance_guide.md
Neal Wu [Mon, 8 Jan 2018 22:59:16 +0000 (14:59 -0800)]
Very minor edits to performance_guide.md

PiperOrigin-RevId: 181223906