Ayush Dubey [Wed, 14 Mar 2018 17:55:11 +0000 (10:55 -0700)]
Add ScopedAllocator and ScopedAllocatorMgr.
A ScopedAllocator is a new memory allocator which manages slices of a large
tensor. ScopedAllocatorMgr manages all scoped allocators per device. The
ScopedAllocatorMgr comprises of multiple ScopedAllocatorContainers, one per
step id. If a step terminates abnormally, the corresponding
ScopedAllocatorContainer will clean up all allocated memory in that step.
PiperOrigin-RevId:
189051914
Jacques Pienaar [Wed, 14 Mar 2018 17:39:41 +0000 (10:39 -0700)]
Extend reduce_ops test to integers.
PiperOrigin-RevId:
189049525
HyoukJoong Lee [Wed, 14 Mar 2018 17:07:34 +0000 (10:07 -0700)]
Add interface in HloModuleGroupMetadata to return all channels
PiperOrigin-RevId:
189044541
Benoit Steiner [Wed, 14 Mar 2018 16:47:47 +0000 (09:47 -0700)]
Check for the value of the _XlaCompile boolean since xla often creates it with
the default value of false.
PiperOrigin-RevId:
189041421
Rachel Lim [Wed, 14 Mar 2018 15:51:14 +0000 (08:51 -0700)]
Removed stray/dead code that snuck in there in an earlier change.
PiperOrigin-RevId:
189034502
A. Unique TensorFlower [Wed, 14 Mar 2018 14:01:56 +0000 (07:01 -0700)]
Support for the Is and IsNot comparator nodes
PiperOrigin-RevId:
189022386
A. Unique TensorFlower [Wed, 14 Mar 2018 13:51:58 +0000 (06:51 -0700)]
Test use of tensor_list inside loops, as well as changing the contained type of a tensor_list inside of a loop.
PiperOrigin-RevId:
189021593
A. Unique TensorFlower [Wed, 14 Mar 2018 13:26:13 +0000 (06:26 -0700)]
Fix std::accumulate init value in xla::Product
The return type for std::accumulate is determined by the type of the
init value what was incorrect resulting in wrong result for large
numbers.
PiperOrigin-RevId:
189019412
Justin Lebar [Wed, 14 Mar 2018 10:46:37 +0000 (03:46 -0700)]
[TF:XLA] Add compiler fuel to mark_for_compilation_pass.
This is a useful debugging tool.
PiperOrigin-RevId:
189007771
Kay Zhu [Wed, 14 Mar 2018 06:24:00 +0000 (23:24 -0700)]
[XLA] Supports fusion ops in HloEvaluator.
PiperOrigin-RevId:
188985924
Yao Zhang [Wed, 14 Mar 2018 03:39:23 +0000 (20:39 -0700)]
Avoid live lock in a loop.
PiperOrigin-RevId:
188973527
A. Unique TensorFlower [Wed, 14 Mar 2018 03:20:05 +0000 (20:20 -0700)]
Add LinearOperatorBlockDiagonal, which supports matrix-free block diagonal structure.
Also update linear_operator_util_test to support passing in multiple shapes.
PiperOrigin-RevId:
188972221
Derek Murray [Wed, 14 Mar 2018 02:58:22 +0000 (19:58 -0700)]
[tf.data] Support tf.SparseTensor components in tf.contrib.data.get_single_element().
PiperOrigin-RevId:
188970548
Sanjoy Das [Wed, 14 Mar 2018 02:26:23 +0000 (19:26 -0700)]
Add a GatherExpander pass that can rewrite Gather ops back into HLO soup
With this pass we now have a minimal viable implementation of gather on all
platforms. The code is a bit gnarly but conceptually this is very similar to
what we do in the tf2xla bridge today.
PiperOrigin-RevId:
188968478
Tayo Oguntebi [Wed, 14 Mar 2018 02:00:06 +0000 (19:00 -0700)]
Adds R2 ReduceWindow test and generalizes the R2 test suite, particularly to
allow arbitary padding.
PiperOrigin-RevId:
188966155
Anna R [Wed, 14 Mar 2018 01:50:03 +0000 (18:50 -0700)]
Add ops to API that have tf_export decorators but haven't been added to API.
PiperOrigin-RevId:
188965158
Anna R [Wed, 14 Mar 2018 01:36:56 +0000 (18:36 -0700)]
Remove underscore prefix from _concat.
PiperOrigin-RevId:
188964168
Kay Zhu [Wed, 14 Mar 2018 01:12:43 +0000 (18:12 -0700)]
[XLA] Handle scalar predicate in Select correctly in HloEvaluator.
Previously the HloEvaluator would always assume the predicate is an array of
boolean type, and does not handle cases where on_true and on_false are of Tuple
types. This change fixes both and in turn removes the last blocker in full
tuple support in the evaluator.
Also enables xla/tests:tuple_test and xla/tests:deconstruct_tuple_test for the interpreter.
PiperOrigin-RevId:
188962022
Gunhan Gulsoy [Wed, 14 Mar 2018 00:32:26 +0000 (17:32 -0700)]
Automated g4 rollback of changelist
188937484
PiperOrigin-RevId:
188957662
A. Unique TensorFlower [Wed, 14 Mar 2018 00:27:08 +0000 (17:27 -0700)]
Transpose test updated so that unsupported transpose is not optimized away.
PiperOrigin-RevId:
188956982
Anna R [Wed, 14 Mar 2018 00:23:09 +0000 (17:23 -0700)]
Change the way we get argument list for get_local_variable. Current documentation for get_local_variable displays arguments as *args and **kwargs: https://tensorflow.org/versions/r1.3/api_docs/python/tf/get_local_variable .
Current decorator also doesn't play well with @tf_export decorator.
So I am switching to approach that adds __wrapped__ variable to get_local_variable so that we can get argument list from __wrapped__ function.
PiperOrigin-RevId:
188956520
Shanqing Cai [Wed, 14 Mar 2018 00:11:56 +0000 (17:11 -0700)]
tfdbg: split session_debug_grpc_test
* so that the test sizes are medium for both the existing session_debug_grpc_test
and the new grpc_large_data_test
Also in this CL
* Consolidate the functions for creating no-grappler-rewrite ConfigProtos
in one place: in session_debug_testlib.py
PiperOrigin-RevId:
188955135
Rachel Lim [Wed, 14 Mar 2018 00:07:16 +0000 (17:07 -0700)]
Added tf.contrib.data.make_csv_dataset as a convenience method to create a
dataset from csv files.
PiperOrigin-RevId:
188954555
Skye Wanderman-Milne [Tue, 13 Mar 2018 23:31:14 +0000 (16:31 -0700)]
Introduce _USE_C_SHAPES toggle along with _USE_C_API toggle.
This is a second level of staging before fully enabling the C
API. With _USE_C_API enabled but _USE_C_SHAPES disabled, the C API is
used for everything but retrieving the shape of Tensors (i.e. we
continue using the existing Python shape inference to implement
Tensor.shape).
This is useful because many tests fail with the C API fully
enabled. This will allow us to enable everything but the full shape
inference, fix the remaining broken tests, and then enable the full
shape shape inference.
This change also introduces the test_util.enable_c_shapes test method
decorator. This can be used to enable C shapes for a specific test
method. This is useful for tests that have already been modified to
work with full C shape inference.
PiperOrigin-RevId:
188949619
A. Unique TensorFlower [Tue, 13 Mar 2018 23:16:43 +0000 (16:16 -0700)]
Currently, multi-image summaries have their image indices removed and so they show up as a single summary (you have to use the timeline bar to cycle between the several images for the same step). This CL separates them to give the normal/expected behavior for image summaries where max_outputs > 1 (multiple images displayed simultaneously).
PiperOrigin-RevId:
188947797
Bixia Zheng [Tue, 13 Mar 2018 23:01:42 +0000 (16:01 -0700)]
[XLA]: Enhancement to the while loop simplifier HLO pass.
If a while-loop tuple element is initialized as a scalar constant and isn't
changed by the while-body, replace the use of the tuple element in
while-condition and while-body with the constant value. This enables the
simplification of while-loops that have 0/1 iteration and loop bound passed in
through the while-loop tuple.
Add test cases for while-loops with 0/1 iteration and loop bound passed in
through the while-loop tuple.
PiperOrigin-RevId:
188945375
Anna R [Tue, 13 Mar 2018 22:51:36 +0000 (15:51 -0700)]
Add test for API generated with tf_export calls to api_compatibility_test.py.
Also, fix remaining differences between this new API and the current TensorFlow
API.
PiperOrigin-RevId:
188943768
A. Unique TensorFlower [Tue, 13 Mar 2018 22:42:34 +0000 (15:42 -0700)]
Merged commit includes the following changes:
188942386 by mikecase:
Internal Change.
--
188941669 by A. Unique TensorFlower:
Change TensorFlow Lite Java Interpreter to use Checker Framework @NonNull annotation
--
188937484 by zhixianyan:
Convert saved_model to tflite flatbuffer.
--
PiperOrigin-RevId:
188942386
Alexandre Passos [Tue, 13 Mar 2018 21:52:43 +0000 (14:52 -0700)]
Resubmit changes which were accidentally rolled back.
PiperOrigin-RevId:
188934018
A. Unique TensorFlower [Tue, 13 Mar 2018 21:22:16 +0000 (14:22 -0700)]
Fix a couple of null-ptr dereferences
PiperOrigin-RevId:
188929375
A. Unique TensorFlower [Tue, 13 Mar 2018 20:31:52 +0000 (13:31 -0700)]
Internal Google Cleanup
PiperOrigin-RevId:
188921801
A. Unique TensorFlower [Tue, 13 Mar 2018 20:24:30 +0000 (13:24 -0700)]
Break the dependency between platform/types.h and bfloat16.h, and between
hash.h and bfloat16.h. This change introduces a generic mechanism for adapting
types that are meant to be used in tensorflow's error objects.
PiperOrigin-RevId:
188920678
Yuefeng Zhou [Tue, 13 Mar 2018 19:29:55 +0000 (12:29 -0700)]
Move session info into op info.
PiperOrigin-RevId:
188912426
Anna R [Tue, 13 Mar 2018 19:26:35 +0000 (12:26 -0700)]
Removing hidden_ops.txt file.
PiperOrigin-RevId:
188911958
Jingyue Wu [Tue, 13 Mar 2018 19:25:56 +0000 (12:25 -0700)]
Enable int8 tf.pad on GPU.
PiperOrigin-RevId:
188911859
Sanjoy Das [Tue, 13 Mar 2018 19:04:05 +0000 (12:04 -0700)]
[TF:XLA] Bump open source llvm revision to r327373
PiperOrigin-RevId:
188908427
A. Unique TensorFlower [Tue, 13 Mar 2018 18:46:05 +0000 (11:46 -0700)]
Internal cleanup.
PiperOrigin-RevId:
188905507
Alexandre Passos [Tue, 13 Mar 2018 18:43:39 +0000 (11:43 -0700)]
Proper name scoping in contrib summaries.
PiperOrigin-RevId:
188905080
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
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
A. Unique TensorFlower [Tue, 13 Mar 2018 18:30:20 +0000 (11:30 -0700)]
Automated g4 rollback of changelist
188353354
PiperOrigin-RevId:
188902517
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
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
A. Unique TensorFlower [Tue, 13 Mar 2018 17:22:53 +0000 (10:22 -0700)]
Add TFLite Interpreter bindings.
PiperOrigin-RevId:
188890943
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
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
A. Unique TensorFlower [Tue, 13 Mar 2018 16:11:14 +0000 (09:11 -0700)]
Internal change
PiperOrigin-RevId:
188880419
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
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
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId:
188860028
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
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId:
188860028
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
A. Unique TensorFlower [Tue, 13 Mar 2018 12:32:55 +0000 (05:32 -0700)]
PiperOrigin-RevId:
188860028
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
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
A. Unique TensorFlower [Tue, 13 Mar 2018 04:18:25 +0000 (21:18 -0700)]
Update ops-related pbtxt files.
PiperOrigin-RevId:
188824362
A. Unique TensorFlower [Tue, 13 Mar 2018 04:12:52 +0000 (21:12 -0700)]
Support NHWC <--> HWNC permutation.
PiperOrigin-RevId:
188824058
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
Shanqing Cai [Tue, 13 Mar 2018 02:33:52 +0000 (19:33 -0700)]
Merge changes from github.
PiperOrigin-RevId:
188817194
A. Unique TensorFlower [Tue, 13 Mar 2018 02:09:28 +0000 (19:09 -0700)]
Remove integration_tests directory and associated files.
PiperOrigin-RevId:
188815493
Max Galkin [Tue, 13 Mar 2018 01:35:15 +0000 (18:35 -0700)]
Demystify MaterializeShapes a bit.
PiperOrigin-RevId:
188812445
A. Unique TensorFlower [Tue, 13 Mar 2018 00:48:57 +0000 (17:48 -0700)]
Make tf.add_to_collections visible.
PiperOrigin-RevId:
188807786
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Joshua V. Dillon [Mon, 12 Mar 2018 19:58:49 +0000 (12:58 -0700)]
Add custom_gradient function.
PiperOrigin-RevId:
188765271
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
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
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
Mark Daoust [Mon, 12 Mar 2018 18:39:08 +0000 (11:39 -0700)]
Standardize "op" capitalization, see "adding_an_op".
PiperOrigin-RevId:
188753529
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
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
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
Benoit Steiner [Mon, 12 Mar 2018 18:04:59 +0000 (11:04 -0700)]
Avoid capturing unused variables in lambda functions
PiperOrigin-RevId:
188747641
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
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
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
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
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
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
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
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
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
Benoit Steiner [Mon, 12 Mar 2018 15:03:54 +0000 (08:03 -0700)]
Turn on function optimization by default
PiperOrigin-RevId:
188722505
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
A. Unique TensorFlower [Mon, 12 Mar 2018 10:13:15 +0000 (03:13 -0700)]
Lint some files.
PiperOrigin-RevId:
188698275
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