diff --git a/sw/blas/gemm/verify.py b/sw/blas/gemm/verify.py index 38e9ddd15c..f8d0126179 100755 --- a/sw/blas/gemm/verify.py +++ b/sw/blas/gemm/verify.py @@ -19,6 +19,7 @@ NP_DTYPE = {8: np.float64, 4: np.float32, 2: np.float16, 1: np.uint8} + def fp8byte_to_float(byte: np.uint8): """Converts a number from a byte stored as a uint8 to a float.""" sign = (byte & 0x80) >> 7 # Extract sign (1 bit)