diff --git a/sw/blas/gemm/verify.py b/sw/blas/gemm/verify.py index 02f9249ef7..a2ef572efe 100755 --- a/sw/blas/gemm/verify.py +++ b/sw/blas/gemm/verify.py @@ -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')