aboutsummaryrefslogtreecommitdiff
path: root/verif/generator/datagenerator.py
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2024-02-28 13:20:05 +0000
committerTatWai Chong <tatwai.chong@arm.com>2024-03-01 13:16:56 -0800
commit0a042997ac24fee1a338e806caf18bd8dfba28f3 (patch)
tree1cfe325d7d775b778873a3940407e68d39c80a48 /verif/generator/datagenerator.py
parent3195a665e3f96809a67b4cb04a57330d2bfeb0de (diff)
downloadreference_model-0a042997ac24fee1a338e806caf18bd8dfba28f3.tar.gz
Testing support for MUL with shift as input
Always create the shift as a tensor for all types in testing. In the reference model, set the shift operand to be available for all types, but only read in the shift tensor for i32. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Signed-off-by: TatWai Chong <tatwai.chong@arm.com> Change-Id: Ia267cbf8b63ca0a9c97b38e8fb4db83eeb8c0538
Diffstat (limited to 'verif/generator/datagenerator.py')
-rw-r--r--verif/generator/datagenerator.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/verif/generator/datagenerator.py b/verif/generator/datagenerator.py
index 743475c..c63a2d5 100644
--- a/verif/generator/datagenerator.py
+++ b/verif/generator/datagenerator.py
@@ -82,6 +82,10 @@ class GenerateLibrary:
# Create buffer and initialize to zero
buffer = (ct.c_int32 * size)(0)
size_bytes = size * 4
+ elif dtype == "INT8":
+ size_bytes = size
+ # Create buffer of bytes and initialize to zero
+ buffer = (ct.c_ubyte * size_bytes)(0)
else:
raise GenerateError(f"Unsupported data type {dtype}")