diff options
author | Tim Hall <tim.hall@arm.com> | 2020-08-28 18:33:38 +0100 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-08-28 19:10:29 +0100 |
commit | d775e37669061824b1e7b9976611cf8cd1d0cf9e (patch) | |
tree | 0317c3d02fdc5645b559d6da90e0c203a4d103c3 /ethosu/vela/register_command_stream_generator.py | |
parent | 237d72d80259d2e94f36e952eb0776fc5785f6f8 (diff) | |
download | ethos-u-vela-d775e37669061824b1e7b9976611cf8cd1d0cf9e.tar.gz |
MLBEDSW-2900: softmax output diff on FPGA
- Corrected the rounding mode for softmax
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: If136491c7668e85fba1e2c56c8cff11aa32db328
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
-rw-r--r-- | ethosu/vela/register_command_stream_generator.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py index 12ade8da..0a356475 100644 --- a/ethosu/vela/register_command_stream_generator.py +++ b/ethosu/vela/register_command_stream_generator.py @@ -436,7 +436,9 @@ def generate_register_command_stream(nng, sg, arch, verbose=False): # Specifies if global scale from the NPU_SET_OFM_SCALE register should be used instead of per-channel scale use_global_scale = False # Specifies type of rounding to be used. - rounding_mode = rounding.TFL + rounding_mode = ( + rounding.NATURAL if primary_op.attrs.get("rounding_mode", "") == b"NATURAL" else rounding.TFL + ) if primary_op.type == "ResizeBilinear": rounding_mode = rounding.TRUNCATE fmf = primary_op.attrs.get("fused_memory_function", None) |