MLBEDSW-6881 SHAPE single op network is optimised to nothing

Fixed by adding an operation to copy the statically optimised
data to the subgraph output.

Change-Id: Ica757e37d5460237973444ffd39c7d2850f319e3
Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
diff --git a/ethosu/vela/register_command_stream_util.py b/ethosu/vela/register_command_stream_util.py
index b2c84d7..1b2cb47 100644
--- a/ethosu/vela/register_command_stream_util.py
+++ b/ethosu/vela/register_command_stream_util.py
@@ -32,6 +32,7 @@
 from .api import NpuOperation
 from .api import NpuOperationType
 from .api import NpuPadding
+from .api import NpuQuantization
 from .api import NpuShape3D
 from .architecture_features import ArchitectureFeatures
 from .architecture_features import Block
@@ -80,6 +81,17 @@
     return Block(shape.width, shape.height, shape.depth)
 
 
+def get_zero_point(fm: NpuFeatureMap):
+    return int(fm.quantization.zero_point if fm.quantization else 0)
+
+
+def quantise(value: float, quant: Optional[NpuQuantization]) -> int:
+    """Quantizes the given value"""
+    scale = 1 if quant is None or quant.scale_f32 is None else quant.scale_f32
+    zp = 0 if quant is None else quant.zero_point
+    return numeric_util.quantise_float32(value, scale, zp)
+
+
 # -------------------------------------------------------------------
 # ADDRESSING/STRIDES (helper functions)
 # -------------------------------------------------------------------