aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2023-05-10 16:41:13 -0700
committerEric Kunze <eric.kunze@arm.com>2023-06-21 17:03:10 +0000
commit52c89f40440ef5bcb318b3945bdc1463ce703b8b (patch)
treed1bc5197a8a671c4170ed07b857bde78cc5de563
parent9efe1a95658bbb405b06b3a1d9e5ef22b8388ea5 (diff)
downloadspecification-52c89f40440ef5bcb318b3945bdc1463ce703b8b.tar.gz
Add ERF activation function
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>
-rw-r--r--chapters/activation_funcs.adoc26
-rw-r--r--chapters/introduction.adoc2
-rw-r--r--figures/erf.svg145
-rw-r--r--tools/dictionary.dic2
-rw-r--r--tosa.xml27
5 files changed, 201 insertions, 1 deletions
diff --git a/chapters/activation_funcs.adoc b/chapters/activation_funcs.adoc
index 46fa19d..1acaf56 100644
--- a/chapters/activation_funcs.adoc
+++ b/chapters/activation_funcs.adoc
@@ -28,6 +28,32 @@ for_each(index in shape) {
}
----
+==== ERF
+
+// erf(z) = \frac{2}{\sqrt{\pi}} \int_{0}^{z} e^{-t^2} dt
+Error function:
+
+.Calculation for the error function
+image::erf.svg["Error function", align="center"]
+
+For quantized integer data types, the TABLE operator should be used instead with
+the following definition.
+
+The ERF table has 513 entries each of 16-bit precision and covering the input range -4.0 to +4.0 in steps of 1/64.
+
+[source,c++]
+----
+int16_t erf_reference(int16_t x) { // input x range is -256 to + 256 inclusive
+ F64 v = (double)x / (double)64;
+ v = erf(v);
+ return round_to_nearest_int(32768.0 * v);
+}
+
+generate_lookup_table(&erf_table, &erf_reference);
+----
+
+include::{generated}/operators/ERF.adoc[]
+
==== SIGMOID
Applies the sigmoid logistic function to each element of the input tensor.
diff --git a/chapters/introduction.adoc b/chapters/introduction.adoc
index b369070..955f310 100644
--- a/chapters/introduction.adoc
+++ b/chapters/introduction.adoc
@@ -260,7 +260,7 @@ Otherwise:the result must be within 1 ulp of the mathematical result.
Otherwise if the input is a zero the output must be an infinity of the same sign. +
Otherwise the result must be within 1 ulp of the mathematical result.
-| <<SIGMOID>>, <<TANH>>, <<POW>>, <<EXP>>, <<LOG>>
+| <<SIGMOID>>, <<TANH>>, <<POW>>, <<EXP>>, <<LOG>>, <<ERF>>
| If the input to LOG is less than zero then the result must be a NaN. +
If the inputs to POW are both zero then the result must be a NaN. +
If the first input to POW is less than zero and the second input is not an integer then the result must be a NaN. +
diff --git a/figures/erf.svg b/figures/erf.svg
new file mode 100644
index 0000000..bb63a46
--- /dev/null
+++ b/figures/erf.svg
@@ -0,0 +1,145 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="132.246123pt" height="31.600781pt" viewBox="0 0 132.246123 31.600781" version="1.1">
+<defs>
+<g>
+<symbol overflow="visible" id="glyph0-0">
+<path style="stroke:none;" d="M 0.59375 2.125 L 0.59375 -8.46875 L 6.59375 -8.46875 L 6.59375 2.125 Z M 1.265625 1.453125 L 5.9375 1.453125 L 5.9375 -7.78125 L 1.265625 -7.78125 Z M 1.265625 1.453125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-1">
+<path style="stroke:none;" d="M 1.765625 -2.390625 C 1.742188 -2.242188 1.734375 -2.101562 1.734375 -1.96875 C 1.734375 -1.601562 1.800781 -1.300781 1.9375 -1.0625 C 2.164062 -0.625 2.585938 -0.40625 3.203125 -0.40625 C 3.660156 -0.40625 4 -0.472656 4.21875 -0.609375 C 4.613281 -0.859375 4.859375 -1.140625 4.953125 -1.453125 L 5.75 -1.453125 C 5.59375 -0.960938 5.222656 -0.539062 4.640625 -0.1875 C 4.234375 0.0507812 3.628906 0.171875 2.828125 0.171875 C 2.023438 0.171875 1.40625 -0.128906 0.96875 -0.734375 C 0.664062 -1.148438 0.515625 -1.660156 0.515625 -2.265625 C 0.515625 -2.523438 0.539062 -2.804688 0.59375 -3.109375 C 0.789062 -4.097656 1.21875 -4.894531 1.875 -5.5 C 2.53125 -6.101562 3.328125 -6.40625 4.265625 -6.40625 C 5.796875 -6.40625 6.5625 -5.863281 6.5625 -4.78125 C 6.5625 -3.988281 6.160156 -3.394531 5.359375 -3 C 4.546875 -2.613281 3.347656 -2.410156 1.765625 -2.390625 Z M 4.765625 -3.703125 C 5.203125 -3.960938 5.421875 -4.332031 5.421875 -4.8125 C 5.421875 -5.476562 4.976562 -5.8125 4.09375 -5.8125 C 3.570312 -5.8125 3.128906 -5.613281 2.765625 -5.21875 C 2.398438 -4.820312 2.101562 -4.085938 1.875 -3.015625 C 3.132812 -3.066406 4.097656 -3.296875 4.765625 -3.703125 Z M 4.765625 -3.703125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-2">
+<path style="stroke:none;" d="M 6.328125 -6.234375 L 6.03125 -4.6875 L 5.40625 -4.6875 C 5.414062 -4.757812 5.421875 -4.832031 5.421875 -4.90625 C 5.421875 -5.101562 5.375 -5.257812 5.28125 -5.375 C 5.15625 -5.53125 4.945312 -5.609375 4.65625 -5.609375 C 4.125 -5.609375 3.679688 -5.421875 3.328125 -5.046875 C 2.972656 -4.679688 2.726562 -4.15625 2.59375 -3.46875 L 1.921875 0 L 0.84375 0 L 1.9375 -5.609375 L 0.90625 -5.609375 L 1.015625 -6.234375 L 3.125 -6.234375 L 2.921875 -5.125 C 3.210938 -5.550781 3.546875 -5.867188 3.921875 -6.078125 C 4.296875 -6.296875 4.71875 -6.40625 5.1875 -6.40625 C 5.363281 -6.40625 5.546875 -6.390625 5.734375 -6.359375 C 5.921875 -6.328125 6.117188 -6.285156 6.328125 -6.234375 Z M 6.328125 -6.234375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-3">
+<path style="stroke:none;" d="M 5.984375 -7.640625 L 5.40625 -7.640625 C 5.425781 -7.722656 5.4375 -7.800781 5.4375 -7.875 C 5.4375 -8.0625 5.390625 -8.207031 5.296875 -8.3125 C 5.160156 -8.46875 4.9375 -8.546875 4.625 -8.546875 C 4.226562 -8.546875 3.925781 -8.429688 3.71875 -8.203125 C 3.507812 -7.984375 3.347656 -7.59375 3.234375 -7.03125 L 3.078125 -6.234375 L 4.828125 -6.234375 L 4.703125 -5.609375 L 2.953125 -5.609375 L 1.796875 0.390625 C 1.660156 1.085938 1.378906 1.613281 0.953125 1.96875 C 0.523438 2.320312 -0.0390625 2.5 -0.75 2.5 L -0.671875 1.921875 C -0.265625 1.921875 0.0351562 1.8125 0.234375 1.59375 C 0.441406 1.363281 0.601562 0.960938 0.71875 0.390625 L 1.875 -5.609375 L 0.84375 -5.609375 L 0.96875 -6.234375 L 2 -6.234375 L 2.15625 -7.015625 C 2.289062 -7.710938 2.570312 -8.234375 3 -8.578125 C 3.4375 -8.941406 4.003906 -9.125 4.703125 -9.125 C 4.960938 -9.125 5.21875 -9.097656 5.46875 -9.046875 C 5.71875 -9.003906 5.96875 -8.929688 6.21875 -8.828125 Z M 5.984375 -7.640625 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-4">
+<path style="stroke:none;" d="M 0.765625 0 L 0.03125 0 L 2.78125 -2.984375 L 1.40625 -5.609375 L 0.640625 -5.609375 L 0.75 -6.234375 L 2.328125 -6.234375 L 3.625 -3.796875 L 5.859375 -6.234375 L 6.59375 -6.234375 L 3.890625 -3.296875 L 5.328125 -0.625 L 6.140625 -0.625 L 6.015625 0 L 4.390625 0 L 3.0625 -2.484375 Z M 0.765625 0 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-5">
+<path style="stroke:none;" d="M -0.109375 0 L 0 -0.625 L 0.984375 -0.625 L 1.953125 -5.609375 L 0.921875 -5.609375 L 1.03125 -6.234375 L 8.0625 -6.234375 L 7.9375 -5.609375 L 6.921875 -5.609375 L 5.953125 -0.625 L 6.90625 -0.625 L 6.796875 0 L 3.8125 0 L 3.9375 -0.625 L 4.859375 -0.625 L 5.84375 -5.609375 L 3.03125 -5.609375 L 2.0625 -0.625 L 3 -0.625 L 2.875 0 Z M -0.109375 0 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-6">
+<path style="stroke:none;" d="M 7.203125 -9.125 L 5.4375 0 L 4.359375 0 L 4.546875 -0.96875 C 4.253906 -0.582031 3.925781 -0.296875 3.5625 -0.109375 C 3.207031 0.078125 2.785156 0.171875 2.296875 0.171875 C 1.535156 0.171875 0.972656 -0.128906 0.609375 -0.734375 C 0.359375 -1.140625 0.234375 -1.625 0.234375 -2.1875 C 0.234375 -2.476562 0.265625 -2.789062 0.328125 -3.125 C 0.523438 -4.09375 0.921875 -4.878906 1.515625 -5.484375 C 2.117188 -6.097656 2.804688 -6.40625 3.578125 -6.40625 C 4.054688 -6.40625 4.441406 -6.3125 4.734375 -6.125 C 5.023438 -5.9375 5.238281 -5.644531 5.375 -5.25 L 6 -8.5 L 4.984375 -8.5 L 5.109375 -9.125 Z M 4.90625 -2.8125 L 5.015625 -3.421875 C 5.078125 -3.722656 5.109375 -4 5.109375 -4.25 C 5.109375 -4.601562 5.046875 -4.898438 4.921875 -5.140625 C 4.710938 -5.523438 4.332031 -5.71875 3.78125 -5.71875 C 3.226562 -5.71875 2.765625 -5.5 2.390625 -5.0625 C 2.023438 -4.625 1.757812 -3.976562 1.59375 -3.125 C 1.519531 -2.726562 1.484375 -2.375 1.484375 -2.0625 C 1.484375 -1.707031 1.535156 -1.410156 1.640625 -1.171875 C 1.835938 -0.722656 2.210938 -0.5 2.765625 -0.5 C 3.316406 -0.5 3.769531 -0.695312 4.125 -1.09375 C 4.488281 -1.488281 4.75 -2.0625 4.90625 -2.8125 Z M 4.90625 -2.8125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-7">
+<path style="stroke:none;" d="M 1.609375 -5.609375 L 0.65625 -5.609375 L 0.78125 -6.234375 L 1.734375 -6.234375 L 2.109375 -8.15625 L 3.1875 -8.15625 L 2.8125 -6.234375 L 4.84375 -6.234375 L 4.71875 -5.609375 L 2.6875 -5.609375 L 1.921875 -1.640625 C 1.859375 -1.335938 1.828125 -1.097656 1.828125 -0.921875 C 1.828125 -0.796875 1.84375 -0.703125 1.875 -0.640625 C 1.945312 -0.484375 2.117188 -0.40625 2.390625 -0.40625 C 2.671875 -0.40625 2.894531 -0.488281 3.0625 -0.65625 C 3.226562 -0.820312 3.347656 -1.09375 3.421875 -1.46875 L 4.234375 -1.46875 C 4.097656 -0.894531 3.863281 -0.476562 3.53125 -0.21875 C 3.207031 0.0390625 2.757812 0.171875 2.1875 0.171875 C 1.570312 0.171875 1.160156 0.03125 0.953125 -0.25 C 0.828125 -0.414062 0.765625 -0.65625 0.765625 -0.96875 C 0.765625 -1.164062 0.789062 -1.390625 0.84375 -1.640625 Z M 1.609375 -5.609375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph1-0">
+<path style="stroke:none;" d="M 1.328125 0 L 1.328125 -6.25 L 6.671875 -6.25 L 6.671875 0 Z M 6.5 -0.15625 L 6.5 -6.09375 L 1.5 -6.09375 L 1.5 -0.15625 Z M 6.5 -0.15625 "/>
+</symbol>
+<symbol overflow="visible" id="glyph1-1">
+<path style="stroke:none;" d="M 4.171875 11.578125 C 3.296875 10.878906 2.648438 10.003906 2.234375 8.953125 C 1.828125 7.910156 1.625 6.789062 1.625 5.59375 C 1.625 4.394531 1.828125 3.269531 2.234375 2.21875 C 2.648438 1.164062 3.296875 0.300781 4.171875 -0.375 C 4.171875 -0.394531 4.1875 -0.40625 4.21875 -0.40625 L 4.359375 -0.40625 C 4.378906 -0.40625 4.394531 -0.394531 4.40625 -0.375 C 4.425781 -0.351562 4.4375 -0.332031 4.4375 -0.3125 C 4.4375 -0.28125 4.429688 -0.257812 4.421875 -0.25 C 4.035156 0.125 3.707031 0.539062 3.4375 1 C 3.175781 1.457031 2.96875 1.929688 2.8125 2.421875 C 2.664062 2.921875 2.5625 3.4375 2.5 3.96875 C 2.4375 4.507812 2.40625 5.054688 2.40625 5.609375 C 2.40625 8.191406 3.078125 10.132812 4.421875 11.4375 C 4.429688 11.445312 4.4375 11.46875 4.4375 11.5 C 4.4375 11.519531 4.425781 11.539062 4.40625 11.5625 C 4.382812 11.582031 4.367188 11.59375 4.359375 11.59375 L 4.21875 11.59375 C 4.1875 11.59375 4.171875 11.585938 4.171875 11.578125 Z M 4.171875 11.578125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph1-2">
+<path style="stroke:none;" d="M 0.53125 11.59375 C 0.46875 11.59375 0.4375 11.5625 0.4375 11.5 C 0.4375 11.46875 0.441406 11.445312 0.453125 11.4375 C 0.960938 10.9375 1.363281 10.367188 1.65625 9.734375 C 1.957031 9.109375 2.164062 8.445312 2.28125 7.75 C 2.40625 7.050781 2.46875 6.332031 2.46875 5.59375 C 2.46875 3 1.796875 1.050781 0.453125 -0.25 C 0.441406 -0.257812 0.4375 -0.28125 0.4375 -0.3125 C 0.4375 -0.375 0.46875 -0.40625 0.53125 -0.40625 L 0.65625 -0.40625 C 0.675781 -0.40625 0.695312 -0.394531 0.71875 -0.375 C 1.59375 0.300781 2.234375 1.164062 2.640625 2.21875 C 3.046875 3.269531 3.25 4.394531 3.25 5.59375 C 3.25 6.789062 3.046875 7.910156 2.640625 8.953125 C 2.234375 10.003906 1.59375 10.878906 0.71875 11.578125 C 0.695312 11.585938 0.675781 11.59375 0.65625 11.59375 Z M 0.53125 11.59375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph2-0">
+<path style="stroke:none;" d="M 0.59375 2.125 L 0.59375 -8.46875 L 6.59375 -8.46875 L 6.59375 2.125 Z M 1.265625 1.453125 L 5.9375 1.453125 L 5.9375 -7.78125 L 1.265625 -7.78125 Z M 1.265625 1.453125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph2-1">
+<path style="stroke:none;" d="M 1.265625 -5.421875 L 8.78125 -5.421875 L 8.78125 -4.484375 L 1.265625 -4.484375 Z M 1.265625 -3.03125 L 8.78125 -3.03125 L 8.78125 -2.09375 L 1.265625 -2.09375 Z M 1.265625 -3.03125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph2-2">
+<path style="stroke:none;" d="M 1.53125 -6.65625 L 0.875 -6.65625 L 0.875 -8.21875 C 1.289062 -8.445312 1.710938 -8.617188 2.140625 -8.734375 C 2.566406 -8.847656 2.984375 -8.90625 3.390625 -8.90625 C 4.296875 -8.90625 5.007812 -8.679688 5.53125 -8.234375 C 6.0625 -7.796875 6.328125 -7.203125 6.328125 -6.453125 C 6.328125 -5.585938 5.734375 -4.5625 4.546875 -3.375 C 4.453125 -3.28125 4.378906 -3.210938 4.328125 -3.171875 L 2.125 -0.96875 L 5.765625 -0.96875 L 5.765625 -2.046875 L 6.453125 -2.046875 L 6.453125 0 L 0.8125 0 L 0.8125 -0.640625 L 3.46875 -3.28125 C 4.050781 -3.875 4.46875 -4.414062 4.71875 -4.90625 C 4.96875 -5.394531 5.09375 -5.910156 5.09375 -6.453125 C 5.09375 -7.035156 4.9375 -7.492188 4.625 -7.828125 C 4.320312 -8.160156 3.90625 -8.328125 3.375 -8.328125 C 2.8125 -8.328125 2.378906 -8.1875 2.078125 -7.90625 C 1.773438 -7.632812 1.59375 -7.21875 1.53125 -6.65625 Z M 1.53125 -6.65625 "/>
+</symbol>
+<symbol overflow="visible" id="glyph3-0">
+<path style="stroke:none;" d="M 1.5 0 L 1.5 -7.03125 L 7.5 -7.03125 L 7.5 0 Z M 7.3125 -0.1875 L 7.3125 -6.84375 L 1.6875 -6.84375 L 1.6875 -0.1875 Z M 7.3125 -0.1875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph3-1">
+<path style="stroke:none;" d="M 5.09375 13.046875 L 2.375 7.140625 L 1.53125 7.75 L 1.3125 7.546875 L 3.03125 6.296875 L 5.5625 11.828125 L 11.796875 -0.34375 C 11.835938 -0.414062 11.90625 -0.453125 12 -0.453125 C 12.0625 -0.453125 12.113281 -0.425781 12.15625 -0.375 C 12.207031 -0.332031 12.234375 -0.28125 12.234375 -0.21875 C 12.234375 -0.1875 12.234375 -0.160156 12.234375 -0.140625 L 5.53125 12.953125 C 5.5 13.015625 5.4375 13.046875 5.34375 13.046875 Z M 5.09375 13.046875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph4-0">
+<path style="stroke:none;" d="M 1.5 0 L 1.5 -7.5 L 7.5 -7.5 L 7.5 0 Z M 7.3125 -0.1875 L 7.3125 -7.3125 L 1.6875 -7.3125 L 1.6875 -0.1875 Z M 7.3125 -0.1875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph4-1">
+<path style="stroke:none;" d="M 1.265625 26.046875 C 1.472656 26.242188 1.71875 26.34375 2 26.34375 C 2.289062 26.34375 2.554688 26.144531 2.796875 25.75 C 3.035156 25.351562 3.242188 24.859375 3.421875 24.265625 C 3.597656 23.671875 3.726562 23.171875 3.8125 22.765625 C 3.894531 22.367188 4 21.859375 4.125 21.234375 C 4.238281 20.640625 4.347656 20.046875 4.453125 19.453125 C 4.566406 18.859375 4.675781 18.222656 4.78125 17.546875 C 4.894531 16.878906 5.015625 16.203125 5.140625 15.515625 C 5.265625 14.828125 5.40625 14.09375 5.5625 13.3125 C 5.769531 12.289062 5.914062 11.5625 6 11.125 C 6.09375 10.6875 6.234375 10.050781 6.421875 9.21875 C 6.609375 8.382812 6.734375 7.835938 6.796875 7.578125 C 6.859375 7.316406 7.03125 6.597656 7.3125 5.421875 L 7.484375 4.78125 C 7.660156 4.082031 7.796875 3.550781 7.890625 3.1875 C 7.992188 2.832031 8.144531 2.390625 8.34375 1.859375 C 8.550781 1.335938 8.789062 0.894531 9.0625 0.53125 C 9.34375 0.175781 9.648438 0 9.984375 0 C 10.222656 0 10.441406 0.0507812 10.640625 0.15625 C 10.835938 0.257812 11 0.40625 11.125 0.59375 C 11.25 0.78125 11.3125 0.988281 11.3125 1.21875 C 11.3125 1.394531 11.253906 1.539062 11.140625 1.65625 C 11.023438 1.769531 10.882812 1.828125 10.71875 1.828125 C 10.539062 1.828125 10.394531 1.769531 10.28125 1.65625 C 10.164062 1.539062 10.109375 1.394531 10.109375 1.21875 C 10.109375 1.050781 10.164062 0.90625 10.28125 0.78125 C 10.394531 0.664062 10.539062 0.609375 10.71875 0.609375 C 10.507812 0.410156 10.269531 0.3125 10 0.3125 C 9.851562 0.3125 9.6875 0.523438 9.5 0.953125 C 9.320312 1.390625 9.160156 1.898438 9.015625 2.484375 C 8.867188 3.078125 8.753906 3.566406 8.671875 3.953125 C 8.585938 4.347656 8.488281 4.84375 8.375 5.4375 C 8.25 6.101562 8.140625 6.679688 8.046875 7.171875 C 7.960938 7.671875 7.859375 8.285156 7.734375 9.015625 C 7.609375 9.753906 7.484375 10.453125 7.359375 11.109375 C 7.242188 11.765625 7.101562 12.507812 6.9375 13.34375 C 6.832031 13.863281 6.679688 14.597656 6.484375 15.546875 C 6.285156 16.492188 6.148438 17.109375 6.078125 17.390625 C 6.015625 17.679688 5.851562 18.378906 5.59375 19.484375 C 5.332031 20.597656 5.191406 21.1875 5.171875 21.25 L 5.03125 21.796875 C 4.820312 22.648438 4.613281 23.394531 4.40625 24.03125 C 4.195312 24.675781 3.890625 25.273438 3.484375 25.828125 C 3.078125 26.390625 2.582031 26.671875 2 26.671875 C 1.65625 26.671875 1.347656 26.550781 1.078125 26.3125 C 0.804688 26.082031 0.671875 25.796875 0.671875 25.453125 C 0.671875 25.273438 0.726562 25.128906 0.84375 25.015625 C 0.96875 24.898438 1.113281 24.84375 1.28125 24.84375 C 1.394531 24.84375 1.5 24.867188 1.59375 24.921875 C 1.6875 24.972656 1.757812 25.046875 1.8125 25.140625 C 1.863281 25.234375 1.890625 25.335938 1.890625 25.453125 C 1.890625 25.628906 1.828125 25.769531 1.703125 25.875 C 1.585938 25.988281 1.441406 26.046875 1.265625 26.046875 Z M 1.265625 26.046875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph5-0">
+<path style="stroke:none;" d="M 0.421875 1.5 L 0.421875 -6 L 4.6875 -6 L 4.6875 1.5 Z M 0.90625 1.03125 L 4.203125 1.03125 L 4.203125 -5.53125 L 0.90625 -5.53125 Z M 0.90625 1.03125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph5-1">
+<path style="stroke:none;" d="M 2.703125 -0.296875 C 3.128906 -0.296875 3.445312 -0.523438 3.65625 -0.984375 C 3.863281 -1.453125 3.96875 -2.15625 3.96875 -3.09375 C 3.96875 -4.039062 3.863281 -4.742188 3.65625 -5.203125 C 3.445312 -5.671875 3.128906 -5.90625 2.703125 -5.90625 C 2.285156 -5.90625 1.96875 -5.671875 1.75 -5.203125 C 1.539062 -4.742188 1.4375 -4.039062 1.4375 -3.09375 C 1.4375 -2.15625 1.539062 -1.453125 1.75 -0.984375 C 1.96875 -0.523438 2.285156 -0.296875 2.703125 -0.296875 Z M 2.703125 0.125 C 2.035156 0.125 1.507812 -0.15625 1.125 -0.71875 C 0.75 -1.289062 0.5625 -2.082031 0.5625 -3.09375 C 0.5625 -4.113281 0.75 -4.90625 1.125 -5.46875 C 1.507812 -6.03125 2.035156 -6.3125 2.703125 -6.3125 C 3.378906 -6.3125 3.90625 -6.03125 4.28125 -5.46875 C 4.664062 -4.90625 4.859375 -4.113281 4.859375 -3.09375 C 4.859375 -2.082031 4.664062 -1.289062 4.28125 -0.71875 C 3.90625 -0.15625 3.378906 0.125 2.703125 0.125 Z M 2.703125 0.125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph5-2">
+<path style="stroke:none;" d="M 0.90625 -3 L 6.234375 -3 L 6.234375 -2.328125 L 0.90625 -2.328125 Z M 0.90625 -3 "/>
+</symbol>
+<symbol overflow="visible" id="glyph6-0">
+<path style="stroke:none;" d="M 0.421875 1.5 L 0.421875 -6 L 4.6875 -6 L 4.6875 1.5 Z M 0.90625 1.03125 L 4.203125 1.03125 L 4.203125 -5.53125 L 0.90625 -5.53125 Z M 0.90625 1.03125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph6-1">
+<path style="stroke:none;" d="M 0.546875 0 L 0.03125 0 L 1.96875 -2.125 L 1 -3.96875 L 0.453125 -3.96875 L 0.53125 -4.421875 L 1.65625 -4.421875 L 2.578125 -2.703125 L 4.15625 -4.421875 L 4.671875 -4.421875 L 2.765625 -2.34375 L 3.78125 -0.4375 L 4.359375 -0.4375 L 4.265625 0 L 3.109375 0 L 2.171875 -1.765625 Z M 0.546875 0 "/>
+</symbol>
+<symbol overflow="visible" id="glyph6-2">
+<path style="stroke:none;" d="M 1.140625 -3.96875 L 0.46875 -3.96875 L 0.546875 -4.421875 L 1.234375 -4.421875 L 1.5 -5.796875 L 2.265625 -5.796875 L 2 -4.421875 L 3.4375 -4.421875 L 3.34375 -3.96875 L 1.90625 -3.96875 L 1.359375 -1.171875 C 1.316406 -0.953125 1.296875 -0.78125 1.296875 -0.65625 C 1.296875 -0.5625 1.304688 -0.492188 1.328125 -0.453125 C 1.378906 -0.347656 1.503906 -0.296875 1.703125 -0.296875 C 1.898438 -0.296875 2.054688 -0.351562 2.171875 -0.46875 C 2.285156 -0.582031 2.367188 -0.773438 2.421875 -1.046875 L 3 -1.046875 C 2.90625 -0.640625 2.738281 -0.34375 2.5 -0.15625 C 2.269531 0.03125 1.957031 0.125 1.5625 0.125 C 1.113281 0.125 0.816406 0.0234375 0.671875 -0.171875 C 0.585938 -0.296875 0.546875 -0.46875 0.546875 -0.6875 C 0.546875 -0.820312 0.5625 -0.984375 0.59375 -1.171875 Z M 1.140625 -3.96875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph7-0">
+<path style="stroke:none;" d="M 0.40625 1.421875 L 0.40625 -5.640625 L 4.40625 -5.640625 L 4.40625 1.421875 Z M 0.84375 0.96875 L 3.953125 0.96875 L 3.953125 -5.1875 L 0.84375 -5.1875 Z M 0.84375 0.96875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph7-1">
+<path style="stroke:none;" d="M 1.03125 -4.4375 L 0.59375 -4.4375 L 0.59375 -5.484375 C 0.863281 -5.628906 1.140625 -5.738281 1.421875 -5.8125 C 1.710938 -5.894531 1.992188 -5.9375 2.265625 -5.9375 C 2.867188 -5.9375 3.34375 -5.789062 3.6875 -5.5 C 4.039062 -5.207031 4.21875 -4.804688 4.21875 -4.296875 C 4.21875 -3.722656 3.820312 -3.039062 3.03125 -2.25 C 2.96875 -2.1875 2.921875 -2.140625 2.890625 -2.109375 L 1.421875 -0.640625 L 3.84375 -0.640625 L 3.84375 -1.359375 L 4.3125 -1.359375 L 4.3125 0 L 0.546875 0 L 0.546875 -0.421875 L 2.3125 -2.1875 C 2.707031 -2.582031 2.988281 -2.941406 3.15625 -3.265625 C 3.320312 -3.597656 3.40625 -3.941406 3.40625 -4.296875 C 3.40625 -4.691406 3.300781 -5 3.09375 -5.21875 C 2.882812 -5.4375 2.601562 -5.546875 2.25 -5.546875 C 1.875 -5.546875 1.582031 -5.453125 1.375 -5.265625 C 1.175781 -5.085938 1.0625 -4.8125 1.03125 -4.4375 Z M 1.03125 -4.4375 "/>
+</symbol>
+</g>
+</defs>
+<g id="surface1">
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-1" x="0.15625" y="18.599609"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-2" x="7.207031" y="18.599609"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-3" x="15.609375" y="18.599609"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph1-1" x="21.539062" y="9.240381"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-4" x="27.273438" y="18.599609"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph1-2" x="34.761719" y="9.240381"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph2-1" x="41.410156" y="18.603516"/>
+</g>
+<path style="fill:none;stroke-width:1.2;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 55.53125 -3.760805 L 75.953125 -3.760805 " transform="matrix(1,0,0,1,0,18.600648)"/>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph2-2" x="62.105469" y="8.904297"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph3-1" x="54.210938" y="18.555184"/>
+</g>
+<path style="fill:none;stroke-width:0.6;stroke-linecap:round;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 66.152344 -0.194398 L 75.652344 -0.194398 " transform="matrix(1,0,0,1,0,18.600648)"/>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-5" x="67.222656" y="28.267578"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph4-1" x="77.28125" y="1.505859"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph5-1" x="84.664062" y="29.505859"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph6-1" x="89.710938" y="5.513672"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-1" x="95.019531" y="18.599609"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph5-2" x="103.152344" y="12.947266"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph6-2" x="109.871094" y="12.947266"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph7-1" x="113.679688" y="10.273438"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-6" x="118.863281" y="18.599609"/>
+</g>
+<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
+ <use xlink:href="#glyph0-7" x="126.738281" y="18.599609"/>
+</g>
+</g>
+</svg>
diff --git a/tools/dictionary.dic b/tools/dictionary.dic
index da2e28c..70e556a 100644
--- a/tools/dictionary.dic
+++ b/tools/dictionary.dic
@@ -22,6 +22,8 @@ CPUs
denormalizing
DEPTHWISE
Elementwise
+ERF
+erf
FFT
fft
fp
diff --git a/tosa.xml b/tosa.xml
index f4186e3..8de564e 100644
--- a/tosa.xml
+++ b/tosa.xml
@@ -664,6 +664,33 @@
</typesupport>
</operator>
<operator>
+ <name>ERF</name>
+ <arguments>
+ <argument category="input" name="input" type="in_out_t*" shape="shape">
+ <description>Input tensor</description>
+ <levellimit value="rank(shape)" limit="MAX_RANK"/>
+ </argument>
+ <argument category="output" name="output" type="in_out_t*" shape="shape">
+ <description>Output tensor of same type and shape as input</description>
+ </argument>
+ </arguments>
+ <types>
+ <type name='in_out_t'/>
+ </types>
+ <typesupport mode="fp16" in_out_t="fp16_t">
+ <profile name="MI"/>
+ <profile name="MT"/>
+ </typesupport>
+ <typesupport mode="bf16" in_out_t="bf16_t">
+ <profile name="MI"/>
+ <profile name="MT"/>
+ </typesupport>
+ <typesupport mode="fp32" in_out_t="fp32_t">
+ <profile name="MI"/>
+ <profile name="MT"/>
+ </typesupport>
+ </operator>
+ <operator>
<name>SIGMOID</name>
<arguments>
<argument category="input" name="input" type="tensor_t" shape="shape" tensor-element-type="in_out_t">