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/nn_graph.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/nn_graph.py')
-rw-r--r-- | ethosu/vela/nn_graph.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index 67925176..d2c848ad 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -21,8 +21,10 @@ # Subgraph - Holds a neural network subgraph, pointing at Tensors, Operations, Passes, and CascadedPasses. # Graph - A full neural network graph with one or more Subgraphs. import enum +from typing import List from .operation import Op +from .shape4d import Shape4D class PassPlacement(enum.Enum): @@ -58,8 +60,8 @@ class Pass: self.name = name self.cascade = None self.placement = placement - self.ifm_shapes = [] - self.ofm_shapes = [] + self.ifm_shapes: List[Shape4D] = [] + self.ofm_shapes: List[Shape4D] = [] # TODO: rename is_element_wise because it is not the same as an ElementWise operator. It is used by the tensor # allocation and requires that the OFM and IFM has the exact same address. Essentially complete overlap. |