aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/operation.py
diff options
context:
space:
mode:
Diffstat (limited to 'ethosu/vela/operation.py')
-rw-r--r--ethosu/vela/operation.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py
index 45fae217..32cba365 100644
--- a/ethosu/vela/operation.py
+++ b/ethosu/vela/operation.py
@@ -18,10 +18,17 @@
import copy
from collections import namedtuple
from enum import Enum
+from typing import Any
+from typing import Dict
+from typing import List
from typing import Optional
+from typing import TYPE_CHECKING
from .numeric_util import full_shape
+if TYPE_CHECKING:
+ from .tensor import Tensor
+
PointXY = namedtuple("PointXY", "x y")
PointXYZ = namedtuple("PointXYZ", "x y z")
@@ -392,9 +399,9 @@ class Operation:
def __init__(self, op_type: Op, name: str):
self.type = op_type
self.name = name
- self.attrs = {}
- self.inputs = []
- self.outputs = []
+ self.attrs: Dict[str, Any] = {}
+ self.inputs: List[Tensor] = []
+ self.outputs: List[Tensor] = []
self.flops = 0
self.run_on_npu = True
# Fused activation function. If not none: operator code.