A. Unique TensorFlower [Tue, 3 Apr 2018 18:15:29 +0000 (11:15 -0700)]
Turn no-op split/splitv operators into identity.
PiperOrigin-RevId:
191469655
Asim Shankar [Tue, 3 Apr 2018 17:51:57 +0000 (10:51 -0700)]
tf.map_fn: Improve error messaging when elems consists of scalars.
Fixes #17694
Prior to this change, when tf.map_fn was provided with scalars, the error would
be something like:
Traceback (most recent call last):
File "/tensorflow/python/kernel_tests/functional_ops_test.py", line 165, in testMapOverScalarErrors
functional_ops.map_fn(lambda x: x, [1, 2])
File "/tensorflow/python/ops/functional_ops.py", line 368, in map_fn
n = elems_flat[0].shape[0].value or array_ops.shape(elems_flat[0])[0]
File "/tensorflow/python/framework/tensor_shape.py", line 609, in __getitem__
return self._dims[key]
IndexError: list index out of range
PiperOrigin-RevId:
191465183
Bixia Zheng [Tue, 3 Apr 2018 17:47:37 +0000 (10:47 -0700)]
[TF:XLA] Add DT_HALF to the supported data types for the CPU and GPU devices.
Add a test case to compilation_passes_test for DT_HALF data type.
PiperOrigin-RevId:
191464288
A. Unique TensorFlower [Tue, 3 Apr 2018 17:35:00 +0000 (10:35 -0700)]
Three operators are added that can be used to decrease the number of
transpose/reshape occurences. These operators are:
- Swap elementwise
- Swap reshape-transpose
- Fuse transpose-reshape
Swap elementwise groups operations that operate on value, and move values. This
allows all movement operations (reshape, transpose, etc) to group at one
portion of the graph while value manipulations group on the other end.
Swap reshape/transpose finds cases where the reshape-transpose can be reorderd.
This allows the reshape-transpose-reshape case to be transformed to
transpose-reshape-reshape, which can then merge the reshape-reshape.
Finally the transpose-reshape merge allows cases where, when reshape maintains
the same dimensions and does not affect memory ordering, the transpose and
reshape can be merged into a single transpose operator.
PiperOrigin-RevId:
191462038
A. Unique TensorFlower [Tue, 3 Apr 2018 17:32:57 +0000 (10:32 -0700)]
Add 8bit strided slice op to tflite
PiperOrigin-RevId:
191461696
Akshay Modi [Tue, 3 Apr 2018 17:06:32 +0000 (10:06 -0700)]
Don't call context function either in the fastpath.
Also add a slowpath benchmark for identity.
PiperOrigin-RevId:
191457407
Akshay Modi [Tue, 3 Apr 2018 17:04:47 +0000 (10:04 -0700)]
Apply "Raise exception in SWIG on bad TF_Status" to base.i
Minor fixes to make this work.
PiperOrigin-RevId:
191457070
Derek Murray [Tue, 3 Apr 2018 17:00:02 +0000 (10:00 -0700)]
[tf.data] Fix handling of nested structures in `tf.contrib.data.prefetch_to_device()`.
PiperOrigin-RevId:
191456191
A. Unique TensorFlower [Tue, 3 Apr 2018 17:00:00 +0000 (10:00 -0700)]
Bug Fix: If num_uses > 0 the the inputs tensor need not be a list but can be reshaped to
[batch_size*num_uses, input_size]. `num_uses` should be incremented by one in this case.'
PiperOrigin-RevId:
191456184
Shashi Shekhar [Tue, 3 Apr 2018 16:47:18 +0000 (09:47 -0700)]
Enable C++ warnings on a few targets.
PiperOrigin-RevId:
191454435
Skye Wanderman-Milne [Tue, 3 Apr 2018 16:09:13 +0000 (09:09 -0700)]
Make batch_sequences_with_states_test.py work with the C API enabled, take 2.
It turns out the error can depend on what sequence comes first in the
input dict. This change internally sorts the input to make the error
predictable (this is useful for this test, as well as any users who
may run into this).
PiperOrigin-RevId:
191449214
Ian Langmore [Tue, 3 Apr 2018 15:59:08 +0000 (08:59 -0700)]
cholesky_solve_with_broadcast, matrix_solve_with_broadcast and matrix_triangular_solve_with_broadcast added to linear_operator_util.py
PiperOrigin-RevId:
191447378
A. Unique TensorFlower [Tue, 3 Apr 2018 15:54:01 +0000 (08:54 -0700)]
Changes loss_reduction default to SUM_OVER_BATCH_SIZE for regression_head and poisson_regression_head.
PiperOrigin-RevId:
191446787
Benjamin Kramer [Tue, 3 Apr 2018 14:28:40 +0000 (07:28 -0700)]
[TF:XLA] Bump open source llvm revision to r329057
DataTypes.h is no longer a generated header. X86DisassemblerDecoderCommon.h is now part of :support.
PiperOrigin-RevId:
191438031
A. Unique TensorFlower [Tue, 3 Apr 2018 12:52:03 +0000 (05:52 -0700)]
Update LLVM API usage to match upstream change.
PiperOrigin-RevId:
191428965
Gunhan Gulsoy [Tue, 3 Apr 2018 08:01:16 +0000 (01:01 -0700)]
Remove "-lpthread" when building tests on macos.
In most cases it seems to be not used.
PiperOrigin-RevId:
191407383
Gunhan Gulsoy [Tue, 3 Apr 2018 06:44:24 +0000 (23:44 -0700)]
Automated g4 rollback of changelist
191385909
PiperOrigin-RevId:
191401933
Igor Ganichev [Tue, 3 Apr 2018 05:24:14 +0000 (22:24 -0700)]
Clarify OpDef.is_stateful flag definition
PiperOrigin-RevId:
191396824
Max Galkin [Tue, 3 Apr 2018 04:03:06 +0000 (21:03 -0700)]
Re-enable Gather and Slice estimators with output size check.
PiperOrigin-RevId:
191391805
A. Unique TensorFlower [Tue, 3 Apr 2018 04:02:40 +0000 (21:02 -0700)]
BUG_FIX: Allow Uniform pdf to work on float64 inputs.
PiperOrigin-RevId:
191391778
A. Unique TensorFlower [Tue, 3 Apr 2018 03:50:39 +0000 (20:50 -0700)]
Windows: Enable tensorflow/contrib in Bazel build (Second try)
This reverts commit
4e108ef30d7cd7ae5e1c550ec5ae27e79b8c6e39.
PiperOrigin-RevId:
191391075
Benoit Steiner [Tue, 3 Apr 2018 02:32:45 +0000 (19:32 -0700)]
Deleted a special case
PiperOrigin-RevId:
191385909
Anna R [Tue, 3 Apr 2018 02:20:53 +0000 (19:20 -0700)]
Automated g4 rollback of changelist
191037166
PiperOrigin-RevId:
191385075
A. Unique TensorFlower [Tue, 3 Apr 2018 01:33:11 +0000 (18:33 -0700)]
Add int64 to Variant mutable hash table variants.
PiperOrigin-RevId:
191380970
A. Unique TensorFlower [Tue, 3 Apr 2018 01:18:11 +0000 (18:18 -0700)]
[XLA] Redesign: migrate while_test to use XlaBuilder, and implement the ops needed to pass the tests, including: While, Slice, DynamicUpdateSlice, Dot, DotGeneral, ConvertElementType, Rng, and Reduce.
Also, when a module has embedded computaitons, the service side would complain if the instruction names are not unique in the scope of the module. To ensure instruction names are unique in module, use both the computation id and instruction id as suffix.
PiperOrigin-RevId:
191379697
Skye Wanderman-Milne [Tue, 3 Apr 2018 00:50:12 +0000 (17:50 -0700)]
Don't use session context manager when we need session to outlive the context block.
PiperOrigin-RevId:
191376772
Anna R [Tue, 3 Apr 2018 00:31:47 +0000 (17:31 -0700)]
Internal change.
PiperOrigin-RevId:
191374719
Allen Lavoie [Tue, 3 Apr 2018 00:21:41 +0000 (17:21 -0700)]
TFTS: Add a OneShotPredictionHead with no model state in its serving signature.
PiperOrigin-RevId:
191373516
A. Unique TensorFlower [Tue, 3 Apr 2018 00:08:27 +0000 (17:08 -0700)]
[XLA] Redesign: implement ExecuteGraphParallel.
PiperOrigin-RevId:
191371793
A. Unique TensorFlower [Mon, 2 Apr 2018 23:45:16 +0000 (16:45 -0700)]
Add a config option to run Grappler optimizers more than once.
Don't crash in layout optimizer if no cluster is given.
Clean up Cluster::DisableOptimizer() so it actually turns all current optimizers off.
PiperOrigin-RevId:
191368433
Igor Ganichev [Mon, 2 Apr 2018 23:21:37 +0000 (16:21 -0700)]
Clarify ResourceVariable specification
PiperOrigin-RevId:
191365224
Asim Shankar [Mon, 2 Apr 2018 22:55:01 +0000 (15:55 -0700)]
Java: Update to 1.7.0
PiperOrigin-RevId:
191361364
Anna R [Mon, 2 Apr 2018 22:51:21 +0000 (15:51 -0700)]
Automated g4 rollback of changelist
191326767
PiperOrigin-RevId:
191360905
Benoit Steiner [Mon, 2 Apr 2018 22:48:04 +0000 (15:48 -0700)]
Add support for resource variables
PiperOrigin-RevId:
191360477
A. Unique TensorFlower [Mon, 2 Apr 2018 22:46:34 +0000 (15:46 -0700)]
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId:
191360220
A. Unique TensorFlower [Mon, 2 Apr 2018 22:39:35 +0000 (15:39 -0700)]
Add tf.math.polyval that evaluates an element-wise polynomial using Horner's method. This is equivalent to numpy.polyval.
PiperOrigin-RevId:
191359241
A. Unique TensorFlower [Mon, 2 Apr 2018 22:27:24 +0000 (15:27 -0700)]
[XLA] Set trace for the operand of a trace instruction when creating the instruction directly or creating from proto. Also implement XlaBuidler::Trace.
PiperOrigin-RevId:
191357376
A. Unique TensorFlower [Mon, 2 Apr 2018 22:17:59 +0000 (15:17 -0700)]
Update ops-related pbtxt files.
PiperOrigin-RevId:
191356007
Skye Wanderman-Milne [Mon, 2 Apr 2018 22:00:40 +0000 (15:00 -0700)]
Fix assertion error in Graph._create_op_from_tf_operation.
_create_op_from_tf_operation would raise an assertion error if a node
was imported with the same name as an unused name_scope. This isn't
really an error, so this change removes the assert.
Note that with this change, the affected node will have a different
name with the C API enabled, but this seems ok especially considering
this is an edge case.
PiperOrigin-RevId:
191353116
Eugene Brevdo [Mon, 2 Apr 2018 21:48:21 +0000 (14:48 -0700)]
[TF] Copy-on-write for Resource Variant assign op.
PiperOrigin-RevId:
191351293
A. Unique TensorFlower [Mon, 2 Apr 2018 21:46:13 +0000 (14:46 -0700)]
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId:
191350894
Skye Wanderman-Milne [Mon, 2 Apr 2018 21:40:37 +0000 (14:40 -0700)]
ResourceHandleShapeAndType returns bytes, not unicode.
This could cause failures when enabling the C API with python3.
PiperOrigin-RevId:
191350031
Anna R [Mon, 2 Apr 2018 21:19:42 +0000 (14:19 -0700)]
Export "VERSION" as "__version__" as well
PiperOrigin-RevId:
191346647
Patrick Nguyen [Mon, 2 Apr 2018 21:03:53 +0000 (14:03 -0700)]
Export the rest of If, While, and For.
We keep _If and _While. This moves the tests and python generators.
The operators are not part of the public tensorflow API.
PiperOrigin-RevId:
191344237
Benoit Steiner [Mon, 2 Apr 2018 20:53:52 +0000 (13:53 -0700)]
Don't bypass reshape nodes that anchor control dependencies
PiperOrigin-RevId:
191342646
A. Unique TensorFlower [Mon, 2 Apr 2018 20:41:26 +0000 (13:41 -0700)]
Verify that a %send and a %recv on the same channel, don't end up landing on the same device.
Also verify that send/send-done and recv/recv-done are on the same device/module.
PiperOrigin-RevId:
191340724
Akshay Modi [Mon, 2 Apr 2018 20:17:14 +0000 (13:17 -0700)]
Reduce overhead for eager ops
- Call _context_handle in the fastpath. Fall back to slow path if it is not
initialized.
A better fix would be to not initialize handle and devices lazily (and not
have to pay that function call in the slow path either), but that
seems to break all GPU/TPU tests. I'm not as yet really familiar with how
devices are recognized, but I'd be happy to hear any ideas you may have to
fix this.
- context.context() is monkey patched to remove the "is None" check once we
know the context is correctly initialized. Ideally we would be able to remove
this function call as well.
- Maintain is_eager instead of doing the comparison every time. Also, in the
fastpath, inline the check directly instead of paying the function call cost.
- Inline _eager_context.device_name instead of get the device_name property to
not pay the function call cost
gen_array_ops.identity Old: 216706.923837 examples/sec (4.
61452722549)
gen_array_ops.identity New: 290819.129714 examples/sec (3.
43856334686)
PiperOrigin-RevId:
191336857
Asim Shankar [Mon, 2 Apr 2018 19:58:52 +0000 (12:58 -0700)]
eager: Tweak error message.
Motivated by
https://stackoverflow.com/questions/
49616532/a-tensorflow-eager-gpu-error/
49617069
PiperOrigin-RevId:
191334050
A. Unique TensorFlower [Mon, 2 Apr 2018 19:41:59 +0000 (12:41 -0700)]
Rewrite Add/AddN subgraph, minimizing number of required broadcasts.
1) Collect to AddOpsGroup inputs of symbolically defined
shapes, that can be broadcasted to the root shape
2) Rewrite equal shapes with AddN(s)
3) Build Add tree from aggegations of different shapes,
minimizing the cost of broadcast
PiperOrigin-RevId:
191331566
A. Unique TensorFlower [Mon, 2 Apr 2018 19:36:08 +0000 (12:36 -0700)]
Fix a bug in AvgPoolGrad op cost in extracting input x's shape. AvgPoolGrad
takes a shape tensor; hence, a value should be parsed from inputs(0) to extract
correct shape of x.
PiperOrigin-RevId:
191330762
Anna R [Mon, 2 Apr 2018 19:07:16 +0000 (12:07 -0700)]
Switch to the TensorFlow API generation based on ApiDef's and tf_export
decorators.
PiperOrigin-RevId:
191326767
Asim Shankar [Mon, 2 Apr 2018 19:01:32 +0000 (12:01 -0700)]
Fix #18180
tf.size() was not respecting the `out_type` argument when eager execution was
enabled.
PiperOrigin-RevId:
191326039
Allen Lavoie [Mon, 2 Apr 2018 18:53:37 +0000 (11:53 -0700)]
TFTS: Clean up the cold start SignatureDef.
Removes state where it wasn't used.
PiperOrigin-RevId:
191324834
A. Unique TensorFlower [Mon, 2 Apr 2018 18:35:00 +0000 (11:35 -0700)]
[XLA] Redesign: improve error handling:
- For every op creation method, check whether there's any existing error, if so, don't do anything and returns an empty op. To do this efficiently, make the NoteErrorOrReturn method accept a lambda, and check first_error_ before evaluating the lambda.
- Return error instead of TF_CHECK_RET, because the second seems to always print ERROR logs.
PiperOrigin-RevId:
191322082
A. Unique TensorFlower [Mon, 2 Apr 2018 18:17:56 +0000 (11:17 -0700)]
Switched to using TensorFlow's true dilated convolution support now that it is implemented, and removed emulated dilated convolution support.
PiperOrigin-RevId:
191319505
A. Unique TensorFlower [Mon, 2 Apr 2018 18:03:18 +0000 (11:03 -0700)]
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId:
191316903
Alexandre Passos [Mon, 2 Apr 2018 17:51:13 +0000 (10:51 -0700)]
Improves the documentation of control_dependencies.
PiperOrigin-RevId:
191314766
A. Unique TensorFlower [Mon, 2 Apr 2018 17:50:09 +0000 (10:50 -0700)]
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId:
191314576
A. Unique TensorFlower [Mon, 2 Apr 2018 17:27:12 +0000 (10:27 -0700)]
Remove reshape of sparse tensor indices in for maybe_batch.
PiperOrigin-RevId:
191310753
A. Unique TensorFlower [Mon, 2 Apr 2018 17:14:35 +0000 (10:14 -0700)]
Additional arg scope test that demonstrate how nested arg_scope objects behave.
PiperOrigin-RevId:
191308666
Sergio Guadarrama [Mon, 2 Apr 2018 16:49:35 +0000 (09:49 -0700)]
Automated g4 rollback of changelist
191127281
PiperOrigin-RevId:
191305220
Jacques Pienaar [Mon, 2 Apr 2018 16:29:33 +0000 (09:29 -0700)]
Only test types supported and change log_eps for bfloat16.
PiperOrigin-RevId:
191302894
A. Unique TensorFlower [Mon, 2 Apr 2018 16:25:33 +0000 (09:25 -0700)]
Add CycleGAN specific summary.
PiperOrigin-RevId:
191302480
Jacques Pienaar [Mon, 2 Apr 2018 15:29:42 +0000 (08:29 -0700)]
Update tests to enable flipping on bfloat16 types.
Skip individual tests that are currently failing with bfloat16.
PiperOrigin-RevId:
191296618
A. Unique TensorFlower [Mon, 2 Apr 2018 15:00:03 +0000 (08:00 -0700)]
Adding support for RandomUniform. Basic support for op import/export of RandomUniform, and constant resolution with static seeds.
PiperOrigin-RevId:
191293897
Skye Wanderman-Milne [Mon, 2 Apr 2018 05:46:11 +0000 (22:46 -0700)]
Make batch_sequences_with_states_test.py work with the C API enabled.
The C API improves static shape inference, making more errors caught
at graph construction time instead of runtime.
PiperOrigin-RevId:
191260634
A. Unique TensorFlower [Sun, 1 Apr 2018 23:01:20 +0000 (16:01 -0700)]
[XLA] Redesign: implement and test concat.
PiperOrigin-RevId:
191244047
A. Unique TensorFlower [Sun, 1 Apr 2018 08:15:35 +0000 (01:15 -0700)]
[XLA] Add a ReduceWindow test to reduce along the lane dimension.
PiperOrigin-RevId:
191214828
Billy Lamberta [Sat, 31 Mar 2018 06:37:48 +0000 (23:37 -0700)]
Fix typo
PiperOrigin-RevId:
191159820
A. Unique TensorFlower [Sat, 31 Mar 2018 05:55:58 +0000 (22:55 -0700)]
Add a unit test to verify that dependency optimizer could remove noop and greaterequal node in a simple graph.
PiperOrigin-RevId:
191157450
Russell Power [Sat, 31 Mar 2018 03:36:03 +0000 (20:36 -0700)]
Log large allocations and total memory usage for the CPU device.
PiperOrigin-RevId:
191152060
Saurabh Saxena [Sat, 31 Mar 2018 00:22:41 +0000 (17:22 -0700)]
Support int64 slice spec for StridedSliceGrad.
Currently this doesn't work since _StridedSliceGrad always passes a int32 shape which restricts indices values to be of the same type.
Add a test that fails before and passes after the change.
PiperOrigin-RevId:
191140718
Neal Wu [Fri, 30 Mar 2018 23:31:31 +0000 (16:31 -0700)]
Simple fixes for documentation on tf.nn.softmax_cross_entropy_with_logits (and v2).
PiperOrigin-RevId:
191134015
A. Unique TensorFlower [Fri, 30 Mar 2018 23:16:13 +0000 (16:16 -0700)]
Implement strip CheckNumerics in DebugStripper.
PiperOrigin-RevId:
191131935
A. Unique TensorFlower [Fri, 30 Mar 2018 22:51:12 +0000 (15:51 -0700)]
Doc string clean-ups for class DistributionStrategy.
PiperOrigin-RevId:
191128500
A. Unique TensorFlower [Fri, 30 Mar 2018 22:41:02 +0000 (15:41 -0700)]
Restore definitions of static members in MklCpuAllocator.
These were removed in #17396 which made the static member variables of
MklCpuAllocator into inline variables, which are a C++17 feature, and not
properly restored in #18006 which reverted the inline declarations, leading to
an ODR violation that is apparently ignored with some compilers.
PiperOrigin-RevId:
191127281
A. Unique TensorFlower [Fri, 30 Mar 2018 22:35:14 +0000 (15:35 -0700)]
[XLA] Add a reduce-window test.
REL_NOTES:n/a
PiperOrigin-RevId:
191126542
A. Unique TensorFlower [Fri, 30 Mar 2018 22:18:48 +0000 (15:18 -0700)]
Add the waiting time and cross-replica-sum time to StepInfoResult.
PiperOrigin-RevId:
191124408
A. Unique TensorFlower [Fri, 30 Mar 2018 22:18:18 +0000 (15:18 -0700)]
Add attr when rewriter adds an XlaHostCompute Op indicating which outside_compilation_subgraph it corresponds to.
PiperOrigin-RevId:
191124345
Dimitris Vardoulakis [Fri, 30 Mar 2018 22:15:31 +0000 (15:15 -0700)]
Improve the precision of Reduce in the interpreter when adding floats, by accumulating in a double.
Also, speed it up by not creating intermediate Literals. The microbenchmark now runs in < 1 ns, as opposed to 30 sec before.
PiperOrigin-RevId:
191123983
Akshay Modi [Fri, 30 Mar 2018 22:00:41 +0000 (15:00 -0700)]
Make tfe.Iterator work with async mode.
PiperOrigin-RevId:
191121622
Skye Wanderman-Milne [Fri, 30 Mar 2018 21:56:08 +0000 (14:56 -0700)]
Raise exception in SWIG on bad TF_Status from C API.
This change provides an alternative mechanism to
tf.raise_exception_on_not_ok_status(), which is inefficient and
error-prone (people often use the status multiple times in the with
block, but it's only checked when the context manager exits). Instead,
it uses SWIG to automatically raise an exception when a C API method
fails. Note that this removes the status argument from affected
methods.
For now, I've only applied this typemap to C API methods. It would be
good to expand this to all uses of raise_exception_on_not_ok_status.
PiperOrigin-RevId:
191121016
A. Unique TensorFlower [Fri, 30 Mar 2018 21:45:21 +0000 (14:45 -0700)]
show breakdown of total execution time with compute and memory time
PiperOrigin-RevId:
191119550
A. Unique TensorFlower [Fri, 30 Mar 2018 21:17:49 +0000 (14:17 -0700)]
tf.maximum: Correctly calculate output shape when broadcast is necessary.
PiperOrigin-RevId:
191115726
Akshay Modi [Fri, 30 Mar 2018 21:00:02 +0000 (14:00 -0700)]
Remove unused imports
PiperOrigin-RevId:
191112880
A. Unique TensorFlower [Fri, 30 Mar 2018 19:26:21 +0000 (12:26 -0700)]
Disable tsan for tensorflow/python/estimator:replicate_model_fn_test
It gets flaky failures.
PiperOrigin-RevId:
191100692
A. Unique TensorFlower [Fri, 30 Mar 2018 18:43:05 +0000 (11:43 -0700)]
Enable writing of summaries in ExamplesPerSecondHook
PiperOrigin-RevId:
191094585
A. Unique TensorFlower [Fri, 30 Mar 2018 18:32:58 +0000 (11:32 -0700)]
Break FileSystem's dependency on ThreadPool.
PiperOrigin-RevId:
191092932
Shashi Shekhar [Fri, 30 Mar 2018 18:21:31 +0000 (11:21 -0700)]
Internal change.
PiperOrigin-RevId:
191090993
A. Unique TensorFlower [Fri, 30 Mar 2018 18:12:24 +0000 (11:12 -0700)]
Rename distributed_apply to _distributed_apply in OptimizerV2 to match
the Optimizer base class.
PiperOrigin-RevId:
191089407
Sourabh Bajaj [Fri, 30 Mar 2018 17:50:18 +0000 (10:50 -0700)]
Create a wrapper for bfloat16 scope so that users don't need the custom getter.
PiperOrigin-RevId:
191085552
A. Unique TensorFlower [Fri, 30 Mar 2018 17:47:58 +0000 (10:47 -0700)]
Check for errors returned by ExecuteOnStream before calling
BlockHostUntilDone. If ExecuteOnStream fails, BlockHostUntilDone will
also fail in a way that makes debugging much harder.
RELNOTES: n/a
PiperOrigin-RevId:
191085159
A. Unique TensorFlower [Fri, 30 Mar 2018 17:15:11 +0000 (10:15 -0700)]
[XLA] Add IsConstant to the local Python client.
PiperOrigin-RevId:
191080094
A. Unique TensorFlower [Fri, 30 Mar 2018 16:56:29 +0000 (09:56 -0700)]
Fix several data races by acquiring locks.
(The racy accesses were detected by the thread safety annotations.)
PiperOrigin-RevId:
191077376
Mark Daoust [Fri, 30 Mar 2018 16:41:29 +0000 (09:41 -0700)]
Fix the index to match the left nav.
PiperOrigin-RevId:
191075496
A. Unique TensorFlower [Fri, 30 Mar 2018 15:23:30 +0000 (08:23 -0700)]
Fix a crash in Quantize() when tf.contrib.framework.get_name_scope() == None.
PiperOrigin-RevId:
191068059
A. Unique TensorFlower [Fri, 30 Mar 2018 15:12:16 +0000 (08:12 -0700)]
Update test for DebugStripper to construct graph in scope.
PiperOrigin-RevId:
191067139
A. Unique TensorFlower [Fri, 30 Mar 2018 14:24:14 +0000 (07:24 -0700)]
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents.
This will allow the deprecated methods to be removed.
PiperOrigin-RevId:
191063815
A. Unique TensorFlower [Fri, 30 Mar 2018 09:41:35 +0000 (02:41 -0700)]
Before this change, a Tensor contained a device pointer and a TensorInfoManager datastructure contained a mapping from device pointer to XlaTensorInfo object. This TensorInfoManager needed to be an Allocator too, so it could be informed when a Tensor is released.
After this change, a Tensor on an XlaDevice contains an XlaTensor object. The XlaTensor object is the equivalent of the old XlaTensorInfo object.
This has advantages and drawbacks:
+ We don't need yet another allocator wrapper, as there is no side-band data to manage.
+ No hashtable lookups are required.
- As XlaLocalLaunchOp could either be on an XlaDevice or a TF-classic device, we need some way to distinguish whether a Tensor is a TF-classic tensor (holds a device pointer) or an XlaTensor (we use a tagged pointer).
As part of this, allocate ShapedBuffers using the XLA backend's allocator directly instead of a roundabout route where we:
Wrapped the XLA allocator in an XlaDeviceAllocator
Then wrapped the XlaDeviceAllocator in an XlaAllocator
This leaves less to go wrong. Ideally we'd actually use StreamExecutor's allocator here, but this is less useful than XLA's as it doesn't provide helpful OOM messages (just returns nullptr).
PiperOrigin-RevId:
191048184
Anna R [Fri, 30 Mar 2018 06:35:30 +0000 (23:35 -0700)]
Internal change.
PiperOrigin-RevId:
191037166