diff options
author | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2021-10-14 15:16:30 +0200 |
---|---|---|
committer | Fredrik Svedberg <fredrik.svedberg@arm.com> | 2021-10-14 15:17:23 +0200 |
commit | 2b5939f639d3ceb9fcf75c2edc78d128676119b3 (patch) | |
tree | 80f7b1b34900b474e796d53a376974490c06177d /ethosu/vela/extract_npu_subgraphs.py | |
parent | b3d941ec44d44bdbcffadb3d62bda8ae4b001655 (diff) | |
download | ethos-u-vela-2b5939f639d3ceb9fcf75c2edc78d128676119b3.tar.gz |
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
Diffstat (limited to 'ethosu/vela/extract_npu_subgraphs.py')
-rw-r--r-- | ethosu/vela/extract_npu_subgraphs.py | 4 |
1 files 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 |