diff options
author | Tim Hall <tim.hall@arm.com> | 2020-05-26 09:33:14 +0100 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-06-18 17:53:52 +0100 |
commit | 465582ccb27861182841e03cb8b40fadb9e8c7d8 (patch) | |
tree | b46c20f41c89aaca45f8e0bfc15f9a8c59eec980 /ethosu | |
parent | 600351a0669605e740820df34780c3927a0d5559 (diff) | |
download | ethos-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
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/architecture_features.py | 1 | ||||
-rw-r--r-- | ethosu/vela/mark_tensors.py | 2 |
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 |