aboutsummaryrefslogtreecommitdiff
path: root/tools/tosa.py
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2024-04-16 18:08:08 -0700
committerEric Kunze <eric.kunze@arm.com>2024-04-18 21:23:44 -0700
commite6c07c8f97f84706e0105ec659462d262283dd95 (patch)
treefe377a2224b970082009bf1f0e27963d4ac8ab62 /tools/tosa.py
parent0e121c064e051716bdfca892b210fa52c792ac29 (diff)
downloadspecification-e6c07c8f97f84706e0105ec659462d262283dd95.tar.gz
Add version_added to each op_profile
Allows for future tools to take action on which version the operator/profile first appears. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: If0358c8b189f8b2aa11cde3379076c0cc28bf17d
Diffstat (limited to 'tools/tosa.py')
-rw-r--r--tools/tosa.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/tosa.py b/tools/tosa.py
index 016aba6..a0e4ddb 100644
--- a/tools/tosa.py
+++ b/tools/tosa.py
@@ -89,10 +89,11 @@ class TOSAOperatorArgument:
class TOSAOperatorDataTypeSupport:
- def __init__(self, mode, tymap, profiles=None):
+ def __init__(self, mode, tymap, version_added, profiles):
self.mode = mode
self.tymap = tymap
self.profiles = profiles
+ self.version_added = version_added
class TOSAOperator:
@@ -195,6 +196,7 @@ class TOSASpec:
for tysup in op.findall("typesupport"):
tsmode = tysup.get("mode")
tsmap = {}
+ version_added = tysup.get("version_added")
profiles = tysup.findall("op_profile")
tsprofiles = []
for p in profiles:
@@ -208,7 +210,9 @@ class TOSASpec:
tsprofiles.append(tsp_name)
for ty in types:
tsmap[ty] = tysup.get(ty)
- typesupports.append(TOSAOperatorDataTypeSupport(tsmode, tsmap, tsprofiles))
+ typesupports.append(
+ TOSAOperatorDataTypeSupport(tsmode, tsmap, version_added, tsprofiles)
+ )
return TOSAOperator(name, args, types, typesupports)
def __load_operator_argument(self, arg, op_name):