diff options
author | Eric Kunze <eric.kunze@arm.com> | 2024-04-12 16:19:55 -0700 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2024-04-17 23:56:37 +0000 |
commit | aa162aa6d2287bcc7bfb7b976b3daabc84b62af4 (patch) | |
tree | 2bcb24fe65343dd6cb43c16dbed518eeb19d3141 /pseudocode/operators | |
parent | 7ad78d37a51f8b333367effe62d596ac89cdcdb5 (diff) | |
download | specification-aa162aa6d2287bcc7bfb7b976b3daabc84b62af4.tar.gz |
Switch fp8 to use non-saturating mode when converting
Implementations should use non-saturating mode and call CLAMP
if saturation is needed.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I7a79931552dd6c3ab5fc247a963e3e7ba1e38ae2
Diffstat (limited to 'pseudocode/operators')
-rw-r--r-- | pseudocode/operators/CAST.tosac | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pseudocode/operators/CAST.tosac b/pseudocode/operators/CAST.tosac index b8fdea9..64af40a 100644 --- a/pseudocode/operators/CAST.tosac +++ b/pseudocode/operators/CAST.tosac @@ -17,11 +17,7 @@ for_each(index in shape) { if (in_t == bool_t) { out = (in) ? 1.0 : 0.0; } - if (is_saturating_float_type<out_t>()) { - out = round_to_nearest_float_saturating(in); - } else { - out = round_to_nearest_float_nonsaturating(in); - } + out = round_to_nearest_float(in); } else { // Conversion to integer cases if (in_t == bool_t) { |