diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2021-03-11 14:59:06 +0100 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2021-03-16 10:37:20 +0100 |
commit | c822d62ba27b874a130e9d8d434c12b419d10d62 (patch) | |
tree | 4450a032513b537ffd3545cb2bdb6e052339beb2 /ethosu/vela/high_level_command_stream.py | |
parent | 8ba0792731d47de64a59d93359340f3c88fc4a62 (diff) | |
download | ethos-u-vela-c822d62ba27b874a130e9d8d434c12b419d10d62.tar.gz |
MLBEDSW-4223: Full support for PAD operator
- Added full support for PAD operator
- Hardware padding is still used whenever possible
- Bug fix Pad followed by max pool if IFM contains negative values
Change-Id: Ifc64d1943737d94466f5e2821009dab12a49a965
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Diffstat (limited to 'ethosu/vela/high_level_command_stream.py')
-rw-r--r-- | ethosu/vela/high_level_command_stream.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py index 0ce8fac2..075574e4 100644 --- a/ethosu/vela/high_level_command_stream.py +++ b/ethosu/vela/high_level_command_stream.py @@ -39,8 +39,7 @@ class Box: skirt: List[int], ifm_shape: Shape4D, npu_block_type: NpuBlockType, - concat_axis: int = 0, - concat_offset: int = 0, + concat_offsets: List[int], split_offset: Shape4D = None, k_height: int = 1, upscaling_factor: int = 1, @@ -48,8 +47,8 @@ class Box: new_start_coord = list(self.start_coord) new_end_coord = list(self.end_coord) - new_start_coord[concat_axis] -= concat_offset - new_end_coord[concat_axis] -= concat_offset + new_start_coord = np.subtract(new_start_coord, concat_offsets) + new_end_coord = np.subtract(new_end_coord, concat_offsets) if split_offset is not None: for idx in range(len(split_offset)): @@ -170,8 +169,6 @@ class NpuStripe(Command): weight_tensor=None, weight_box=None, scale_tensor=None, - concat_axis=0, - concat_offset=0, ifm2_tensor=None, ifm2_box=None, pad_top=0, @@ -192,8 +189,6 @@ class NpuStripe(Command): self.weight_tensor = weight_tensor self.scale_tensor = scale_tensor self.weight_box = weight_box - self.concat_axis = concat_axis - self.concat_offset = concat_offset self.pad_top = pad_top self.pad_bottom = pad_bottom for i in range(len(self.ofm_box.end_coord)): |