Skip to content

Commit

Permalink
gemm: Check for NaNs and use different error threshold for different …
Browse files Browse the repository at this point in the history
…precisions
  • Loading branch information
fischeti committed Feb 12, 2024
1 parent 185deb2 commit ae717f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sw/blas/gemm/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def main():
c_golden = golden_model(1, a, b, beta, c).flatten()

absolute_err = np.absolute(c_golden - c_actual)
fail = np.any(absolute_err > ERR_THRESHOLD)
if (fail):
fail = np.any(absolute_err > ERR_THRESHOLD[prec]) or np.isnan(c_actual).any()
if fail:
print('Simulation results are incorrect.')
verification.dump_results_to_csv([c_golden, c_actual, absolute_err],
Path.cwd() / 'results.csv')
Expand Down

0 comments on commit ae717f1

Please sign in to comment.