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/mark_tensors.py b/ethosu/vela/mark_tensors.py
index c1572f4..f3d5e85 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -41,6 +41,7 @@
tens.purpose = purpose
elif tens.purpose not in (purpose, TensorPurpose.LUT):
assert 0, "Cannot resolve tensor purpose {} and {} for tensor {}".format(tens.purpose, purpose, tens)
+
fmt = get_format(purpose, arch)
tens.set_format(fmt, arch)
tens.mem_area = arch.tensor_storage_mem_area[tens.purpose]