aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/graph_optimiser_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/graph_optimiser_util.py')
-rw-r--r--ethosu/vela/graph_optimiser_util.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ethosu/vela/graph_optimiser_util.py b/ethosu/vela/graph_optimiser_util.py
index 57fd7dbf..5e7e1127 100644
--- a/ethosu/vela/graph_optimiser_util.py
+++ b/ethosu/vela/graph_optimiser_util.py
@@ -20,6 +20,7 @@ from typing import Tuple
import numpy as np
from . import lut
+from .architecture_features import Accelerator
from .data_type import DataType
from .debug_database import DebugDatabase
from .errors import UnsupportedFeatureError
@@ -111,7 +112,10 @@ def check_format_restrictions(tens, arch):
return
for op in tens.consumer_list:
- if op.type == Op.ReduceSum and tens.dtype == DataType.int32:
+ if op.type == Op.ReduceSum and (
+ tens.dtype == DataType.int32 or arch.accelerator_config == Accelerator.Ethos_U65_512
+ ):
+ # ReduceSum requires NHWC input
return
if op.type == Op.Reshape:
# Using NHCWB16 format for a no-op reshape is only an option if subsequent