From e22f96b9d1a1a87398b901d34cd52f11a5647f96 Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Thu, 15 Apr 2021 17:01:17 +0200 Subject: MLBEDSW Vela: Fix check for format restrictions Fixed the check related to if there are any CPU producers/consumers. Signed-off-by: Patrik Gustavsson Change-Id: I0ed08c650d1ca34e8e148aee68a5ed09c25fdd87 --- ethosu/vela/graph_optimiser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ethosu/vela') 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: -- cgit v1.2.1