From 2b5939f639d3ceb9fcf75c2edc78d128676119b3 Mon Sep 17 00:00:00 2001 From: Fredrik Svedberg Date: Thu, 14 Oct 2021 15:16:30 +0200 Subject: MLBEDSW-5184 Unsupported memory only operators on CPU Make sure unsupported memory only operations are issued to the CPU. Signed-off-by: Fredrik Svedberg Change-Id: Ifdf7c3056ab45d707db5b67113549a73133b69c8 --- ethosu/vela/extract_npu_subgraphs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethosu/vela/extract_npu_subgraphs.py b/ethosu/vela/extract_npu_subgraphs.py index e08392dc..b536cfba 100644 --- a/ethosu/vela/extract_npu_subgraphs.py +++ b/ethosu/vela/extract_npu_subgraphs.py @@ -134,7 +134,7 @@ def extract_subgraph(nng, orig_sg, arch): ] = 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 @@ def extract_subgraph(nng, orig_sg, arch): 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 -- cgit v1.2.1