aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-19Remove draft tag from 0.90 branchv0.90Eric Kunze
Preparation for release. Also update the license copyright year. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I868cd9a33b05a529751d79facf94988b152c4c99
2024-01-31Add section of shape operatorsv0.90.0Eric Kunze
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
2024-01-28Add missing pseudocode for CONST, CUSTOM, ERF, and IDENTITY operatorsKevin Petit
Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: Icb824233e5be84ac0eb693459b65441e9ae6c545
2024-01-25Handle CAST from fp-type to narrow integer typesEric Kunze
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
2024-01-24pseudocode: replace all uses of FP64 and double types with fp64_tKevin Petit
Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: Ieb895e834d1f3b512a666b062b963b08f82c8a24
2024-01-23Fix syntax higlighting of pseudocodeKevin Petit
Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: Ifc17c8ab508a0d27f5f832fa76f7dc9c1ff57dbd
2024-01-23pseudocode: use correct variable to write out data in REDUCE_MINKevin Petit
Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I7cad7d2bc6212e1765fbe3027abfb1fe37111445
2024-01-23pseudocode: fix name mismatches with operator arguments in the XMLKevin Petit
Change either the name in the pseudocode or XML to what feels more "natural" or in line with other related names. Change-Id: Ic12a0418a80642c548c288b6ba26a4603b94fedc Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-01-23pseudocode: replace C-style casts with static_castKevin Petit
Change-Id: Ic362e5cbc607d1b7560c09326fcebcba606454ce Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-01-23pseudocode: use true/false consistently for boolean valuesKevin Petit
- 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
2024-01-19Fix typo in argmax pseudocodeThomas Preud'homme
Axis is a dimension index of the input tensor, but is used to index the output tensor. Signed-off-by: Thomas Preud'homme <thomas.preudhomme@arm.com> Change-Id: Ie50f3921153e01437fe763b5d2b6cfaa06049f25
2024-01-19pseudocode: only use commas to separate ranges in for_each statementsKevin Petit
The semicolons had no semantic meaning. Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I9447ea24c82a32c8bfe07fcc560f34a696e59831
2024-01-16pseudocode: a collection of trivial fixesKevin Petit
- Add missing parenthesis in ARITHMETIC_SHIFT_RIGHT - Add missing semicolons - Remove stray dot in VARIABLE_WRITE Change-Id: I28ab7c80c735995437588fffeffb1f12d112f3ec Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-01-15Move operator pseudocode to separate filesKevin Petit
This makes it easier to process the pseudocode automatically. Change-Id: I84394192598e589de07d43a7af60b96788e14f86 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-01-15Main Conformance: TANH change, SCATTER clarificationDominic Symes
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>
2024-01-09Fix typo in i48_t descriptionEric Kunze
i48_t is 48-bit, not 32-bit. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Icd602931ffb5d74842359fae2a8885e96b85bf59
2024-01-09Main Conformance: Clarify REDUCE_PRODUCT conformanceDominic Symes
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
2024-01-08Add note to POW accuracyEric Kunze
Cannot raise a negative base to a non-integral power. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I851006abc30bccb612b2a41e27f5c259bb221e41
2023-12-15IDENTITY: Add missing typesDominic Symes
Add i4_t and i48_t to the list of types supported by the IDENTITY operator. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Id0eeb5f665345e6fdb975b98af4926efc6412afc
2023-12-04Main Conformance: Update SIGMOID, TANH precisionDominic Symes
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>
2023-11-28REDUCE_SUM: Specify the accumulator typeDominic Symes
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>
2023-11-22Main Conformance: Update RSQRT precisionDominic Symes
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>
2023-11-03Fix description of CONST outputEric Kunze
Previous description referred to nonexistant input tensor Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I162ab05ed1db7491ed29ddeabd3490e9ff7ee39b
2023-11-02Fix CustomOp description textJerry Ge
- 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
2023-11-01Update CustomOp's attribute namesJerry Ge
- "operator" is a reserved keyword in C++ - Update the attribute names to avoid those conflicts Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: Iecb1edc50eb1a1232e05250b8baa79cfceb8cd61
2023-11-01Main Conformance: Update EXP, POW precisionDominic Symes
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
2023-10-30Add description of bias broadcastEric Kunze
Bias broadcast was introduced earlier, this adds text to the bias argument to call out the broadcast when only a single data element is given for broadcast. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I684afbe642e9b9cfb9f7c7e9b5bb4944019f206a
2023-10-09Main conformance: clarify floating point accuracyDominic Symes
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
2023-09-26Define missing accuracy boundsEric Kunze
REDUCE_MIN, REDUCE_MAX, SELECT did not have an accuracy bound defined. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I0fea091752dfcdc2bb55eae7becc68b9c1860e9e
2023-09-21TRANSPOSE_CONV2D: Remove redundant out_shape argumentDominic Symes
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>
2023-09-13Update version to 0.90 draftEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I323bf261ac4a5219ee881a31e2840356ba32ab9a
2023-09-12Main Conformance: Add local_bound to RFFT2DDominic Symes
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
2023-09-11Add integer divide with floor for coordinate calculationEric Kunze
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>
2023-09-07Main Conformance: Update dot product error boundv0.90a0Dominic Symes
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>
2023-08-18Update Custom operator argumentsEric Kunze
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
2023-08-17Change TOSA specification to signless typesEric Kunze
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
2023-08-16Main conformance: Add local bound flag for convolutionsDominic Symes
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
2023-08-16Add DIM operator and operations on shape_t valuesDominic Symes
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
2023-08-15Increase MAX_SCALE for the 8K levelEric Kunze
We've seen networks with >64 scale ratios that we would expect to run on systems implementing the 8K level. Raise the ratio to 256. Change-Id: I5a72a533b2125fe56ffedc8b8d5c31bb96f60f10 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2023-08-11Add StatefulOps to TOSA specificationJerry Ge
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I63a4c1202a1eddcdedb222e64cac34557647ff21
2023-08-07Allow bias tensors to be broadcastDominic Symes
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>
2023-08-03Use black and flake8 to format python (NFC)Eric Kunze
No functional changes, cleanup only Add missing copyright notices Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I0ddc8738f16aeced28fe7aa2ccc4fb715a84bd18
2023-07-24COND_IF/WHILE_LOOP: Add nesting level limitDominic Symes
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>
2023-07-11Change max rank for reduction operators to MAX_RANKEric Kunze
This aligns them with most of the other operators, with the maximum rank handled defined by the level parameter MAX_RANK. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Iad9dd285121b4252b39e8e4c3d12a762299c9722
2023-07-06AVG_POOL2D conformance: fix kernel size namesDominic Symes
Change-Id: I188694080b74ec81c6dea675430e29db11ee6079 Signed-off-by: Dominic Symes <dominic.symes@arm.com>
2023-06-23Add Int4 to ConstOp supported data typesJerry Ge
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I3b6193f90541087be2de91837fb0c399e49a45b4
2023-06-23FULLY_CONNECTED: Change weights and bias to be inputsDominic Symes
To be consistent with CONV2D, the FULLY_CONNECTED weight and bias arguments should be inputs rather than attributes. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I77bd0ca36f98bccd0c2224060476e3b4ac04b4bf
2023-06-21Align RESCALE zp description with pseudocodeEric Kunze
int8/uint8 zero point within the given range uint16 zero point is either 0 or 32768 other data types zero point must be 0 Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I3aa240dd8fb88a5f77b7ab90d4dbf634fbf4aa0b
2023-06-21Fix ErfOp to match with the rest of activation operatorsJerry Ge
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: Iabe1095e58ddce446d4c1781660bcfe82a596e61
2023-06-21Add ERF activation functionEric Kunze
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>