aboutsummaryrefslogtreecommitdiff
path: root/chapters/image.adoc
AgeCommit message (Collapse)Author
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>
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-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
2022-12-05Add Levels defintionDominic Symes
Add definition of Level 1.0. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I1b34ae22396f273cc5ecdf99198fdbece6e2809c
2022-09-28RESIZE: Clarify floating point typesDominic Symes
Change resize_t to use the same type as in_t and out_t for floating point data. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I3214d92477688b95ba572f22d34aab3fef7d0f82
2022-08-19Machine parsable specificationEric Kunze
This converts portions of the asciidoc specification into an xml document and schema. For the html and pdf outputs, the xml is converted to asciidoc files that are included into the existing specification. The xml allows future automated uses of the tosa specification while maintaining rough compatibility with the existing document. No significant functional changes are included in this change. Change-Id: I7f1f95c527638e270c157d58fcdec6a3510daea5 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-07-08RESIZE: define scale as a ratio of integersEric Kunze
Define scaling factor as a ratio of integers so that output dimensions can be derived from input dimensions without rounding. Change-Id: Iddfd9ff549edf2963bf22047e8641a348cadb35f Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2022-06-17Revert RESIZE behvior to the 0.23 versionEric Kunze
The current version does not match the reference model or serialization library. Revert to the old behavior until the model is updated and tested that it works correctly. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I237dc3e94e6c31337073524527da75084ba7b578
2022-06-17Initial work on floating-point type definitionEric Kunze
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
2022-06-01RESIZE: Clarify offset and border rangesDominic Symes
Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Ibb60c192ea60b665cec8d91f7de7cc6e3f553fa6
2022-05-04RESIZE: Define scale as a ratio of integersDominic Symes
Define scaling factor as a ratio of integers so that output dimensions can be derived from input dimensions without rounding. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Ie4c1a323dec80379fb0d6db1767777e6c9760a11
2022-05-03Specify width of integer typesDominic Symes
Clarify for types previously definded as int the width assumed by the specification. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Ied62d4803a4323a600d33cff09752a76ca48f18d
2022-04-14Specify output dimension formulae for tensor opsDominic Symes
For each tensor op clarify how the output dimensions of output height (OH) and output width (OW) relate to the input height (IH) and input width (IW). Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Iad36041f54e439c944cacf08afac5567dd2bad3f
2021-11-30RESIZE: Clarify output dimensionsDominic Symes
Clarify how RESIZE output dimensions are related to the input dimensions and add the border attributes to give a relation equation Change-Id: I081464de140634d1a99fd8538112c65af949385e Signed-off-by: Dominic Symes <dominic.symes@arm.com>
2021-10-28Readability fixes for pseudocodeEric Kunze
Avoid use of acc for variables when they are not convolution accumulators. Use argument types appropriately. Add missing pseudocode for some MI operators Change-Id: I9113f9228dbcafb85206bcc39310e9599cb12c08
2021-10-04Move quantization parameters into argument tablesEric Kunze
The TOSA specification doesn't have quantized types. Without those types, it is cleaner to move effects of quantization such as the zero points into the standard list of arguments, rather than existing as a separate table. Change-Id: I18ea2959e9d3e4a3e9a0ead7a8ca319bb4426a47
2021-09-16Clarify range limitations for tensorsEric Kunze
Catch zero and negative sized tensors. Clarify configuration of bool_t in the reference model. int4_t limitations on -8 to stay symmetric around 0. Pad values must be >= 0. Stride,dilation values must be >= 1. Change-Id: Idb6ef740f855912a8340475ba319816f90c9b051 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2021-07-13Add definition of TOSA complianceDominic Symes
Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I2e25d0467843adb078d5ab9fd681af40b2ffa52e
2021-06-24Replace assert with REQUIRE()Eric Kunze
REQUIRE is a direct replacement for the asserts, and uses the unpredictable() function in pseudocode to describe the required conditions for operators Change-Id: I35dc81e083d8e41f16728d992bdb8b06b0271226 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2021-06-17RESIZE: Clarify dimension limitsDominic Symes
X and Y dimensions of image limited to 16-bit for integer data types so that the position * stride calculations do not overflow an int32_t (both position and stride are then 16-bit) Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I24d15b1f2991a18da15493bef478d5ee9c65dba3
2021-05-20Fix typo in RESIZE argumentsDominic Symes
The missing column prevented later rows of arguments being rendered correctly in html Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: Ifa4edd38dc49f2ce6a182ec8cb44f8773a5bfa05
2021-04-14RESIZE: Clarify the valid range of stride values.Dominic Symes
Clarify stride ranges so that the range of valid scales is independent of the shift value. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I56b4dd3b39df19da35fb2c6fe3035e2de42f4860
2021-03-11Make pseudocode block tags consistentEric Kunze
They are all now [source,c++] and use ---- as the delimiter. Also made the pseudocode indentation consistent (4 spaces) in the introduction sections. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I1287a60cfeae8b7e3c63b9fc8885b1ebf3d3386d
2021-03-08Consistency cleanupEric Kunze
Attempt to get consistent across the pseudocode. Change the data types to all be intN_t instead of some cases of intN. Use float_t as the general floating point data type. Be consistent on use of the term "floating-point" Move general pseudocode helpers to their own section. Change-Id: Ie77666cd3ee438c71f39c62b9c424fe687b0bb51 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2020-12-16Disambiguate scale_t in RESIZE commandEric Kunze
scale_t is already defined globally for the rescaling. Move pseudocode for count_leading_zeros to introduction, and use it in the implementation of CLZ. Change-Id: I2453bce93b6dd25e870b8a010fc62af4c001cbf9
2020-11-10Update RESIZE descriptionEric Kunze
Try to make the different modes clearer, especially the integer BILINEAR mode. Change-Id: I6a2ab6ee4ed9e6a76d13bec4498e213a7f20b91f Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2020-10-28RESIZE: Add float typeDominic Symes
Add floating point as an allowed data type for RESIZE. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I01766edabe922d395175356387ea325bfc301fd3
2020-10-12Fix errors in RESIZEDominic Symes
Fix typing errors in the resize operation and simplify the assert checking. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: If12b9e54a6e9f84f0d6122be7d4a4b567fd81e0f
2020-10-01TOSA spec 0.20.0, initial public versionv0.20.0Eric Kunze
Change-Id: I7c528ebf7e78759ada4bb951b2471c367d3f4525