diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2021-02-09 16:08:26 +0100 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2021-02-17 16:29:20 +0100 |
commit | 1a92f78e14f31f1423824228deb0628b7a9a9071 (patch) | |
tree | 4e0de9a2e6b5b7d9159b25cbfead4a625c134a3c /ethosu/vela/high_level_command_to_npu_op.py | |
parent | 8d0f4890aa0ceae92a33ebb789701ff644a6fcaa (diff) | |
download | ethos-u-vela-1a92f78e14f31f1423824228deb0628b7a9a9071.tar.gz |
MLBEDSW-4022: support PAD followed by pool operator
PAD followed by max/average pool is run on NPU if NPU
padding can be used. Average pool is converted to depthwise.
Change-Id: Icc3652e6d9ecff5ac3dc7d92080313d90c245404
Signed-off-by: Louis Verhaard <louis.verhaard@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 | 3 |
1 files changed, 2 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 b5e7b4b9..1059e6e7 100644 --- a/ethosu/vela/high_level_command_to_npu_op.py +++ b/ethosu/vela/high_level_command_to_npu_op.py @@ -133,7 +133,8 @@ def get_rounding_mode(op: Operation, fused_quantize: bool) -> NpuRoundingMode: and op.kernel.elements_wh() == 1 ): rounding_mode = NpuRoundingMode.NATURAL - rounding_mode = op.attrs.get("rounding_mode", rounding_mode) + if op.rounding_mode is not None: + rounding_mode = op.rounding_mode return rounding_mode |