aboutsummaryrefslogtreecommitdiff
path: root/verif/generator/tosa_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'verif/generator/tosa_utils.py')
-rw-r--r--verif/generator/tosa_utils.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/verif/generator/tosa_utils.py b/verif/generator/tosa_utils.py
index 14afaa7..7fc5b52 100644
--- a/verif/generator/tosa_utils.py
+++ b/verif/generator/tosa_utils.py
@@ -51,15 +51,21 @@ class DataGenType(IntEnum):
OP_SPECIAL = 4
-# Additional (optional) data for dot product data generator
-DG_DOT_PRODUCT_OPTIONAL_INFO = ("acc_type", "kernel", "axis")
-
-
def dtypeIsSupportedByCompliance(dtype):
"""Types supported by the new data generation and compliance flow."""
+ if isinstance(dtype, list) or isinstance(dtype, tuple):
+ dtype = dtype[0]
return dtype in (DType.FP32,)
+def getOpNameFromOpListName(opName):
+ """Get the op name from a TOSA_OP_LIST name that can have suffixes."""
+ for name in ("conv2d", "depthwise_conv2d", "transpose_conv2d", "conv3d"):
+ if opName.startswith(name):
+ return name
+ return opName
+
+
def valueToName(item, value):
"""Get the name of an attribute with the given value.