| Commit message (Collapse) | Author | Age |
|
|
|
| |
PiperOrigin-RevId: 215324035
|
|
|
|
| |
PiperOrigin-RevId: 215294817
|
|
|
|
|
|
| |
depthwise convolution instead of a full convolution now that it exists in XLA.
PiperOrigin-RevId: 213896333
|
|
|
|
|
|
|
|
|
| |
Add a missing check to InferConvolveShape(), the output feature dimension needs to be divisible by feature_group_count.
Also fix some tests which took a const reference to the return value of
a function which doesn't return a reference.
PiperOrigin-RevId: 211592011
|
|
|
|
|
|
|
|
| |
HLO transformations would forget to propagate the feature depth attribute.
Making these attributes mandatory, while slightly less convenient for tests,
makes HLO transformations more robust.
PiperOrigin-RevId: 211490160
|
|
|
|
| |
PiperOrigin-RevId: 210998142
|
|
|
|
|
|
|
|
| |
There are several API migrations happening:
* ArraySlice's sub-slice constructor => .subspan
* MutableArraySlice's container pointer constructor => absl::MakeSpan
PiperOrigin-RevId: 210946124
|
|
|
|
|
|
| |
Also add testcases that negative convolution dilation is rejected.
PiperOrigin-RevId: 210657224
|
|
|
|
| |
PiperOrigin-RevId: 210576458
|
|
|
|
| |
PiperOrigin-RevId: 210565027
|
|
|
|
|
|
|
|
| |
Unlike Printf, StrFormat does not require type-length qualifiers, e.g
%z, %ll. Nor does it require that you call c_str() to print strings.
So these are fixed up here as well.
PiperOrigin-RevId: 210435915
|
|
|
|
|
|
| |
Also move 'using' statements into namespaces.
PiperOrigin-RevId: 210055083
|
|
|
|
| |
PiperOrigin-RevId: 210049592
|
|
|
|
| |
PiperOrigin-RevId: 210018843
|
|
|
|
|
|
|
|
|
| |
kRoundNearestAfz should be treated like kCeil and kFloor.
kClz is only reasonable on integral types, not floating point or predicate
types.
kAbs and kSign are only reasonable on signed types and complex.
PiperOrigin-RevId: 209978375
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 209502513
|
|
|
|
| |
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
|
|
|
|
| |
PiperOrigin-RevId: 207971529
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
match.
PiperOrigin-RevId: 204974328
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Array select and tuple-select already are handled separately in all backends and HLO passes: Array select is an elementwise operation. The shapes of the to operands have the same dimensions. Tuple select does not define its own output, but instead forwards the true- or false- operand based on a scalar predicate operand.
This CL reflects this by adding a new kTupleSelect HLO. The XLA builder interface stays the same and dispatches based on the operand shapes.
No change in the operation semantics. This CL just splits the existing select operation into two opcodes and preserves the existing semantics.
HLO cost analysis is fixed to handle the two ops appropriately.
PiperOrigin-RevId: 203180342
|
|
|
|
|
|
| |
Send and Recv HLOs now have an additional required operand which must be token-shaped. XLA client interface for these operations is unchanged and will be updated in follow up CLs.
PiperOrigin-RevId: 202993121
|
|
|
|
|
|
| |
This is only currently implemented in the evaluator backend, and even that implementation is partial - the key and value type must match.
PiperOrigin-RevId: 202673122
|
|
|
|
|
|
|
|
| |
Long term I think we want to require kAfterAll to take at least one token as operand so it cannot generate a token out of thin air, so kGenerateToken is no longer an appropriate name. Instead, a primordial token would be supplied some how in the entry computation, perhaps as a parameter, and then threaded to any side-effecting ops.
NFC.
PiperOrigin-RevId: 202079040
|
|
|
|
|
|
| |
This avoids lowering xor in terms of other bitwise ops and all backends have instructions for it anyway.
PiperOrigin-RevId: 201597493
|
|
|
|
|
|
| |
capacity when total vectoroid size is known.
PiperOrigin-RevId: 201172723
|
|
|
|
|
|
|
|
|
|
|
|
| |
A TOKEN primitive type was added with cl/199215963 and XLA also has an OPAQUE primitive type. However, in many places in XLA we assume either a tuple or array. This CL fixes many of those instances, but some may remain. Identified instances were discovered by searching for IsTuple or IsArray so the set of fixes is not exhaustive.
Also opportunistically addressed a couple potential points of confusion in the ShapeUtil interface:
(1) Rename ShapeUtil::HasZeroElements to ShapeUtil::IsZeroElementArray. The point of confusion here is that tuples can also have zero elements and HasZeroElements would check fail on tuple shapes. Method no longer check fails if the given shape is not an array.
(2) ShapeUtil::IsNil now returns true only for empty tuples. Previously it also returned true for zero-element array types which was confusing because ShapeUtil::MakeNil creates an empty tuple.
PiperOrigin-RevId: 200452672
|
|
|
|
| |
PiperOrigin-RevId: 199876297
|
|
|
|
|
|
|
|
|
|
| |
The new HLO instruction serves two purposes. (1) It generates a new token value. This is the only way to create tokens. (2) The operation is variadic, taking zero or more token operands. The operation acts as a join of its operands.
I considered initially using a kConstant constant as a method to create new tokens, but this ran into problems because of expectations in backends regarding constants and their materialization.
This CL enables creation of generate-token instructions, but the new instruction is not supported yet in any backend.
PiperOrigin-RevId: 199836205
|
|
|
|
|
|
|
|
| |
instructions with similar attributes (ie, sharding).
This CL simply adds the infrastructure, but leaves the wire-on to a separate CL.
PiperOrigin-RevId: 198503625
|
|
|
|
|
|
|
| |
These are type aliases of one another; we'd like to be consistent and
use the shorter one.
PiperOrigin-RevId: 196322955
|
|
|
|
|
|
|
| |
A new HLO seems prudent as it allows implementations to use fancy techniques to
compute accurate results for small inputs.
PiperOrigin-RevId: 196078115
|
|
|
|
|
|
|
|
|
|
| |
conversions.
That is, instances of sp.ToString() are replaced with std::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: 195689392
|
|
|
|
|
|
|
| |
* Adds the HLO op and lowering on CPU/GPU/evaluator;
* This does not update the operation semantics;
PiperOrigin-RevId: 193461989
|
|
|
|
| |
PiperOrigin-RevId: 190698245
|
|
|
|
| |
PiperOrigin-RevId: 190561679
|
|
|
|
|
|
|
|
| |
Also,
- Templatized ComputeAndCompareRX and CreateRXParameter so that they accept XlaBuilder and XlaOp.
- Clear data held by an XlaBuilder when Build() is called, otherwise errors will occur when the builder is reused.
PiperOrigin-RevId: 190534245
|
|
|
|
|
|
| |
client-service interface redesign. Implemented ops: Add, Call, Constant, Parameter.
PiperOrigin-RevId: 189061445
|
|
|
|
| |
PiperOrigin-RevId: 188513895
|
|
|
|
| |
PiperOrigin-RevId: 188425637
|
|
|
|
|
|
|
| |
Previously if the lhs was a scalar and the rhs was a tuple of arbitrary
shape it reported them as compatible what is clearly wrong.
PiperOrigin-RevId: 188155575
|
|
|
|
| |
PiperOrigin-RevId: 187662562
|
|
|
|
|
|
|
|
|
| |
This is now exposed as a index_vector_dim dimension number.
Also fixed an off-by-one error in ValidateGatherDimensionNumbers in the
expression computing output_shape_rank.
PiperOrigin-RevId: 187040748
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gather
Pretty much everything other than HLO verification and shape inference will fail
for Gather with Unimplemented.
Note that this CL is intentionally incomplete -- I figured it would be nicer to
get some of the boiler-platey stuff out of the way early. Let me know if you
want me to send in a larger but more complete CL instead.
PiperOrigin-RevId: 186055521
|