Age | Commit message (Collapse) | Author |
|
Miscellaneous cleanup and clarifications across the specification.
No functional changes intended in this commit.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Iaa89e2f7828ae55abe3fbb19afafb6161a8a43fc
|
|
For maximum and minimum operations either sign of
zero is permitted.
Change-Id: If5ed01259a8c550f44599b2414f324a4a802e662
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Signed-off-by: Thomas Preud'homme <thomas.preudhomme@arm.com>
Change-Id: Ia26ffc9eae21bccdd1b48277ab494f1bc1b744c3
|
|
Update the status section of the specification as well as
various textual simplifications/clarifications.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Ie77039e537bc66e6d05b14c7e0705b1c1cc4be58
|
|
List maximum varies by Level.
Also cleans up some stray references to tosa_list_t.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I66ba807361948f0b679d0865f967fa2684f8b279
|
|
Defines the versioning policy for TOSA.
Includes definition of what can change between minor versions to retain compatibility.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Iad6073c986acf1696c0880ef9f614ce6f5cf1f16
|
|
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I9678952cc78cdf90272ccd5179b6220c293d62f7
|
|
Implementations should use non-saturating mode and call CLAMP
if saturation is needed.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I7a79931552dd6c3ab5fc247a963e3e7ba1e38ae2
|
|
Level 1.0 was never defined. Update to note that the ranges are
for the levels defined in the specification.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: If38a7d1d96efd41e6708537ea5a1577c4c48a4de
|
|
The Main Training profile does not have any unique operators in the
specification. Remove it as unneeded. New training operators can be
added as extensions to existing profiles.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Ida5f49a1c7f71276508da0484dff5fae2444b9fc
|
|
Large input values to SIN or COS can lead to
proportionately large errors in the angle and
so in the SIN or COS result.
Change-Id: Ibc0d8f4f1db27b8c8855c48a238040442c14ef71
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Accumulator size moves to an enumerated attribute, out_t for floating-point changes
to be the size of the input. Bias for floating-point also becomes the bit width
of the input type.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I7369417adbb1106ce34a1978e7f511a30272c318
|
|
Create composable profiles and profile extensions.
Define requirements for a TOSA implementation to fully implement at least one profile.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I02cfb0171b2d227727f530cb29108b479206b25b
|
|
Initial accuracy requirements for RESIZE calculations.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I44f997df857915ca77b04dd0b87dee9ccac6e7b0
|
|
Only defined for floating-point types.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Ieae355076f9aac6882fab8530e6d7d9985a6e661
|
|
Adds support for Open Compute Project (OCP) 8-bit floating point operations
to the TOSA specification. Both E4M3 and E5M2 types are supported for profiles
as indicated in the Supported Data Types table for each operator.
FP8 operator list
ARGMAX
AVGPOOL
CONV2D
CONV3D
DEPTHWISE_CONV2D
MATMUL
MAX_POOL2D
TRANSPOSE_CONV2D
CONST
CAST
CONCAT
PAD
DIM
RESHAPE
REVERSE
SLICE
TILE
TRANSPOSE
GATHER
SCATTER
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I3dd83f48afcc3c880c5c88039337ff4f1fd95b1b
|
|
Update POW error bound to allow for the
error of a LOG, MUL, EXP sequence.
Change-Id: I250635130bce2ac72cc39a9c9052d8e868f7cf41
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Rework of the shape operations. Shape operations are now done in shape specific
operators rather than being based on type.
shape_t is reworked to a list of size_t values.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I2fca0728f9caa6a6fc34a8ce9e389bb581eea959
|
|
Be explicit that the value is converted to int32 and then clamped to the
output type range.
Also remove use of apply_clip, replacing with either apply_clip_s or apply_clip_u
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I0efc7f4d653c1bef13c9989cfe2647208dad9617
|
|
- Some operators were using True and False.
- Document the use of true and false in the definition of
the boolean number format.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Ic4c16c8527d46ca01d22e3c70c5371821a726df8
|
|
TANH can have cancellation between exp(x) and exp(-x)
for small abs(x). To allow for this, a lower bound of
0.5*exp(-normal_fraction<in_out_t>) is set for the
error bound. The TANH formula also can contain 4
exp() values, so the error bound is increased to 4
multiplied by the exp() error bound.
SCATTER output size K must be as least as great
as the number of indices W, as each index is distinct.
Change-Id: I8d1f1c866bd59d8140cf7db76404f5006a04a3f3
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
i48_t is 48-bit, not 32-bit.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Icd602931ffb5d74842359fae2a8885e96b85bf59
|
|
Update the REDUCE_PRODUCT conformance description
to be consistent with EXP, POW, TANH, SIGMOID.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I083c41ce09e70b51d07cfea30a4bbc4dff4a8657
|
|
Cannot raise a negative base to a non-integral power.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I851006abc30bccb612b2a41e27f5c259bb221e41
|
|
Change SIGMOID, TANH precision to allow an
implementation using EXP. The bound is based
on the EXP bound.
Change-Id: I19582b31753ac614a1064a1b81961dbc54acf823
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Change RSQRT precision to 2 ulp to allow
unfused square root and reciprocal.
Also fixes:
- a typo in EXP and POW conformance
- exp2() handling of large negative values
- symmetry about 0 of test set S=4 data generation
- err_bnd cannot be negative
- ulp not taken for reference value of 0
Change-Id: Idaeeb7b615f1634e8e09dea5f82827039780b462
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
EXP and POW are complex to implement in a precise number of ulp
and a more flexible precision is given.
Additionally, the test generater S=5 has the bias values
changed to zero. If the bias values are non-zero then a
bias for all output tensor elements of the channel can affect
the dot product bias test.
The numeric accuracy helpers are updated for bf16.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: Ia46a2ef4d577244b6983a08ce850de3db9573a42
|
|
Clarify how to compare with an error range of a given
number of ulp in this specification. Denormals may be
flushed to zero.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I1158e777030c4770d74f1acff84ab98e4a3420ac
|
|
REDUCE_MIN, REDUCE_MAX, SELECT did not have an accuracy bound defined.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I0fea091752dfcdc2bb55eae7becc68b9c1860e9e
|
|
Also express the fp32_t acc_min_normal calculation
without a double negation.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I34ba274264bc511e60f0e01601d5d0a3f983e594
|
|
Update the error bound for dot product operations to
allow floating point accumulators where denormal
values are flushed to zero.
Change-Id: I1d5805f0ad613ca9d78c6a6da12e31d7df5f6cc4
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Integer inputs and outputs to TOSA operators are now defined as signless
values. In most instances the operator will used signed arithmetic as
indicated in previous versions of the specification resulting in little
functional change to the specification.
New attributes have been added to the RESCALE operator to indicate
whether the input and output values should be treated as signed or unsigned.
Explicit use of static_cast, sign_extend, zero_extend and truncate are added
to the pseudocode to avoid ambiguity.
Change-Id: I71c67d3e5aeaabc418c768f821fce6ee3eebb65b
|
|
Adds a local_bound flag to convolution operations.
If the local_bound flag is true then the output accuracy
for floating-point is measured relative to the
input tensor data local to the particular convolution output.
If the local_bound flag is false then the output accuracy
for floating-point is measured relative to the whole input tensor.
This accuracy measure is the default and more approapriate for
implementations with non local optimizations (such as
transform based fast convolutions).
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I64e3e4981a63e26e6391149e28d5d71e7ef5560a
|
|
Shape inference derives the shape of tensors in
the graph from input shapes. Operations such as RESHAPE
may need calculations to derive the new tensor shape.
This patch:
- Adds a DIM operator to get the size of a tensor in
a given axis as a rank 0 tensor of type shape_t
- Allows RESHAPE to take a 1D shape tensor as input for
the new shape
- Allows RESIZE, TILE, PAD to take input sizes based
on shape tensors.
- Allows ADD, SUB, MUL, INTDIV to operate on rank 0
shape_t tensors
- Allows CONCAT to concatenate 0D shape_t tensors to
a 1D shape_t tensor
- Adds CONST support for shape_t tensors
In this version of the specification shape tensors must
be resolvable to constants at backend compile time.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I484bd44452453b5e05d0d8a82689564587b224e4
|
|
Nesting of if/while is bounded by MAX_NESTING,
set accoring to the TOSA level.
Change-Id: If9435a143ffa6bd7ba2e46a68542459b3d723b76
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Defined for floating-point types only.
For integer versions, a TABLE should be used.
Change-Id: Ieaec6e6eb3227c5dcd9741cddd57426002a8db4d
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
- Standardise the terminology for operator arguments. Argument,
Operand, and Parameter were used interchangeably.
- Introduce a templatized tensor_t<> type for tensor arguments.
Scalars are represented by rank-0 tensors.
- Types can be checked with the XSD schema.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Ic57b9387950824e994c5e7f9ec1489c29159b974
|
|
Provide the mathematical formulas for sigmoid and tanh.
Define the operation function for sigmoid and tanh for
floating-point numbers.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Ib949d2e8e06309e5c5292aa0192746ad0f9b1f11
|
|
Add REQUIRE statements to constrain the range where needed.
Also fix a typo.
Change-Id: I281e6249d8951b4cb3ff19eaf199660bed3feac9
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
|
|
- Add additional main inference compliance test
data sets for dot product testing in Appendix A.
- Express dot product test criteria in terms of
tensors rather than individual dot products.
- Add per-operation details on test set generation
in Appendix A.
- Clarify compliance vs conformance wording.
- Clarify that the comment in the table of section 1.8.2
on integer saturation applies to the CAST from
floating point to integer operation.
Change-Id: I1b4c4493b02ed7c8a6eb547656c91ca67d4b0e86
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
The tensor size in bytes must fit within the level
defined size range.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I131e3aa7e8666b4d0093ae8198367f243081da51
|
|
Also make LEVEL_CHECKs unconditional in pseudocode. The various
MAX_* maximums are always defined.
Change-Id: Iee5d8ade5cba3b4f86cc09f8b867b59fe18f5cfe
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
|
|
Also replace all instances of "co-ordinate" with "coordinate" for
consistency.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Idff73092711d3ff85bf4db33df92924c754cf451
|
|
Add a check on the error bias for dot
product calculations and slightly increase the
error variance bound for dot products.
Change-Id: I518704d1fb1b109695b0f90f7ca6733850e6a8c7
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
This patch contains a draft of the
Main Inference profile floating-point
conformance requirements.
Change-Id: Ib1201fff7f4015668b2de6dccf4cd85b419c3f76
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Add definition of Level 1.0.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I1b34ae22396f273cc5ecdf99198fdbece6e2809c
|
|
Tensor co-ordinate indices are signed 32-bit values
in this version of the specification.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I6b8dde500ef9c4c4c5688c1a43f8d658863e4a49
|
|
The current value is too strict, and can lead to some cases to fail.
By making the new value limit between (-1 << shift-1) and (1 << shift-1),
we still restrict the input value a range that works for optimized implementations
that left shift their values before multiplying.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Ib4f49732e361418884888d398087560da3ccd6e8
|
|
Define operations in terms of common floating-point data
types. Definitions for the data types are in the introduction.
Added a section to describe status of the different profiles.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: Iac57026806acfb7913f40af61176322fb02b7cc1
|
|
The information on quantization and numerics was out of date.
The tensor access helpers were also consolidated and moved into
their own section in the pseudocode chapter.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I472e674ed88f4a3ef379010cf50b13cf8afa5f17
|