aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/debug_database.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-22 09:16:50 +0100
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2020-12-22 15:06:09 +0100
commitcc6915ce439a985e5f36e5ebc317c2a3f8bf9ce3 (patch)
tree57c2b8b36d4593090ef9edb321a63bd20446a548 /ethosu/vela/debug_database.py
parent6bb8f6700e0bc1a254fab745b8d3fac767270304 (diff)
downloadethos-u-vela-cc6915ce439a985e5f36e5ebc317c2a3f8bf9ce3.tar.gz
MLBEDSW-3790 Fix for cpu ops has no op.ifm_shapes
Fixes for MLBEDSW-3790, MLBEDSW-3792 and MLBEDSW-3794 3790: Fix for cpu ops has no op.ifm_shapes - Check before added to pass 3792: Debug database, fix for cpu op with 5D tensor - Do not try to convert to 4D 3794: Fix covert ResizeBilinear to 2x2 maxpool -set ifm ofm shapes Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: I9144dc77e2f6e5c3707c5bf2f204c1d13d5148ba
Diffstat (limited to 'ethosu/vela/debug_database.py')
-rw-r--r--ethosu/vela/debug_database.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/ethosu/vela/debug_database.py b/ethosu/vela/debug_database.py
index 77e13eb0..69648089 100644
--- a/ethosu/vela/debug_database.py
+++ b/ethosu/vela/debug_database.py
@@ -23,7 +23,6 @@ import lxml.etree as xml
from . import numeric_util
from .operation import Operation
-from .shape4d import Shape4D
UntypedDict = Dict[Any, Any]
UntypedList = List[Any]
@@ -79,18 +78,9 @@ class DebugDatabase:
src_uid = cls._sourceUID[parent]
uid = len(cls._optimisedUID)
cls._optimisedUID[op] = (uid, src_uid)
- ofm_shape = op.ofm_shapes[0] if op.ofm_shapes else Shape4D(op.outputs[0].shape)
+ ofm_shape = numeric_util.full_shape(3, op.outputs[0].shape, 1)
cls._optimisedTable.append(
- [
- uid,
- src_uid,
- op.type,
- op.kernel.width,
- op.kernel.height,
- ofm_shape.width,
- ofm_shape.height,
- ofm_shape.depth,
- ]
+ [uid, src_uid, op.type, op.kernel.width, op.kernel.height, ofm_shape[-2], ofm_shape[-3], ofm_shape[-1]]
)
@classmethod