diff options
author | William Isaksson <william.isaksson@arm.com> | 2024-01-10 12:28:04 +0100 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2024-01-18 13:24:26 +0000 |
commit | 56e5f0c22ebc995dae13c6b72b08b28934a7871a (patch) | |
tree | c0e7a25770d6d3dc8f15782a0e4529aff081ef3c /ethosu/vela/high_level_command_to_npu_op.py | |
parent | 84fe2f60d5c6a25fa73d081cc90ee858ebca821d (diff) | |
download | ethos-u-vela-56e5f0c22ebc995dae13c6b72b08b28934a7871a.tar.gz |
CONV ops int16 tests failed after TensorFlow update
Adds support for setting the accumulator type using the quantized_bias_type attribute
Change-Id: Ibde1149143b510a1c650a5a037d3ab92d878d7cd
Signed-off-by: William Isaksson <william.isaksson@arm.com>
Diffstat (limited to 'ethosu/vela/high_level_command_to_npu_op.py')
-rw-r--r-- | ethosu/vela/high_level_command_to_npu_op.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/high_level_command_to_npu_op.py b/ethosu/vela/high_level_command_to_npu_op.py index 53df0966..06d91a6a 100644 --- a/ethosu/vela/high_level_command_to_npu_op.py +++ b/ethosu/vela/high_level_command_to_npu_op.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> +# SPDX-FileCopyrightText: Copyright 2020-2024 Arm Limited and/or its affiliates <open-source-office@arm.com> # # SPDX-License-Identifier: Apache-2.0 # @@ -65,6 +65,7 @@ from .operation import Padding from .operation import RoundingMode from .register_command_stream_generator import generate_command_stream from .register_command_stream_util import BASE_PTR_INDEX_MEM2MEM +from .register_command_stream_util import to_npu_acc_type from .register_command_stream_util import to_npu_kernel from .register_command_stream_util import UNARY_ELEMWISE_OPS from .shape4d import Shape4D @@ -545,6 +546,7 @@ def set_common_op_fields(npu_op: NpuBlockOperation, cmd: NpuStripe, arch: Archit npu_op.padding = create_padding(cmd, op, npu_op) npu_op.kernel = to_npu_kernel(op.kernel) npu_op.ifm_upscale = resampling_mode_inv_map[op.ifm_resampling_mode] + npu_op.accumulator_type = to_npu_acc_type(op.attrs.get("quantized_bias_type", None)) return npu_op |