aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/data_type.py
diff options
context:
space:
mode:
authorDwight Lidman <dwight.lidman@arm.com>2020-12-08 17:56:44 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-12-14 07:00:24 +0000
commit9b43f846b144d39bfb0cf16853bf6901c74b6672 (patch)
treea530dce790bb8e54dad009e11ca4d49d54b52b1d /ethosu/vela/data_type.py
parent94457b175b8646bce089c9924e99686587de8992 (diff)
downloadethos-u-vela-9b43f846b144d39bfb0cf16853bf6901c74b6672.tar.gz
MLBEDSW-3653: Fix type errors in annotated files
This commit corrects a number of type errors reported by mypy and refactors some parts of the code which are no longer necessary after making adjustments to satisfy mypy. Signed-off-by: Dwight Lidman <dwight.lidman@arm.com> Change-Id: I16b880b228e57f2a92fb8936f53e94886e0f9f44
Diffstat (limited to 'ethosu/vela/data_type.py')
-rw-r--r--ethosu/vela/data_type.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/ethosu/vela/data_type.py b/ethosu/vela/data_type.py
index a4b7b537..3ad642ad 100644
--- a/ethosu/vela/data_type.py
+++ b/ethosu/vela/data_type.py
@@ -16,6 +16,7 @@
# Description:
# Defines the basic numeric type classes for tensors.
import enum
+from typing import Any
from .numeric_util import round_up_divide
@@ -43,6 +44,34 @@ class DataType:
__slots__ = "type", "bits"
+ int8: Any
+ int16: Any
+ int32: Any
+ int64: Any
+ uint8: Any
+ uint16: Any
+ uint32: Any
+ uint64: Any
+ quint4: Any
+ quint8: Any
+ quint12: Any
+ quint16: Any
+ quint32: Any
+ qint4: Any
+ qint8: Any
+ qint12: Any
+ qint16: Any
+ qint32: Any
+ float16: Any
+ float32: Any
+ float64: Any
+ string: Any
+ bool: Any
+ resource: Any
+ variant: Any
+ complex64: Any
+ complex128: Any
+
def __init__(self, type_, bits):
self.type = type_
self.bits = bits