aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/errors.py
diff options
context:
space:
mode:
authorManupa Karunaratne <manupa.karunaratne@arm.com>2020-08-12 18:26:39 +0000
committerManupa Karunaratne <manupa.karunaratne@arm.com>2020-08-12 18:37:29 +0000
commit8b24f2b2a8823720f399018923d2d4cf717fe63b (patch)
treebf359bebfdb7ce40a341fc0c704681a017cda66a /ethosu/vela/errors.py
parent1a9d20e1dd1726bc540a42cdd4164752ab78d07e (diff)
downloadethos-u-vela-8b24f2b2a8823720f399018923d2d4cf717fe63b.tar.gz
[MLBEDSW-2749] removed the decorator for typecheck
*the decorator is causing the verification tests to fail when using TF 2.1, but not with TF 2.2, hence removing it for now. Change-Id: I07357c0fef383d9a65278fe99ad8e4d3f7dc6d9b Signed-off-by: Manupa Karunaratne <manupa.karunaratne@arm.com>
Diffstat (limited to 'ethosu/vela/errors.py')
-rw-r--r--ethosu/vela/errors.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/ethosu/vela/errors.py b/ethosu/vela/errors.py
index 59740aac..2c93fbc6 100644
--- a/ethosu/vela/errors.py
+++ b/ethosu/vela/errors.py
@@ -15,7 +15,6 @@
# limitations under the License.
# Description:
# Defines custom exceptions.
-import inspect
import sys
from .operation import Operation
@@ -122,20 +121,3 @@ def TensorError(tens, msg):
print("Error: {}".format(data))
sys.exit(1)
-
-
-def typecheck(func):
- def wrapper(*args, **kwargs):
- fsig = inspect.signature(func)
- args_zipped = zip(kwargs.values(), fsig.parameters.keys())
- for actual, expected in args_zipped:
- expected_type = fsig.parameters[expected].annotation
- actual_type = type(actual)
- if expected_type is inspect.Parameter.empty:
- raise TypeError("Please provide type info for {}, hint = {}".format(expected, actual_type))
- if expected_type is not actual_type:
- raise TypeError("expected : {}, but got {}".format(expected_type, actual_type))
- # Actual execution
- return func(*args, **kwargs)
-
- return wrapper