aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/mark_tensors.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/mark_tensors.py')
-rw-r--r--ethosu/vela/mark_tensors.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py
index 03ab83fe..208b5b8c 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -253,7 +253,6 @@ for ops, input_purpose in tensor_purposes:
def mark_tensor_purpose(nng, arch, verbose_tensor_purpose=False):
def mark_tensor_helper(tens, purpose):
-
if tens.purpose == TensorPurpose.Unknown or tens.purpose == purpose:
tens.purpose = purpose
elif tens.purpose != TensorPurpose.LUT:
@@ -284,6 +283,8 @@ def mark_tensor_purpose(nng, arch, verbose_tensor_purpose=False):
)
for idx, tens in enumerate(op.inputs):
+ if tens is None:
+ continue
purpose = input_purpose(op, idx) if tens.purpose == TensorPurpose.Unknown else tens.purpose
mark_tensor_helper(tens, purpose)