| Commit message (Collapse) | Author | Age |
|
|
|
| |
PiperOrigin-RevId: 210018843
|
|
|
|
|
|
|
| |
Unfortunately this has to be one big patch, because e.g. absl::StrCat
doesn't accept a TF StringPiece, but as soon as we switch to
absl::string_view, we have to switch away from all of the TF functions.
PiperOrigin-RevId: 209957896
|
|
|
|
|
|
|
|
| |
- Remove unused field 'cross_replica_sum_barrier' for Alltoall.
- Update cost analysis. There's no computation in Alltoall.
- Cleanup stale TODOs.
PiperOrigin-RevId: 209814190
|
|
|
|
|
|
|
|
| |
That is, instances of sp.ToString() are replaced with string(sp).
This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view.
PiperOrigin-RevId: 209806694
|
|
|
|
| |
PiperOrigin-RevId: 209780185
|
|
|
|
|
|
|
|
|
|
| |
This adds a field to the proto so that we may serialize it.
On TPUs, we can simulate higher precision by splitting a float32 number into several bfloat16 numbers such that their sum closely approximates the original number.
A tensor contraction operation like convolution or a dot product can be computed by forming several partial products which approximate the correct answer to a closer margin.
PiperOrigin-RevId: 209720948
|
|
|
|
| |
PiperOrigin-RevId: 209693676
|
|
|
|
| |
PiperOrigin-RevId: 209689851
|
|
|
|
| |
PiperOrigin-RevId: 209686671
|
|
|
|
| |
PiperOrigin-RevId: 209679086
|
|
|
|
|
|
| |
Now for host compute, we just emit SendToHost & RecvFromHost pairs, and use token to ensure dependency.
PiperOrigin-RevId: 209671416
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
209663919 by yifeif<yifeif@google.com>:
Internal change.
--
209663914 by amitpatankar<amitpatankar@google.com>:
Fix the topk_op_test for numpy>1.15.
--
209660476 by jdduke<jdduke@google.com>:
Fix model lifetime for TensorFlow Lite C# bindings
Ensure the model's existence for the duration of the interpreter,
as per API requirements.
--
209655960 by scottzhu<scottzhu@google.com>:
Unify RNN Cell interface between TF and Keras.
--
209655731 by A. Unique TensorFlower<gardener@tensorflow.org>:
Added tests for PredictionOps and PartitionExamplesOps
--
209655291 by nolivia<nolivia@google.com>:
adding rate class so that we can save global_step/sec using tf.contrib.summary. The function takes the rate in relation to any tensors provided that the numerator and denominator are broadcastable and have dtypes that can be cast to float64
--
209654655 by kramerb<kramerb@google.com>:
[XLA] Switch from tensorflow::gtl::InlinedVector to absl::InlinedVector
This one comes with extra goodies like a move constructor.
--
209653851 by A. Unique TensorFlower<gardener@tensorflow.org>:
Internal build specification change
--
PiperOrigin-RevId: 209663919
|
|
|
|
|
|
| |
Same for WrapUnique.
PiperOrigin-RevId: 209531124
|
|
|
|
| |
PiperOrigin-RevId: 209502513
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the XLA tf.lgamma op doesn't behave the same way as the standard
tf.lgamma with certain real values because the log of a negative number is
taken.
Added regression tests for tf.lgamma operating on a scalar and added cases that
previously resulted in NaNs when using the reflection formula.
PiperOrigin-RevId: 209443312
|
|
|
|
| |
PiperOrigin-RevId: 209248552
|
|
|
|
| |
PiperOrigin-RevId: 209247783
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL renames the various inputs to the Gather HLO to be more mnemonic by
making it more obviously a batch dynamic-slice. The replacements I made are:
s/elided_window_dims/collapsed_slice_dims/g
s/window_bounds/slice_sizes/g
s/gather_dims_to_operand_dims/start_index_map/g
s/gather_indices/start_indices/g
s/output_window_dims/offset_dims/g
PiperOrigin-RevId: 209051067
|
|
|
|
|
|
|
| |
This is a first step towards supporting grouped convolutions, which are a
generalization of depthwise convolution.
PiperOrigin-RevId: 208950311
|
|
|
|
|
|
| |
For expediency in rolling out support for tokens used for ordering side-effecting ops, infeed and outfeed *optionally* took a token operand. This CL removes that option so all infeed and outfeed instructions take a token operand.
PiperOrigin-RevId: 208927968
|
|
|
|
| |
PiperOrigin-RevId: 208004791
|
|
|
|
|
|
| |
(tensor) buffer not owned by XLA/Literal class directly, without having to memcpy the Literal to a (Host)Tensor.
PiperOrigin-RevId: 207972410
|
|
|
|
| |
PiperOrigin-RevId: 207971529
|
|
|
|
|
|
| |
Previously (before this CL), in the XLA builder certain XLA ops could never be the root of a computation. These restricted ops include Send, Outfeed, and several others. The root of the built computation was then the last added op which was not in this restricted set. However, this is undesirable because now Send and Outfeed produce token values and it may be desirable to return these tokens from a computation, something which is impossible now. This CL addresses this problem by allowing any op to be the root of a computation. This means now the root of the computation will be the last operation added before calling Build(). Furthermore, to enable previous functionality and improve expressiveness in general a new XlaComputation::Build method is added which takes an XlaOp which specifies the root.
PiperOrigin-RevId: 207887842
|
|
|
|
| |
PiperOrigin-RevId: 207792582
|
|
|
|
|
|
|
| |
Generalize pooling operations from tf2xla and put them into a library to make
them reusable by any XLA frontend.
PiperOrigin-RevId: 207756300
|
|
|
|
|
|
| |
This is much faster to compile.
PiperOrigin-RevId: 207577415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lambda capture 'builder' is not used
* using decl 'Printf' is unused
* lambda capture 'this' is not used (17 times)
* lambda capture 'buffer_liveness' is not used
* lambda capture 'computation' is not used
* lambda capture 'operand_to_generator' is not used
* lambda capture 'M' is not used
* using decl 'InvalidParameterArgument' is unused
* lambda capture 'sum' is not used
* lambda capture 's' is not used
* lambda capture 'epsilon' is not used
PiperOrigin-RevId: 207542895
|
|
|
|
|
|
| |
This defines the semantics, and adds parser and shape inference support. Since support is not plumbed through the rest of the compiler here, multi-output reduce is still rejected by the HLO verifier, and is not exposed through XlaBuilder.
PiperOrigin-RevId: 207148035
|
|
|
|
| |
PiperOrigin-RevId: 207045468
|
|
|
|
|
|
|
|
|
|
| |
built for is equivalent to the device the it will run on.
Before this patch, if the device to run on was provided via a stream without
setting the device ordinal in the ExecutableRunOptions, we would check the
default device against the device the executable was built for.
PiperOrigin-RevId: 206892902
|
|
|
|
| |
PiperOrigin-RevId: 206673787
|
|
|
|
| |
PiperOrigin-RevId: 206111380
|
|
|
|
| |
PiperOrigin-RevId: 206105815
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a Pool in XLA that maintains a freelist of Streams, to avoid
the overhead of repeatedly allocating new Streams. Streams have a
monotonic state machine; if a stream encounters any error, it will
remain in an error state forever.
The functional change in this CL is to ensure that streams which have
encountered an error are deleted, rather than being put back on the
pool. Without this change, a previously failed stream will be put back
on the pool, only to cause the next usage of the stream to trivially
fail.
I've chosen to replace the generic templatized Pool with a concrete
StreamPool, since this makes the logic more straightforward to reason
about. Also note that the only existing usage of Pool is to hold
streams.
The functional change is in stream_pool.cc; most of everything else is
mechanical updates.
PiperOrigin-RevId: 206100631
|
|
|
|
| |
PiperOrigin-RevId: 206073510
|
|
|
|
|
|
|
|
|
| |
Plan is to move everything in xla/client/xla_client up to xla/client and remove
the directory.
No functional change.
PiperOrigin-RevId: 206055680
|
|
|
|
| |
PiperOrigin-RevId: 205865103
|
|
|
|
|
|
|
|
|
| |
It's very common to do foo.builder()->bar(). Without this precondition,
if foo.builder() is null, the call to bar will segfault at some point
possibly deep in the callstack when we finally dereference `this`. The
precondition lets us avoid this tricky-to-debug problem.
PiperOrigin-RevId: 205456769
|
|
|
|
| |
PiperOrigin-RevId: 205447892
|
|
|
|
|
|
| |
Using Pow to handle squaring or taking the reciprocal is overkill, Pow is not going to be as accurate as the straightforward formulation without relying on optimization in the compiler or the Pow implementation to kick in.
PiperOrigin-RevId: 205247912
|
|
|
|
|
|
|
|
| |
rectangular matrices. Switch the TF DiagPart and MatrixDiagPart operators to use GetMatrixDiagonal.
Extend CreateScalar{And,Or}Computation to support non-PRED types.
PiperOrigin-RevId: 205244201
|
|
|
|
|
|
|
|
| |
Adds a bit on kSend/kReceive instructions and their Done variants indicated whether the operations communicates with the host or another device (the default). Host send/recv operations are single-sided without a complementary recv/send instruction in another module.
Host send/recv operations are exposed in the XLA builder API as SendToHost and RecvFromHost.
PiperOrigin-RevId: 205008138
|
|
|
|
|
|
| |
into xla/client/lib/math.{cc,h}.
PiperOrigin-RevId: 205003168
|
|
|
|
|
|
|
|
|
|
| |
Compute the Lgamma function using Lanczos' approximation from "A Precision Approximation of the Gamma Function". SIAM Journal on Numerical Analysis series B. Vol. 1:
digamma(z + 1) = log(t(z)) + A'(z) / A(z) - kLanczosGamma / t(z)
t(z) = z + kLanczosGamma + 1/2
A(z) = kBaseLanczosCoeff + sigma(k = 1, n, kLanczosCoefficients[i] / (z + k))
A'(z) = sigma(k = 1, n, kLanczosCoefficients[i] / (z + k) / (z + k))
PiperOrigin-RevId: 204834091
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for Real and Imag for real floating point types.
Compute the Lgamma function using Lanczos' approximation from "A Precision Approximation of the Gamma Function". SIAM Journal on Numerical Analysis series B. Vol. 1:
lgamma(z + 1) = (log(2) + log(pi)) / 2 + (z + 1/2) * log(t(z)) - t(z) + A(z)
t(z) = z + kLanczosGamma + 1/2
A(z) = kBaseLanczosCoeff + sigma(k = 1, n, kLanczosCoefficients[i] / (z + k))
PiperOrigin-RevId: 204815805
|
|
|
|
| |
PiperOrigin-RevId: 204804841
|
|
|
|
| |
PiperOrigin-RevId: 204670087
|
|
|
|
| |
PiperOrigin-RevId: 204557470
|
|
|
|
| |
PiperOrigin-RevId: 204044417
|