diff options
author | Rickard Bolin <rickard.bolin@arm.com> | 2022-06-09 13:07:17 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2022-09-12 08:06:00 +0000 |
commit | 9ae34556663d09cc3dff19e53e68b57c8c940565 (patch) | |
tree | 51088224df14f66bd02afec67b933bd2ab192efd /ethosu/vela/tflite_graph_optimiser.py | |
parent | 059166304f9ef47f0b916c1325700ed826f25581 (diff) | |
download | ethos-u-vela-9ae34556663d09cc3dff19e53e68b57c8c940565.tar.gz |
MLBEDSW-6613: Implement tile padding
Implement new padding mode which pads two edges of the IFM with the
current values of those edges
Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
Change-Id: I8523e0cabdac80b48710703859003e33050cc150
Diffstat (limited to 'ethosu/vela/tflite_graph_optimiser.py')
-rw-r--r-- | ethosu/vela/tflite_graph_optimiser.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index 0f199de0..611046ba 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -238,6 +238,9 @@ def calc_padding_and_skirt(padding_type, kernel, input_shape, explicit_padding): top, left, bottom, right = explicit_padding top_pad, bottom_pad = calc_explicit_padding(int(input_shape.height), int(s_y), int(k_h), int(top), int(bottom)) left_pad, right_pad = calc_explicit_padding(int(input_shape.width), int(s_x), int(k_w), int(left), int(right)) + elif padding_type == Padding.TILE: + # The values in the explicit padding only represent the "direction" in which to pad + top_pad, left_pad, bottom_pad, right_pad = explicit_padding else: raise UnsupportedFeatureError(f"Unsupported padding = {padding_type} for padding calculation") padding = (top_pad, left_pad, bottom_pad, right_pad) |