Skip to content

Commit 0218fff

Browse files
committed
test: more fixes
1 parent 4773238 commit 0218fff

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

test/integration/linear_algebra.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,10 @@ end
383383
B = rand(T, 4, 3)
384384
B_ra = Reactant.to_rarray(B)
385385

386-
@test @jit(solve_with_lu(A_ra, b_ra)) solve_with_lu(A, b)
387-
@test @jit(solve_with_lu(A_ra, B_ra)) solve_with_lu(A, B)
386+
@test @jit(solve_with_lu(A_ra, b_ra)) solve_with_lu(A, b) atol = 1e-4 rtol =
387+
1e-2
388+
@test @jit(solve_with_lu(A_ra, B_ra)) solve_with_lu(A, B) atol = 1e-4 rtol =
389+
1e-2
388390
end
389391
end
390392

@@ -401,8 +403,10 @@ end
401403
B = rand(T, 4, 5, 3, 2)
402404
B_ra = Reactant.to_rarray(B)
403405

404-
@test @jit(solve_with_lu(A_ra, b_ra)) solve_with_lu_batched(A, b)
405-
@test @jit(solve_with_lu(A_ra, B_ra)) solve_with_lu_batched(A, B)
406+
@test @jit(solve_with_lu(A_ra, b_ra)) solve_with_lu_batched(A, b) atol = 1e-4 rtol =
407+
1e-2
408+
@test @jit(solve_with_lu(A_ra, B_ra)) solve_with_lu_batched(A, B) atol = 1e-4 rtol =
409+
1e-2
406410
end
407411
end
408412

@@ -412,6 +416,7 @@ end
412416
A_ra = Reactant.to_rarray(A)
413417
B_ra = Reactant.to_rarray(B)
414418

415-
@test @jit(solve_with_lu(A_ra, B_ra)) solve_with_lu_batched(A, B)
419+
@test @jit(solve_with_lu(A_ra, B_ra)) solve_with_lu_batched(A, B) atol = 1e-4 rtol =
420+
1e-2
416421
end
417422
end

test/integration/special_functions.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ macro ≈(a, b)
99
end
1010

1111
@testset "gamma" begin
12-
@test SpecialFunctions.gamma(0.5) @jit(SpecialFunctions.gamma(ConcreteRNumber(0.5)))
12+
@test SpecialFunctions.gamma(0.5) @jit(SpecialFunctions.gamma(ConcreteRNumber(0.5))) atol =
13+
1e-5 rtol = 1e-3
1314
@test SpecialFunctions.gamma(Int32(2))
1415
@jit(SpecialFunctions.gamma(ConcreteRNumber(Int32(2)))) atol = 1e-5 rtol = 1e-3
1516
end

0 commit comments

Comments
 (0)