Skip to content

Commit

Permalink
gemm: Remove deprecated verify function
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Feb 12, 2024
1 parent 95c5e41 commit 185deb2
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions sw/blas/gemm/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@
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)
exponent = (byte & 0x7c) >> 2 # Extract exponent (5 bits)
mantissa = (byte & 0x03) << 5 # Extract mantissa (2 bits)
real_exp = exponent - 15 # Convert exponent from excess-7 to excess-127
value = (1 + mantissa / 4) * (2 ** float(real_exp)) # Calculate value
if sign:
value *= -1
return value


def main():
# Run simulation and get outputs
args = verification.parse_args()
Expand Down

0 comments on commit 185deb2

Please sign in to comment.