Age | Commit message (Collapse) | Author |
|
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>
|
|
For bf16_t data type, REDUCE_SUM is changed to use fp32_t
as the accumulator type to be consistent with CONV2D.
For other data types the accumulator type is the same
as in_out_t (and so no change).
Also correct the rank limit text.
Update reduction pseudo-code to be consistent with
REDUCE_SUM.
Change-Id: I9923066be7d1b7edb0efd9bcf3365b4af9501beb
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>
|
|
- CustomOp's domain attribute name has been updated to domain_name
- Forget to update that for the description text part.
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: Ifa731125dc2f224ecc1cd661e238c7b27945db68
|
|
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
|
|
The output shape can be calculated from the
input shape and attributes so the out_shape
argument is redundant.
Change-Id: I7e6b0b7f03dc75ccdf967261fad4185c513ed187
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
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
|
|
Define idiv_floor to give equivalent behavior to the floating-point
floor function for image coordinate calculation.
Change-Id: Id6268794b1e3ce5cc1114bda74dd06b892457a8e
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
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>
|
|
CUSTOM operators are still implementation specific, but now have
attributes added to identify and namespace the underyling operation.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I8db2fffd0b34958bd8c718633a130941f32f962b
|
|
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
|
|
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: I63a4c1202a1eddcdedb222e64cac34557647ff21
|
|
Bias tensors often have the same value for
each channel. To allow for this the number of
bias channels, BC, is permitted to be 1 or the
output channel size. If BC == 1 then the
bias is broadcast.
Change-Id: I3262a6c699bd045f44201e2a123f9b792b9f67c9
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
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>
|
|
Change-Id: I188694080b74ec81c6dea675430e29db11ee6079
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>
|
|
Correct the kernel size for the DEPTHWISE_CONV2D
test data generator in Appendix A.
Change-Id: I4fea6192bcd8a70d82d12543730cdc684fb839e5
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
|
|
Correct scaling factor for tosa_mi_data()
for S=1 and S=4 data sets.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I3f09f758d82ccd64da8bb26fd219ff4d7a55918c
|
|
- 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
|
|
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I75753adecd50b68e1184ab8aa59fd4c8c3638a1a
|
|
The lines using the flattened pad values were removed,
but the flatten call remained.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I2b33945fa40ba413a657c4daaaf1820dd5b1c3d4
|
|
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>
|
|
Existing logic was impossible to resolve
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I7f38ea57adb7fff9018a6f0fa8dd82453782d59b
|
|
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
|
|
Currently used by RESIZE and AVG_POOL2D
Change-Id: I4f401ac092fcf426e6d57b3729943135f634a31e
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: Idc68dfee54f1855782e57a8855b4e4120e25e74d
|
|
For an operation that performs broadcast the
output shape size must be the maximum of the input shape
sizes in each dimension.
Additionally, the input dimension size must be 1 whenever
an input shape does not match the output shape size
in a dimension.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I89492f4ef22da76f84f12e720c79634ea42545bc
|
|
Most operators use in_out_t. This removes a special case.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Icfc86f1101d250700677959949bda466519152de
|
|
Also update copyright year on license.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I6acf8b11990e436c4e2ceffa9c044a34a577a5ae
|
|
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 commit removes the maximum rank 4 restriction
from REVERSE, SLICE and TILE operations so that the
new maximum is now MAX_RANK.
In doing so some rank inconsistencies were also
cleaned up, including:
* Adding a minimum rank to the PAD op description
* Adding level limit checks to SLICE and TILE ops
* Adding checks for rank(shape1) == rank(shape)
for TILE and TRANSPOSE ops
* Add tensor_size(shape1) == tensor_size(shape)
check for TRANSPOSE
* Replace tensor name with shape name in pesudo
code where necessary
Change-Id: I94bb8ee0b6b720b2ba5a884ce9300dca6281245a
Signed-off-by: Luke Hutton <luke.hutton@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>
|
|
Align with the definition for LOGICAL_RIGHT_SHIFT which was clearer.
Change-Id: I9d8f33b54fb982a09597078eb14a7730c488bcef
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
|
|
The expected output shape of RFFT2d should be (N, H, W/2+1) as
opposed to (N, H/2+1, W/2+1).
Change-Id: I66d830f1ffa86417b57572b3cd904db0290cac42
|
|
cmp_t is only used in the definition of SELECT and always defined to bool_t.
This removes a special case in generators.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I9e7992bbfdf5c7fafdd55df90feb4dcbcdee2972
|
|
Condition tensors used by the control
flow operations must contain a single
element.
Change-Id: Ie3cb8f0b4a4149cee1b3aacbfa720dd4cad02fbc
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
|
|
No such attribute.
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: If1b1ece15589e9bf07971542783f51294a05aab9
|