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/tensor.py b/ethosu/vela/tensor.py
index e915363..15bd05e 100644
--- a/ethosu/vela/tensor.py
+++ b/ethosu/vela/tensor.py
@@ -372,7 +372,7 @@
"block_traversal",
"equivalence_id",
"resampling_mode",
- "avoid_NHCWB16",
+ "needs_linear_format",
)
AllocationQuantum = 16
@@ -418,7 +418,7 @@
self.block_traversal: TensorBlockTraversal = TensorBlockTraversal.Default
self.resampling_mode: resampling_mode = resampling_mode.NONE
- self.avoid_NHCWB16: bool = False
+ self.needs_linear_format = True
@property
def address(self) -> int: