MLBEDSW-7019: Update to elementwise cascading

- The cascade builder is using the ifm_ifm2_correct_order
function in order to decide if the operator is cascadable or not.
The problem is that this function expects a full shape or no shape
and the cascade builder did not provide that, so the operator was
reported to be non cascadable.

- The fix is to provide a full 4D shape, also refactoring
ifm_ifm2_correct_order to use 4D shape to avoid confusion
in the future.

- Refactoring code so that the scheduler can perform a
correct ifm and ifm2 swap.

Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Change-Id: I9a86c4690612f332afa428456a07e67698852495
diff --git a/ethosu/vela/operation_util.py b/ethosu/vela/operation_util.py
index aaabddb..c4176d9 100644
--- a/ethosu/vela/operation_util.py
+++ b/ethosu/vela/operation_util.py
@@ -242,8 +242,8 @@
     if ifm2 is None:
         ofm_shape = ifm_shape
     else:
-        in_shape = [] if ifm.shape == [] else ifm_shape.as_list()
-        in2_shape = [] if ifm2.shape == [] else ifm2_shape.as_list()
+        in_shape = None if ifm.shape == [] else ifm_shape
+        in2_shape = None if ifm2.shape == [] else ifm2_shape
         ofm_shape = ifm_shape if ifm_ifm2_correct_order(in_shape, in2_shape) else ifm2_shape
 
     ofm = Tensor(ofm_shape.as_list(), dtype, f"{op.name}_tens0")