MLBEDSW-4334 Non-linear format decision in graph opt.
Check if non linear tensor format can be used is
refactored.
-Flag avoid_NHCWB16 replaced with needs_linear_format
-Checking restrictions located to one function in graph optimiser.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: Iec5c7996a1a6039cad052197f1ae56f7c0290440
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index e315f1f..c83f8f5 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -389,7 +389,8 @@
elem_size = tensor.dtype.size_in_bytes()
is_ifm = direction == BandwidthDirection.Read
tens = tensor.clone()
- if not tens.avoid_NHCWB16:
+
+ if not tensor.needs_linear_format:
tens.set_format(TensorFormat.NHCWB16, arch)
strides = tens.get_strides(shape4D=shape4D)