diff options
author | Jacob Bohlin <jacob.bohlin@arm.com> | 2020-08-31 10:44:35 +0200 |
---|---|---|
committer | Jacob Bohlin <jacob.bohlin@arm.com> | 2020-08-31 14:21:57 +0200 |
commit | 258ebbaee96fb24543bde99c3e48ae69d9d5486f (patch) | |
tree | 0507d4e78417d50e942dba121a626a7a2556cb60 /ethosu | |
parent | 749bfd5d2e28dbced80782fcc18cdcd2f9475555 (diff) | |
download | ethos-u-vela-258ebbaee96fb24543bde99c3e48ae69d9d5486f.tar.gz |
MLBEDSW-2915: Added None check for bias before checking restrictions
Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com>
Change-Id: I04618fd0d29075e7d3f8f27a320129603f045163
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/supported_operators.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/supported_operators.py b/ethosu/vela/supported_operators.py index 591f0801..7cff0ee4 100644 --- a/ethosu/vela/supported_operators.py +++ b/ethosu/vela/supported_operators.py @@ -416,11 +416,11 @@ class SupportedOperators: def check_bias_restrictions(self, bias_tensor): # check data type - if bias_tensor.dtype not in (DataType.int32, DataType.int64): + if bias_tensor is not None and bias_tensor.dtype not in (DataType.int32, DataType.int64): return False # check if values fits in 40-bit - if bias_tensor.dtype == DataType.int64: + if bias_tensor is not None and bias_tensor.dtype == DataType.int64: for quant_value in bias_tensor.quant_values: if not (-(1 << 39) <= quant_value < (1 << 39)): return False |