aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2023-09-07 11:10:59 +0100
committerDominic Symes <dominic.symes@arm.com>2023-09-12 13:37:31 +0000
commit8bf6e713d5e9985886df581b2b00c57752d18022 (patch)
tree7435429e03c47b70efcc940854a7dd07dc5b15e1
parentfe2ac6d7b9cbc7de4befa128a1ac514712030e74 (diff)
downloadspecification-8bf6e713d5e9985886df581b2b00c57752d18022.tar.gz
Main Conformance: Add local_bound to RFFT2D
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
-rw-r--r--chapters/introduction.adoc4
-rw-r--r--tosa.xml8
2 files changed, 10 insertions, 2 deletions
diff --git a/chapters/introduction.adoc b/chapters/introduction.adoc
index d415e24..c8cfc30 100644
--- a/chapters/introduction.adoc
+++ b/chapters/introduction.adoc
@@ -336,10 +336,10 @@ fp64_t out_err_sum = 0.0;
fp64_t out_err_sumsq = 0.0;
fp64_t acc_prec; // 1<<(M+1) where M is the number of mantissa bits
fp64_t acc_min_normal; // accumulator minimum normal greater than zero
-fp64_t two_m63 = -1.0/(fp64)((int64_t)-1<<63); // pow(2, -63)
+fp64_t two_m42 = 1.0/static_cast<fp64_t>((int64_t)1<<42); // pow(2, -42)
switch (acc_t) {
case fp32_t: acc_prec = static_cast<fp64_t>(1<<24); // pow(2, 24)
- acc_min_normal = two_m63 * two_m63; // pow(2, -126)
+ acc_min_normal = two_m42 * two_m42 * two_m42; // pow(2, -126)
break;
case fp16_t: acc_prec = static_cast<fp64_t>(1<<11); // pow(2, 11)
acc_min_normal = 1.0/static_cast<fp64_t>(1<<14); // pow(2, -14)
diff --git a/tosa.xml b/tosa.xml
index 8cf9fce..cf9b3c3 100644
--- a/tosa.xml
+++ b/tosa.xml
@@ -568,6 +568,14 @@
<description>Real part of the complex output</description>
<rank min="3" max="3"/>
</argument>
+ <argument category="attribute" name="local_bound" type="tensor_t" shape="-" tensor-element-type="bool_t" optional="true">
+ <description>
+ This optional attribute affects the floating-point compliance error bound.
+ The default of false allows for direct and transform based, fast convolution algorithms.
+ Only set to true if direct dot-product calculation precision is required.
+ </description>
+ <rank min="0" max="0"/>
+ </argument>
<argument category="output" name="output_imag" type="tensor_t" shape="[N,H,W/2 + 1]" tensor-element-type="in_out_t">
<description>Imaginary part of the complex output.</description>
<rank min="3" max="3"/>