diff options
author | Alex Matthews <alex.matthews@arm.com> | 2021-08-25 17:56:30 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2021-10-28 13:18:19 +0000 |
commit | 0af0d383925968626a7c37b084ad806742511e79 (patch) | |
tree | 3c733159a6f2b6d664ae9cdc075c1132cca7bcc1 /ethosu/vela | |
parent | 3e13434bb787d024e3386ff75f305bfe8cda3288 (diff) | |
download | ethos-u-vela-0af0d383925968626a7c37b084ad806742511e79.tar.gz |
MLBEDSW-4704: Vela crashes when serializing subset of Inception v3 network
* Add check for tensor with no operations, raising error if its constant-data buffer is empty
Signed-off-by: Alex Matthews <alex.matthews@arm.com>
Change-Id: Ib210dcc9733e4ecedbada0f430e8b3c4a8384999
Signed-off-by: James Ward <james.ward@arm.com>
Diffstat (limited to 'ethosu/vela')
-rwxr-xr-x[-rw-r--r--] | ethosu/vela/reader_util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ethosu/vela/reader_util.py b/ethosu/vela/reader_util.py index 476b70aa..b5de8b18 100644..100755 --- a/ethosu/vela/reader_util.py +++ b/ethosu/vela/reader_util.py @@ -53,6 +53,11 @@ def fixup_tensors(input_tensors, tensors): for tens in tensors: if not tens.ops: + if tens.values is None: + tens.error( + "Tensor with no operator output connection is assumed to contain constant " + "data but no data buffer is associated with this tensor. Perhaps the network is invalid?" + ) op = Operation(Op.Const, tens.name) op.set_output_tensor(tens) |