aboutsummaryrefslogtreecommitdiff
path: root/verif/generator/tosa_arg_gen.py
diff options
context:
space:
mode:
authorTatWai Chong <tatwai.chong@arm.com>2024-01-31 21:33:27 -0800
committerTatWai Chong <tatwai.chong@arm.com>2024-02-01 19:24:47 -0800
commitf15bad80b5ada22f4ffdd4642e9b58e2821bf90a (patch)
treece411555f09028d8555cfb563d973b8185372c3f /verif/generator/tosa_arg_gen.py
parent01f937a27a3b56bca622f94af7201c98dfebeb43 (diff)
downloadreference_model-f15bad80b5ada22f4ffdd4642e9b58e2821bf90a.tar.gz
[testing] Switch to using shape type for start and size of slice
The type of both start and size of slice are tosa shape type since 0.90. Update the type of these arguments and its usage in testing. Change-Id: Iff582982ad55d64a792183c6d46c9266510f924c Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
Diffstat (limited to 'verif/generator/tosa_arg_gen.py')
-rw-r--r--verif/generator/tosa_arg_gen.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/verif/generator/tosa_arg_gen.py b/verif/generator/tosa_arg_gen.py
index 0db9717..7825445 100644
--- a/verif/generator/tosa_arg_gen.py
+++ b/verif/generator/tosa_arg_gen.py
@@ -1059,6 +1059,19 @@ class TosaTensorValuesGen:
)
@staticmethod
+ def tvgSlice(testGen, op, dtypeList, shapeList, argsDict, error_name=None):
+ dtypeList[1] = DType.SHAPE
+ shapeList[1] = [len(argsDict["start"])]
+ dtypeList[2] = DType.SHAPE
+ shapeList[2] = [len(argsDict["size"])]
+ # Create a new list for the pre-generated data in argsDict["fixed_data"]
+ argsDict["fixed_data"] = [None, argsDict["start"], argsDict["size"]]
+
+ return TosaTensorValuesGen.tvgLazyGenDefault(
+ testGen, op, dtypeList, shapeList, argsDict, error_name
+ )
+
+ @staticmethod
def tvgTile(testGen, op, dtypeList, shapeList, argsDict, error_name=None):
dtypeList[1] = DType.SHAPE
shapeList[1] = [len(argsDict["multiples"])]