diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-12-16 13:08:06 +0100 |
---|---|---|
committer | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-12-21 07:34:05 +0100 |
commit | bf31d647dc5df47410ee577b12427ddf076d816b (patch) | |
tree | 85ddd620916565aa8565d072b764ca4918b405a1 /ethosu/vela/debug_database.py | |
parent | 2349d429d926e258e9a61d34c7fd97660ab9fb98 (diff) | |
download | ethos-u-vela-bf31d647dc5df47410ee577b12427ddf076d816b.tar.gz |
MLBEDSW-3645 4D class for op ifm/ofm shapes
Add 4D shape class for op Ifm/ofm shapes
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: Ic0a98da9d2f9d085605e39a9ab5a26bad6e702a3
Diffstat (limited to 'ethosu/vela/debug_database.py')
-rw-r--r-- | ethosu/vela/debug_database.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ethosu/vela/debug_database.py b/ethosu/vela/debug_database.py index 203503f2..77e13eb0 100644 --- a/ethosu/vela/debug_database.py +++ b/ethosu/vela/debug_database.py @@ -23,7 +23,7 @@ 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,9 +79,18 @@ 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 numeric_util.full_shape(3, op.outputs[0].shape, 1) + ofm_shape = op.ofm_shapes[0] if op.ofm_shapes else Shape4D(op.outputs[0].shape) cls._optimisedTable.append( - [uid, src_uid, op.type, op.kernel.width, op.kernel.height, ofm_shape[-2], ofm_shape[-3], ofm_shape[-1]] + [ + uid, + src_uid, + op.type, + op.kernel.width, + op.kernel.height, + ofm_shape.width, + ofm_shape.height, + ofm_shape.depth, + ] ) @classmethod |