diff options
author | Dominic Symes <dominic.symes@arm.com> | 2022-11-04 18:00:03 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2022-12-05 19:18:51 +0000 |
commit | e4d6a1b99337f33cfaf343005e355ef7a68b2be9 (patch) | |
tree | 32ae772f418c53ad90e7f069caf59f51dfb7b6f0 /tools/tosa.py | |
parent | 1cf84e95f85d510f55720fb98694530923ba9a1c (diff) | |
download | specification-e4d6a1b99337f33cfaf343005e355ef7a68b2be9.tar.gz |
Add Levels defintion
Add definition of Level 1.0.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I1b34ae22396f273cc5ecdf99198fdbece6e2809c
Diffstat (limited to 'tools/tosa.py')
-rw-r--r-- | tools/tosa.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/tosa.py b/tools/tosa.py index 87b4f1a..2c2f8ec 100644 --- a/tools/tosa.py +++ b/tools/tosa.py @@ -9,12 +9,13 @@ class TOSAOperatorArgumentCategory: class TOSAOperatorArgument: - def __init__(self, name, description, categories, ty, shape): + def __init__(self, name, description, categories, ty, shape, levellimits): self.name = name self.description = description self.categories = categories self.type = ty self.shape = shape + self.levellimits = levellimits class TOSAOperatorDataTypeSupport: @@ -87,6 +88,11 @@ class TOSASpec: argcats = [] argtype = arg.get("type") shape = arg.get("shape") + levellimits = [] + for levellimit in arg.findall("levellimit"): + value = levellimit.get("value") + limit = levellimit.get("limit") + levellimits.append([value, limit]) cats = re.findall( r"(input|output|attribute)\(?([A-Z,]+)?\)?", arg.get("category") @@ -94,4 +100,4 @@ class TOSASpec: for cat in cats: argcats.append(TOSAOperatorArgumentCategory(cat[0], cat[1].split(","))) - return TOSAOperatorArgument(name, desc, argcats, argtype, shape) + return TOSAOperatorArgument(name, desc, argcats, argtype, shape, levellimits) |