From 628928d32ceae5c95abd9b3a2cb7333b1e5de059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Alfv=C3=A9n?= Date: Thu, 27 Jan 2022 06:47:26 +0100 Subject: MLBEDSW-6060: Revert patch for MLBEDSW-5582 - Issue was due to a previous patch to fix MLBEDSW-5582 - Revert fix for MLBEDSW-5582 commit 849ff81f82c10a68898e5101930b92372bec5565, - Made new fix for MLBEDSW-5582 that enforce output tensor from NPU graphs to be in NHWC format. This information is otherwise lost in the case when parts of a concatenation are placed in different custom operators resulting in mismatch bewteen NHWC and NHCWB16. Signed-off-by: Johan Alfven Change-Id: Iab3ba29d348353c854f357836e6aa7c338ae1572 --- ethosu/vela/extract_npu_subgraphs.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ethosu/vela/extract_npu_subgraphs.py') diff --git a/ethosu/vela/extract_npu_subgraphs.py b/ethosu/vela/extract_npu_subgraphs.py index d802b513..f46f031a 100644 --- a/ethosu/vela/extract_npu_subgraphs.py +++ b/ethosu/vela/extract_npu_subgraphs.py @@ -98,6 +98,9 @@ def rewrite_tensor_cpu_producer_npu_consumers( # Deal with output tensors for the NPU graph. These are special. npu_subgraph.output_tensors = [new_tens if tens == orig_tens else tens for tens in npu_subgraph.output_tensors] + for tens in npu_subgraph.output_tensors: + # Enforce output tensor from NPU graph to use normal NHWC output + tens.needs_linear_format = True def rewrite_tensor_npu_producer_cpu_consumers( -- cgit v1.2.1