From a0c3624899edc601525a589643c802469003f89d Mon Sep 17 00:00:00 2001 From: Fredrik Svedberg Date: Wed, 3 Jun 2020 15:43:31 +0200 Subject: [MLBEDSW-2335] SoftMax int16 Added graph rewrite of Softmax for int16. Change-Id: Id7885af6056a23e8b8362fb61ae94283251eb398 Signed-off-by: Fredrik Svedberg --- ethosu/vela/mark_tensors.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/mark_tensors.py') diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py index 5f3a13fa..b6b2f9f4 100644 --- a/ethosu/vela/mark_tensors.py +++ b/ethosu/vela/mark_tensors.py @@ -96,6 +96,10 @@ tensor_purposes = [ # ops, input_purpose "AvgPoolAct", "MaxPoolAct", "LeakyRelu", + "CLZ", + "SHL", + "SHR", + "ReduceSum", ) ), all_fm, @@ -252,7 +256,7 @@ def mark_tensor_purpose(nng, arch, verbose_tensor_purpose=False): if tens.purpose == TensorPurpose.Unknown or tens.purpose == purpose: tens.purpose = purpose - else: + elif tens.purpose != TensorPurpose.LUT: assert 0, "Cannot resolve tensor purpose %s and %s for tensor %s" % (tens.purpose, purpose, tens) tens.mem_area = arch.tensor_storage_mem_area[tens.purpose] tens.mem_type = arch.tensor_storage_mem_type[tens.purpose] @@ -332,7 +336,7 @@ def mark_tensor_format(nng, arch, verbose_tensor_format=False): formats_for_tensor = {} def init_tens(tens): - if tens.purpose == TensorPurpose.FeatureMap: + if tens.purpose in (TensorPurpose.FeatureMap, TensorPurpose.LUT): fmt = arch.default_feature_map_format elif tens.purpose == TensorPurpose.Weights: fmt = arch.default_weight_format -- cgit v1.2.1