aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/pass_packing.py
diff options
context:
space:
mode:
authorAndreas Nevalainen <andreas.nevalainen@arm.com>2020-09-11 10:25:09 +0200
committerAndreas Nevalainen <andreas.nevalainen@arm.com>2020-09-22 14:02:26 +0200
commitd8c032d4be2a641946507b63023456312e333cb8 (patch)
tree4f55312012f3cdaf536364601f3fb7f1b2511846 /ethosu/vela/pass_packing.py
parentd9e38fe2bc0458fdca83dd4932abee6554fe2eb2 (diff)
downloadethos-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/pass_packing.py')
-rw-r--r--ethosu/vela/pass_packing.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/pass_packing.py b/ethosu/vela/pass_packing.py
index a1b03fe2..f49f9813 100644
--- a/ethosu/vela/pass_packing.py
+++ b/ethosu/vela/pass_packing.py
@@ -318,6 +318,8 @@ def pack_into_passes(nng, arch, verbose_packing=False):
print("Warning:", curr_op.type, "operation is unknown or unsupported, placing on CPU")
for inp in reversed(curr_op.inputs):
+ if inp is None:
+ continue
can_pack = True
if len(inp.ops) == 1:
next_op = inp.ops[0]
@@ -390,6 +392,8 @@ def pack_into_passes(nng, arch, verbose_packing=False):
# Check primary_op first
if primary_op is not None:
for inp in primary_op.inputs:
+ if inp is None:
+ continue
if len(inp.ops) == 1 and inp.ops[0].type == "DMA" and inp.purpose == TensorPurpose.FeatureMap:
src_op = inp.ops[0]
if src_op in input_ops_list: