diff options
author | Jerry Ge <jerry.ge@arm.com> | 2024-03-26 20:51:48 +0000 |
---|---|---|
committer | Jerry Ge <jerry.ge@arm.com> | 2024-03-26 20:55:51 +0000 |
commit | d5b1512b1d2cea3b87e52a0ecc123db2a7a7cad3 (patch) | |
tree | 8dd57b438402083cded82347a07e85b784ce2f92 /verif/frameworks/write_test_json.py | |
parent | 42e183cae08b301083416481e7bac92f04f0ce21 (diff) | |
download | reference_model-d5b1512b1d2cea3b87e52a0ecc123db2a7a7cad3.tar.gz |
Add variable tensor fields for test descriptors
- Add variable_name and variable_file to the desc.json file
for writing variable tensors to numpy
- Add the key of num_variables in the unit test declaration to
specify the number of variable tensors in the graph
Signed-off-by: Jerry Ge <jerry.ge@arm.com>
Change-Id: I1109f66ffed52e49dbb14f4a8aca64baa2bea622
Diffstat (limited to 'verif/frameworks/write_test_json.py')
-rw-r--r-- | verif/frameworks/write_test_json.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/verif/frameworks/write_test_json.py b/verif/frameworks/write_test_json.py index 4e3aa40..cd42198 100644 --- a/verif/frameworks/write_test_json.py +++ b/verif/frameworks/write_test_json.py @@ -20,6 +20,7 @@ def write_test_json( framework_exclusions=None, quantized=False, test_name=None, + num_variables=None, ): test_desc = dict() @@ -74,5 +75,8 @@ def write_test_json( if quantized: test_desc["quantized"] = 1 + if num_variables: + test_desc["num_variables"] = num_variables + with open(filename, "w") as f: json.dump(test_desc, f, indent=" ") |