diff options
author | Tim Hall <tim.hall@arm.com> | 2022-07-21 11:46:03 +0100 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2022-07-23 16:56:07 +0000 |
commit | 885033b5bf2f6513b438f273b2bc71964f0c6c59 (patch) | |
tree | c52a6c5bbe1c6f4295aa94206b80a37a60fcf182 /ethosu/vela/register_command_stream_generator.py | |
parent | 47c7636586be265eed9e352e6ad4c090a02fb31f (diff) | |
download | ethos-u-vela-885033b5bf2f6513b438f273b2bc71964f0c6c59.tar.gz |
MLBEDSW-4157: Add RESIZE_NEAREST_NEIGHBOR support
- Changed ResizeBilinear to support ResizeNearestNeighbor as well for
1x1 IFM, IFM equal OFM, and non-align corners
- Added support for ResizeNearestNeighbor with align corners by
converting to a DepthwiseConv
- Updated supported operator unit tests
- Added is_resize() helper function and some associated refactoring
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: Id5bdf2a25e8aa6a4f28b7236250abf768141ce37
Diffstat (limited to 'ethosu/vela/register_command_stream_generator.py')
-rw-r--r-- | ethosu/vela/register_command_stream_generator.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py index 12a36caf..a8d1ddff 100644 --- a/ethosu/vela/register_command_stream_generator.py +++ b/ethosu/vela/register_command_stream_generator.py @@ -706,7 +706,7 @@ def generate_ofm_scaling_for_pooling(emit: CommandStreamEmitter, pool_op: NpuPoo scale = explicit_scaling.multiplier[0] shift = explicit_scaling.shift[0] else: - # for ResizeBilinear operations with rescale + # for ResizeBilinear/NearestNeighbor operations with rescale rescale = pool_op.rescale rescale_bits = len(bin(round_up_to_int(rescale))) - 2 + 1 scale, shift = scaling.quantise_pooling_scale(kernel.height * kernel.width, rescale_bits) |