From 60dc48c4ddf30f2a76d4cfcf1b40ca57b6f3bf95 Mon Sep 17 00:00:00 2001 From: Tai Ly Date: Fri, 8 Mar 2024 22:19:41 +0000 Subject: [ref model] Change Clamp and Pad attribute fields This implements changes due to ClampAttribute and PadAttribute field changes. Signed-off-by: Tai Ly Change-Id: Ide01e2a27fe3c1ea7794e7a4b6780b7eae436caf --- verif/generator/tosa_utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'verif/generator/tosa_utils.py') diff --git a/verif/generator/tosa_utils.py b/verif/generator/tosa_utils.py index 6558bf8..cfe7cc6 100644 --- a/verif/generator/tosa_utils.py +++ b/verif/generator/tosa_utils.py @@ -64,6 +64,11 @@ def dtypeWidth(dtype): raise Exception(f"Unknown dtype, cannot determine width: {dtype}") +def dtypeIsFloat(dtype): + """Is floating point data type""" + return dtype in (DType.BF16, DType.FP16, DType.FP32, DType.FP8E4M3, DType.FP8E5M2) + + def dtypeIsSupportedByCompliance(dtype): """Types supported by the new data generation and compliance flow.""" if isinstance(dtype, list) or isinstance(dtype, tuple): -- cgit v1.2.1