aboutsummaryrefslogtreecommitdiff
path: root/verif/generator/tosa_arg_gen.py
diff options
context:
space:
mode:
authorTai Ly <tai.ly@arm.com>2024-03-08 22:19:41 +0000
committerTai Ly <tai.ly@arm.com>2024-03-17 19:56:21 -0700
commit60dc48c4ddf30f2a76d4cfcf1b40ca57b6f3bf95 (patch)
treee3d229a2d596e1a0788dfd75d77b996263055496 /verif/generator/tosa_arg_gen.py
parente67115ef82bcba0718dcbd75cc8411985001b7cc (diff)
downloadreference_model-60dc48c4ddf30f2a76d4cfcf1b40ca57b6f3bf95.tar.gz
[ref model] Change Clamp and Pad attribute fields
This implements changes due to ClampAttribute and PadAttribute field changes. Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: Ide01e2a27fe3c1ea7794e7a4b6780b7eae436caf
Diffstat (limited to 'verif/generator/tosa_arg_gen.py')
-rw-r--r--verif/generator/tosa_arg_gen.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/verif/generator/tosa_arg_gen.py b/verif/generator/tosa_arg_gen.py
index 20572e8..a2ef5bf 100644
--- a/verif/generator/tosa_arg_gen.py
+++ b/verif/generator/tosa_arg_gen.py
@@ -1813,13 +1813,7 @@ class TosaArgGen:
and "data_gen" in testGen.TOSA_OP_LIST[opName]
and gtu.dtypeIsSupportedByCompliance(dtype)
):
- if dtype in [
- DType.FP16,
- DType.FP32,
- DType.BF16,
- DType.FP8E4M3,
- DType.FP8E5M2,
- ]:
+ if gtu.dtypeIsFloat(dtype):
dataGenTypesList = testGen.TOSA_OP_LIST[opName]["data_gen"]["fp"]
else:
dataGenTypesList = testGen.TOSA_OP_LIST[opName]["data_gen"]["int"]
@@ -2462,13 +2456,7 @@ class TosaArgGen:
if dtype in [DType.BOOL, DType.INT8, DType.INT16, DType.INT32]:
pad_const_int = testGen.getRandNumberDType(dtype)
pad_const_fp = 0
- elif dtype in (
- DType.FP16,
- DType.BF16,
- DType.FP32,
- DType.FP8E4M3,
- DType.FP8E5M2,
- ):
+ elif gtu.dtypeIsFloat(dtype):
pad_const_int = 0
pad_const_fp = testGen.getRandNumberDType(dtype)
else: