MLBEDS-7714: Fix assert for cascaded Resize op

- Cascading was recently enabled for Resize ops. A Resize op is
transformed into several ops. In this case the last op is a
DepthwiseConv2DBias using NEAREST resampling mode. This resampling/
upscaling is not taken into account when calculating the ifm box
size, causing the coordinates to get out of bounds.

- When generating the high level command stream there is a check to
see if an op is a resize op. If this is the case an upscaling factor
is calculated. The fix is to change this check to instead see if the
operator is using NEAREST resampling mode. If that is true, the
scaling factor should be used.

Change-Id: I5308a383cc3310c53004ccfe2d6fabf256478a26
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
diff --git a/ethosu/vela/high_level_command_stream_generator.py b/ethosu/vela/high_level_command_stream_generator.py
index 961f8ad..1dac181 100644
--- a/ethosu/vela/high_level_command_stream_generator.py
+++ b/ethosu/vela/high_level_command_stream_generator.py
@@ -16,6 +16,7 @@
 #
 # Description:
 # Generate a high-level command stream from a schedule
+from .architecture_allocator import is_nearest
 from .high_level_command_stream import Box
 from .high_level_command_stream import DMA
 from .high_level_command_stream import NOP
@@ -102,7 +103,7 @@
     upscaling = 1
     if sched_op.op_type == Op.Conv2DBackpropInputSwitchedBias:
         upscaling = ofm_shape.height // ifm.shape.height
-    elif sched_op.op_type.is_resize_op():
+    elif is_nearest(sched_op.resampling_mode):
         upscaling = round_up_divide(ofm_shape.height, ifm.shape.height)
 
     # Get kernel height and height dilation