diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-01-21 08:28:55 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2021-01-28 09:09:58 +0000 |
commit | 3a26920b7cd302364d68830eb6e374311ce17f22 (patch) | |
tree | 359913c1fbfc443611865d628414182554b0710e /ethosu/vela/debug_database.py | |
parent | e22ba8cb3090886b2d80a2df0e599dbf4cd7f483 (diff) | |
download | ethos-u-vela-3a26920b7cd302364d68830eb6e374311ce17f22.tar.gz |
MLBEDSW-3772 Reshape removal
-Removed reshapes in the original graph
-Removed the addition of reshapes to the
optimized graph
-Reshapes with different ifm/ofm quantisation will remain
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: I94862be53dac0d7434815e2aee5ca678228495f8
Diffstat (limited to 'ethosu/vela/debug_database.py')
-rw-r--r-- | ethosu/vela/debug_database.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ethosu/vela/debug_database.py b/ethosu/vela/debug_database.py index 006348c0..adf03627 100644 --- a/ethosu/vela/debug_database.py +++ b/ethosu/vela/debug_database.py @@ -25,6 +25,7 @@ import lxml.etree as xml from . import numeric_util from .operation import Operation +from .shape4d import Shape4D class DebugDatabase: @@ -77,7 +78,10 @@ class DebugDatabase: src_uid = cls._sourceUID[parent] uid = len(cls._optimisedUID) cls._optimisedUID[op] = (uid, src_uid) - ofm_shape = numeric_util.full_shape(3, op.outputs[0].shape, 1) + if len(op.ofm_shapes) == 0: + ofm_shape = Shape4D(op.outputs[0].shape) + else: + ofm_shape = op.ofm_shapes[0] cls._optimisedTable.append( [ uid, @@ -85,9 +89,9 @@ class DebugDatabase: str(op.type), op.kernel.width, op.kernel.height, - ofm_shape[-2], - ofm_shape[-3], - ofm_shape[-1], + ofm_shape.width, + ofm_shape.height, + ofm_shape.depth, ] ) |