Skip to content

Commit

Permalink
changing GPU tol
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmorgan98 committed May 15, 2024
1 parent ba2f569 commit ac759b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/regression/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
print(
Fore.YELLOW + "Note: Skipping %s (GPU target)" % name + Style.RESET_ALL
)
tol = 1e-9
if (target == "gpu"):
tol = 1e-6
Fore.CYAN
print(Fore.YELLOW + 'Note: tolerance increased to ', tol, '(GPU target)')
names = temp

# Data for each test
Expand Down Expand Up @@ -138,7 +143,7 @@
b = answer[result_name][:]

# Passed?
if np.isclose(a, b).all():
if np.isclose(a, b, rtol=tol).all():
print(
Fore.GREEN
+ " {}: Passed".format(score + "/" + result)
Expand Down

0 comments on commit ac759b7

Please sign in to comment.