| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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: 200275406
|
|
|
|
|
|
|
| |
These are type aliases of one another; we'd like to be consistent and
use the shorter one.
PiperOrigin-RevId: 196322955
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I didn't remove the enum itself, but after this change removing the enum should
be a simple NFC change (famous last words!).
This will make it easier to implement BatchDot on CPU.
The change removes usages of kTransposeDot by:
- Teaching TransposeFolding to "fuse" transposes into dots by flipping the
lhs_contracting_dims/rhs_contracting_dims fields.
- Replacing the notion of transpose_lhs/transpose_rhs in the IR emitters with
"has a non-canonical LHS contraction dimension"/"has a non-canonical RHS
contraction dimension" where the canonical LHS and RHS contraction dims [0]
are 1 and 0.
Some tests were getting away with creating Dot instructions with their
dimensions numbers unset. I've fixed these to create canonical dot operations
instead.
It is possible (but hard to tell without trying) that some of the IR emission
logic and Eigen runtime calls can now be simplified further. For instance,
instead of passing in a `transpose_lhs` and `transpose_rhs` to the Eigen GEMM
routines, we could instead pass in the LHS and RHS contraction dimensions
directly.
[0] See HloInstruction::CreateCanonicalDot.
PiperOrigin-RevId: 195514907
|
|
|
|
| |
PiperOrigin-RevId: 193451839
|
|
|
|
| |
PiperOrigin-RevId: 178790193
|
|
|
|
| |
PiperOrigin-RevId: 177260886
|
|
|
|
|
|
| |
This lets us reason about input spatial dimensions as distinct from output spatial dimensions. By doing this, it opens up more opportunities for assigning more interesting, different, layouts for the activations and the output.
PiperOrigin-RevId: 177117140
|
|
|
|
|
|
|
| |
This is now possible now that we have added the required fields to
ConvolutionDimensionNumbers.
PiperOrigin-RevId: 172807540
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like HloComputation::instructions(), HloModule::computations() used to
return a list of unique_ptrs. But this is an implementation detail that
shouldn't be leaked into the public API.
This patch also adds HloModule::MakeNonFusionComputations(), because
many of the callers of computations() went on to filter out all the
fusion computations.
It would be possible to implement MakeNonFusionComputations() "in place"
using a filtering iterator, but I don't think it's necessary -- we never
have *that* many computations, and since many callers go on to copy the
list of non-fusion computations, making it unconditionally a copy is
simpler and avoids a footgun.
PiperOrigin-RevId: 170529051
|
|
|
|
| |
PiperOrigin-RevId: 168922817
|
|
|
|
| |
PiperOrigin-RevId: 163210327
|
|
|
|
|
|
|
| |
We only ran the pass on the entry computation which would make us lose out on
optimization opportunities. Visit all computations to find any potential
transpose folding opportunities.
Change: 154343660
|
|
|
|
| |
Change: 152581336
|
|
|
|
|
| |
This will allow inheritance from both `HloPassInterface` and `DfsHloVisitor`, so various passes which include a visitor can have handler methods overridden per backend.
Change: 145477041
|
|
XLA is a compiler-based linear algebra execution engine that targets CPUs, GPUs and custom accelerators.
XLA is still experimental; we are releasing it early to get the community involved.
Change: 143990941
|