diff options
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 |