aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2021-10-14 15:16:30 +0200
committerFredrik Svedberg <fredrik.svedberg@arm.com>2021-10-14 15:17:23 +0200
commit2b5939f639d3ceb9fcf75c2edc78d128676119b3 (patch)
tree80f7b1b34900b474e796d53a376974490c06177d
parentb3d941ec44d44bdbcffadb3d62bda8ae4b001655 (diff)
downloadethos-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
-rw-r--r--ethosu/vela/extract_npu_subgraphs.py4
1 files changed, 2 insertions, 2 deletions
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 @@ 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