aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2020-05-26 09:33:14 +0100
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commit465582ccb27861182841e03cb8b40fadb9e8c7d8 (patch)
treeb46c20f41c89aaca45f8e0bfc15f9a8c59eec980
parent600351a0669605e740820df34780c3927a0d5559 (diff)
downloadethos-u-vela-465582ccb27861182841e03cb8b40fadb9e8c7d8.tar.gz
vela: Fix tensor purpose for some CPU only ops
- Add support for marking the tensor purpose of CPU only ops such as LESS which mark their input based upon their output Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: Ia7898089f0b18ccd4f183e2ef961a67f4d169e4c
-rw-r--r--ethosu/vela/architecture_features.py1
-rw-r--r--ethosu/vela/mark_tensors.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/ethosu/vela/architecture_features.py b/ethosu/vela/architecture_features.py
index b59122ea..f1cabdd1 100644
--- a/ethosu/vela/architecture_features.py
+++ b/ethosu/vela/architecture_features.py
@@ -243,6 +243,7 @@ Note the difference between ArchitectureFeatures and CompilerOptions
self.tensor_storage_mem_area = {
# permanent mem_area
+ TensorPurpose.Unknown: MemArea.Unknown,
TensorPurpose.Weights: self.permanent_storage_mem_area,
TensorPurpose.FeatureMap: self.feature_map_storage_mem_area,
}
diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py
index 5231e860..b557f903 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -314,6 +314,8 @@ def mark_tensor_format(nng, arch, verbose_tensor_format=False):
fmt = arch.default_feature_map_format
elif tens.purpose == TensorPurpose.Weights:
fmt = arch.default_weight_format
+ elif tens.purpose == TensorPurpose.Unknown:
+ fmt = TensorFormat.Unknown
else:
assert 0, "unknown tensor purpose %s" % (tens.purpose,)
return fmt