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/api.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/api.py')
-rw-r--r-- | ethosu/vela/api.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ethosu/vela/api.py b/ethosu/vela/api.py index 589a2834..7125e889 100644 --- a/ethosu/vela/api.py +++ b/ethosu/vela/api.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 # @@ -27,7 +27,7 @@ import numpy API_VERSION_MAJOR = 1 -API_VERSION_MINOR = 4 +API_VERSION_MINOR = 5 API_VERSION = f"{API_VERSION_MAJOR}.{API_VERSION_MINOR}" @@ -273,6 +273,16 @@ class NpuKernel: self.dilation_y = dilation_y +class NpuAccumulatorType(Enum): + """ + Accumulator dtype of NPU operation + """ + + Default = auto() + Int32 = auto() + Int40 = auto() + + class NpuOperationType(Enum): """ Type of NPU operation @@ -343,6 +353,7 @@ class NpuBlockOperation(NpuOperation): self.fused_quantize: bool = False # IFM upscaling to be applied self.ifm_upscale: NpuResamplingMode = NpuResamplingMode.NONE + self.accumulator_type: NpuAccumulatorType = NpuAccumulatorType.Default class NpuConv2DOperation(NpuBlockOperation): |