Skip to content

Commit 80dae08

Browse files
Use FDM call instead of jvp in rrule_test
1 parent af850a0 commit 80dae08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRulesTestUtils"
22
uuid = "cdddcdb0-9152-4a09-a978-84456f9df70a"
3-
version = "0.1.1"
3+
version = "0.1.2"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/ChainRulesTestUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function rrule_test(f, ȳ, xx̄s::Tuple{Any, Any}...; rtol=1e-9, atol=1e-9, fdm
174174
@test ∂self === NO_FIELDS
175175

176176
# Correctness testing via finite differencing.
177-
x̄s_fd = j′vp(fdm, f, ȳ, xs...)
177+
x̄s_fd = _make_fdm_call(fdm, f, ȳ, xs, x̄s .== nothing)
178178
map(x̄s_ad, x̄s_fd) do x̄_ad, x̄_fd
179179
@test isapprox(x̄_ad, x̄_fd; rtol=rtol, atol=atol, kwargs...)
180180
end

0 commit comments

Comments
 (0)