MLBEDSW-5184 Unsupported memory only operators on CPU

Make sure unsupported memory only operations are issued
to the CPU.

Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Change-Id: Ifdf7c3056ab45d707db5b67113549a73133b69c8
diff --git a/ethosu/vela/extract_npu_subgraphs.py b/ethosu/vela/extract_npu_subgraphs.py
index e08392d..b536cfb 100644
--- a/ethosu/vela/extract_npu_subgraphs.py
+++ b/ethosu/vela/extract_npu_subgraphs.py
@@ -134,7 +134,7 @@
     ] = PassPlacement.Cpu  # Keep the startup init pass on the CPU, we'll make new ones to move onto NPU.
 
     # MemoryOnly passes that are either squeezed between NPU passes or on the boundary of NPU and CPU
-    # passes should be assigned to the NPU.
+    # passes should be assigned to the NPU, unless they are assigned to run on CPU explicitly.
 
     # Forward, then backwards
     for is_reversed in range(2):
@@ -143,7 +143,7 @@
         if is_reversed:
             seq = reversed(list(seq))
         for idx, place in seq:
-            if place == PassPlacement.MemoryOnly:
+            if place == PassPlacement.MemoryOnly and passes[idx].ops[0].run_on_npu:
                 if last_place == PassPlacement.Npu:
                     place = PassPlacement.Npu
                     place_vec[idx] = place