aboutsummaryrefslogtreecommitdiff
path: root/pseudocode
AgeCommit message (Collapse)Author
2024-04-18Clarify error bound for non-normal valuesEric Kunze
Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I9678952cc78cdf90272ccd5179b6220c293d62f7
2024-04-18RFFT2D: Correct pseudo-code when size is oneDominic Symes
When width or height are one then H/2 or W/2 are not integral. This case is clarified. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Iae1346f09b9eecc636d37d40071bdfbce923843b
2024-04-17Switch fp8 to use non-saturating mode when convertingEric Kunze
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
2024-04-17Disallow per channel RESCALE if rank < 1Eric Kunze
per channel rescaling doesn't make sense for a rank 0 input. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Icfa58403953c81fb3cae708c984efa7e5b116208
2024-04-15Main Conformance: Correct err_bnd checkDominic Symes
When err_bnd is large enough to allow a different result sign from the reference then a negative ref_min may occur. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I1603ed43499e385eb2d93494237a910947bb11d1
2024-03-13Modify convolution operators to improve bias handlingEric Kunze
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
2024-02-23pseudocode: a few more simple syntax fixesKevin Petit
- Use function call syntax for static_cast and sizeof - Replace undefined in_u_t with in_t - Add missing semicolon Change-Id: If6147ae93b371230cbebdf45a55490bf462a8219 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-02-23pseudocode: a collection of variable declaration fixesKevin Petit
Only cases where types are obvious. - Add missing types - Do not re-declare variables - Fix scope of declaration Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I7d44d9adde606094e0a7910fb438649521ff3ec0
2024-02-23pseudocode: replace calls to non-existent functionsKevin Petit
... with the correct libary functions. Change-Id: I99c252629d27be3977852a422774bc0be94922b3 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-02-15pseudocode: move defintions of apply_clip_{s,u} after the functions they callKevin Petit
They need apply_{max,min}_{s,u}. Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I67cdfcd0eb9d7a25223b2ebb86219a21bbf9f2f6
2024-02-15pseudocode: replace use of nonexistent is_float with is_floating_point in ↵Kevin Petit
AVG_POOL2D Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I5e0237abed504fdf26405a3d814714f22a0cf9b5
2024-02-15pseudocode: use function declaration syntax for library functions that are ↵Kevin Petit
not defined Also: - Add missing semicolon - Fix prototype for is_floating_point to use template syntax Change-Id: I9ec1c687a3854b73ddac78f4db0db8e10f4e10e6 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-02-14Add SIN/COS to elementwise operator setEric Kunze
Only defined for floating-point types. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Ieae355076f9aac6882fab8530e6d7d9985a6e661
2024-02-14Initial FP8 supportEric Kunze
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
2024-02-14RESCALE: Correct sign checksDominic Symes
Moving between TOSA version 0.70 and 0.80, some of the checks between input and output type were omitted. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I8e547f18ec1c36e0e9e3f8db04e58b0f643c781c
2024-02-14FFT, RFFT: Improve reference pseudo-codeDominic Symes
Add types for the angle caclulations. Add conformance appendix section for RFFT2D. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Ic0ab79c0784c6359d2d66290e124dfb670a879cc
2024-02-08pseudocode: use function call syntax to call templated functionsKevin Petit
Change-Id: I24409a38aaf4818a9ab0abc0cad5c7d052e01bd1 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2024-02-06pseudocode: move all helpers to separate filesKevin Petit
Change-Id: I75ea94d42c63e862af8e492da7f47ecd6caa1055 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
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-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>