diff options
author | Andreas Nevalainen <andreas.nevalainen@arm.com> | 2020-09-11 10:25:09 +0200 |
---|---|---|
committer | Andreas Nevalainen <andreas.nevalainen@arm.com> | 2020-09-22 14:02:26 +0200 |
commit | d8c032d4be2a641946507b63023456312e333cb8 (patch) | |
tree | 4f55312012f3cdaf536364601f3fb7f1b2511846 /ethosu/vela/mark_tensors.py | |
parent | d9e38fe2bc0458fdca83dd4932abee6554fe2eb2 (diff) | |
download | ethos-u-vela-d8c032d4be2a641946507b63023456312e333cb8.tar.gz |
MLBEDSW-2813: Handle non-const weights and check shapes
- Added check for non-constant weights in supported operators
- Added check ifm & ifm2 shapes
- Handle None tensors for CPU operators
- Handle missing attributes for Cast operator
Signed-off-by: Andreas Nevalainen <andreas.nevalainen@arm.com>
Change-Id: I2f16d3d44d0c6da5237550b39273cdb9cc3c7607
Diffstat (limited to 'ethosu/vela/mark_tensors.py')
-rw-r--r-- | ethosu/vela/mark_tensors.py | 3 |
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) |