aboutsummaryrefslogtreecommitdiff
path: root/chapters/ewise_binary.adoc
AgeCommit message (Collapse)Author
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-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-04-29Fix round argument category for ARITHMETIC_RIGHT_SHIFTKevin Petit
It should be an attribute. Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I2c9c73605486a44297dad105dbdb94abfb5903fb
2021-11-24MUL: Correct code for the case of value2<0Dominic Symes
The previous call to apply_scale() was not valid for value2<0. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I3fbf38eaad964efdb0c4920da1a61aee67c9bba9
2021-11-12Use in_out_t when a type is used for input and outputEric Kunze
Also change acc_t to out_t when the value is being used as an output. This should make the argument tables easier to follow. Change-Id: I2a57f3c4eaf937f29da785ff5c11576663a39494
2021-11-12Insert missing close bracket in ADD pseudocodeEric Kunze
Change-Id: Ifec04d98b81b351efe110d5a07259f69df4f3014
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-27Change TABLE operator table to be an attribute for BI/MIEric Kunze
Use cases for BI/MI profiles show that the table argument for the TABLE operator will be known at compile time. Make it an attribute in that case. If a dynamic table is needed, the GATHER op is available. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Icb54eaa443ed7896d5010c7a30af88b02c8a83ad
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-08-23Fix pooling argument tablesEric Kunze
Make the input tensor shape dimensions correct for the pseudocode. Clarify the count used for average pooling only includes valid elements. Remove stale reference to PLACEHOLDER nodes. Change-Id: Ia0b9f0aa404008c6a36671da12188cb0999712d4 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-05-26Rename and clarify the divide operator.Dominic Symes
Name changed from DIV to INTDIV. Usage clarified. Change-Id: I493b8ace7a63e4c80caac1674c767c1ad468dd83 Signed-off-by: Dominic Symes <dominic.symes@arm.com>
2021-03-18Add integer DIV operatorEric Kunze
Integer divide is not commonly used, but would have been difficult to implement using the existing operators. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I8fb3919cd7a0f1a1fa95074d921d200d23e2f249
2021-03-16Add 8-bit support to TABLEEric Kunze
It is challenging to work back from the RESCALE->TABLE->RESCALE for a simple 8-bit lookup. This adds support to TOSA for a simple direct 256 entry 8-bit lookup table for the TABLE operator. The 16-bit interpolated table is still required for a conformant implementation. Change-Id: I0ef218444f0b57b880aa8d1c7e96efedae72eb53 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
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>
2021-01-25Remove aint8 typeEric Kunze
The aint8 type represented an asymmetrically quantized range. With the change to move scaling fully into the RESCALE operator, the aint8 and int8 types didn't have significant differences in their use with operators. Unifying to a single data type makes things simpler. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I3ee89cbdafdc61293ef1f1bec52398d744e716a1
2020-11-06Operator argument consistency improvement.Eric Kunze
Add values attribute to CONST operator. Remove stale references to input tensor 0 and 1. Remove out_t types where in and out are guaranteed to be the same type. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I75a8eb4dee67afbee3652d9e937aa0b82318dbd0
2020-11-03Change weights to input for training profileEric Kunze
Weights remain as an attribute for inference profile devices. Change-Id: I1cdbbd2ccd95fc1b7afc0f05a1425fb53560b432 Signed-off-by: Eric Kunze <eric.kunze@arm.com>
2020-10-29TABLE: Usage clarificationsDominic Symes
Clarify how the TABLE operator can be used in pratice to generate int8 to int8 and int16 to int16 lookup operations. Change-Id: I97154bb8cea46ab1fe48bf1cda615ff164130645 Signed-off-by: Dominic Symes <dominic.symes@arm.com>
2020-10-28MUL: Add right shift on 32x32 multiplyDominic Symes
The result of 32x32 elementwise multiply exceeds the int32_t result type range. This change adds a right scaling shift argument to shift down the result. Change-Id: I6ae17e6dc3fe342d052304533158ad2d0e7bb7be Signed-off-by: Dominic Symes <dominic.symes@arm.com>
2020-10-27ARITHMETIC_RIGHT_SHIFT: Add roundingDominic Symes
Add rounding mode to shift right and clarify that shift values cannot be negative. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I7995c8dfa6f16f9ca4dcbf5241692fcd940e509b
2020-10-22Make rank() consistent across filesDominic Symes
Complete the function naming change from dimensions() to rank(). Fix MATMUL to use apply_add() for additions, consistent with the other operations. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I6ba84cf8b016505e8477b04dd00f2a2bf3194492
2020-10-01TOSA spec 0.20.0, initial public versionv0.20.0Eric Kunze
Change-Id: I7c528ebf7e78759ada4bb951b2471c367d3f4525