aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/npu_performance.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2021-04-08 09:04:00 +0200
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2021-04-08 11:21:35 +0200
commitee99bb124b088430b97d205df9fc90a1e9412e0c (patch)
treebfb1a6799f9e9ff9d0f387471277b8a26edbab70 /ethosu/vela/npu_performance.py
parent95b279f1454d58a93238851cb5ff394c7782ad32 (diff)
downloadethos-u-vela-ee99bb124b088430b97d205df9fc90a1e9412e0c.tar.gz
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
Diffstat (limited to 'ethosu/vela/npu_performance.py')
-rw-r--r--ethosu/vela/npu_performance.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/npu_performance.py b/ethosu/vela/npu_performance.py
index e315f1f1..c83f8f52 100644
--- a/ethosu/vela/npu_performance.py
+++ b/ethosu/vela/npu_performance.py
@@ -389,7 +389,8 @@ def estimate_memory_transfer_efficiency(
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)