diff options
Diffstat (limited to 'ethosu/vela/high_level_command_stream.py')
-rw-r--r-- | ethosu/vela/high_level_command_stream.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py index 2c77e10c..9b0298bb 100644 --- a/ethosu/vela/high_level_command_stream.py +++ b/ethosu/vela/high_level_command_stream.py @@ -52,6 +52,8 @@ class Box: new_start_coord[-1] = 0 new_end_coord[-1] = ifm_shape[-1] + if npu_block_type == NpuBlockType.ElementWise and min(len(new_end_coord), len(ifm_shape)) >= 1: + new_end_coord[-1] = min(new_end_coord[-1], ifm_shape[-1]) if min(len(new_end_coord), len(ifm_shape)) >= 2: new_end_coord[-2] = min(new_end_coord[-2], ifm_shape[-2]) if min(len(new_end_coord), len(ifm_shape)) >= 3: |