diff options
author | Eric Kunze <eric.kunze@arm.com> | 2023-10-20 15:58:55 -0700 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2024-02-14 16:36:04 -0800 |
commit | 74e2ceba954ed6111b3e3ce40c5ff88fe79ff043 (patch) | |
tree | 7e1967b073313d7df4885693eda931230d401eb0 /pseudocode/library/numeric_conversion_helpers.tosac | |
parent | 9fe5e964e2193f0e345670f7f4098beecd7fd6eb (diff) | |
download | specification-74e2ceba954ed6111b3e3ce40c5ff88fe79ff043.tar.gz |
Initial FP8 support
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
Diffstat (limited to 'pseudocode/library/numeric_conversion_helpers.tosac')
-rw-r--r-- | pseudocode/library/numeric_conversion_helpers.tosac | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pseudocode/library/numeric_conversion_helpers.tosac b/pseudocode/library/numeric_conversion_helpers.tosac index fac7078..576351f 100644 --- a/pseudocode/library/numeric_conversion_helpers.tosac +++ b/pseudocode/library/numeric_conversion_helpers.tosac @@ -11,8 +11,14 @@ int round_to_nearest_int(float_t f) Converts the floating-point value to f, with rounding to the nearest integer value. For the required precision see the section: Main inference precision requirements. -float_t round_to_nearest_float(in_t f) +float_t round_to_nearest_float_nonsaturating(in_t f) Converts the input value into floating-point, rounding to the nearest representable value. + Values that are not NaN outside of the representable range of the destination type must be set to infinity of the correct sign. + For the required precision see the section: Main inference precision requirements. + +float_t round_to_nearest_float_saturating(in_t f) + Converts the input value into floating-point, rounding to the nearest representable normal value. + Values that are not NaN outside of the representable range must return the maximum representable normal value of the correct sign. For the required precision see the section: Main inference precision requirements. out_t sign_extend<out_t>(in_t input) |