MLBEDSW-6407: Vela fails with TypeError in npu_performance

 - This is due to calling range() on a non-integer value which in turn is due
to a change in the behaviour of round() on numpy.float64 values
 - The fix is to always force the output of the round() to be an integer and
thereby stop whole number floating point values propagating into the kernel
dimensions which later feed into the range().

Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: Ic75cb6ba85a90c81c1d762067d89a10caaa13b92
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py
index 88d58a3..b2a3419 100644
--- a/ethosu/vela/tflite_graph_optimiser.py
+++ b/ethosu/vela/tflite_graph_optimiser.py
@@ -318,7 +318,9 @@
     out_shape = np.array(op.ofm_shapes[0].get_hw_as_list())
 
     # Calculate how many times 2x2 upscaling needs to be performed
-    upscale_factor = round(out_shape[1] / upscaled_shape[1])
+    # Force the result of round to be an integer. This is because the behaviour of rounding numpy.float64 values changed
+    # between different versions of numpy. This consistency ensures that the kernel dimensions are kept integral
+    upscale_factor = int(round(out_shape[1] / upscaled_shape[1]))
     n = int(np.log2(upscale_factor))
 
     # Perform 2x2 upscaling n-1 times