Skip to content

Commit

Permalink
tests/functions/Distribution: Add special case result for PTX fp32 test
Browse files Browse the repository at this point in the history
PTX results for fp32 DDA function with neg input differ due to operation
accuracy/rounding.

Signed-off-by: Jan Vesely <[email protected]>
  • Loading branch information
jvesely committed Apr 29, 2022
1 parent 5e8fc13 commit 4aa8dae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/functions/test_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ def test_execute(func, variable, params, prng, llvm_skip, expected, benchmark, f
benchmark.group = "TransferFunction " + func.componentName
if func_mode != 'Python':
precision = pytest.helpers.llvm_current_fp_precision()
# PTX needs only one special case, this is not worth adding
# it to the mechanism above
if func_mode == "PTX" and expected is dda_expected_negative:
expected = (0.4236549735069275, 5.960464477539063e-08,
0.5173678398132324, 0.06942889094352722, 6.303247451782227,
1.4934064149856567, 0.42889145016670227, 1.7737685441970825)
expected = llvm_expected.get(precision, {}).get(expected, expected)

if expected is None:
Expand Down

0 comments on commit 4aa8dae

Please sign in to comment.