diff options
author | Rickard Bolin <rickard.bolin@arm.com> | 2022-01-07 14:22:52 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2022-01-12 10:00:56 +0000 |
commit | 1c08afa0ed049edd486498e62bab94a4dc7924bc (patch) | |
tree | 451e53d3a8275d2ac774e6267ca96835d9189e9e /ethosu/vela/high_level_command_stream.py | |
parent | bdb1d6e0fce5e52979f3a5742aaddd3a68b9a0f2 (diff) | |
download | ethos-u-vela-1c08afa0ed049edd486498e62bab94a4dc7924bc.tar.gz |
MLBEDSW-5534: Enet_640_640_int8 output diff
The output diff is caused by not including the kernel dilation when
calculating the bottom padding to be used on the last h_stripe. This
only shows up when using dedicated_sram since shared_sram does not split
into multiple h_stripes and thus uses the padding specified by the skirt
instead.
Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
Change-Id: I7f643748b153004d65be2124c0ac6c9d21cd803f
Diffstat (limited to 'ethosu/vela/high_level_command_stream.py')
-rw-r--r-- | ethosu/vela/high_level_command_stream.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py index cf31aa5f..7e60221d 100644 --- a/ethosu/vela/high_level_command_stream.py +++ b/ethosu/vela/high_level_command_stream.py @@ -40,9 +40,9 @@ class Box: ifm_shape: Shape4D, npu_block_type: NpuBlockType, concat_offsets: List[int], + k_dilated_height: int, split_offset: Shape4D = None, split_shape: Shape4D = None, - k_height: int = 1, upscaling_factor: int = 1, ): new_start_coord = list(self.start_coord) @@ -105,7 +105,9 @@ class Box: pad_bottom = original_end_coord[-3] - (ifm_shape.height * upscaling_factor) else: k_start = new_start_coord[-3] - pad_top - pad_bottom = max(0, k_start + total_stride + k_height - (ifm_shape.height * upscaling_factor)) + pad_bottom = max( + 0, k_start + total_stride + k_dilated_height - (ifm_shape.height * upscaling_factor) + ) # Adjust for upscaling new_start_coord[-3] = max(new_start_coord[-3] // upscaling_factor, 0) |