aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/graph_optimiser.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/graph_optimiser.py')
-rw-r--r--ethosu/vela/graph_optimiser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py
index b708b62e..f59b685a 100644
--- a/ethosu/vela/graph_optimiser.py
+++ b/ethosu/vela/graph_optimiser.py
@@ -263,9 +263,10 @@ def check_format_restrictions(tens, arch):
):
return
- if not any(cons.run_on_npu for cons in tens.consumer_list):
+ # Check if any of the producers/consumers is run on CPU
+ if not all(cons.run_on_npu for cons in tens.consumer_list):
return
- if not any(prod.run_on_npu for prod in tens.ops):
+ if not all(prod.run_on_npu for prod in tens.ops):
return
# "Concat" ofm exception: