diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-06-03 08:56:44 +0200 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-06-18 17:53:52 +0100 |
commit | e0ef27310b27b2189d7735eb026bf11a81a9c465 (patch) | |
tree | b5cca16dfa484e4873d7b801b1aa0d40adc87e73 /ethosu/vela/high_level_command_stream.py | |
parent | 284223e8e086dc6c7b7f1edf3b3555401e3d0a96 (diff) | |
download | ethos-u-vela-e0ef27310b27b2189d7735eb026bf11a81a9c465.tar.gz |
MLBEDSW-2379: Fix 1-element tensors that were marked as scalars
Tensors that are the result of an operation were incorrectly marked
as scalars.
Also fixes a bug for IFM2 of shape [*,*,*,1] in elementwise operations.
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Change-Id: I82a0e643b12e93c7158e4aca3185415c59033a73
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: |