File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
name = " ChainRulesTestUtils"
2
2
uuid = " cdddcdb0-9152-4a09-a978-84456f9df70a"
3
- version = " 1.7.0 "
3
+ version = " 1.7.1 "
4
4
5
5
[deps ]
6
6
ChainRulesCore = " d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ function test_rrule(
227
227
end
228
228
229
229
if check_thunked_output_tangent
230
- test_approx (ad_cotangents, pullback (@thunk (ȳ)), " pulling back a thunk:" )
230
+ test_approx (ad_cotangents, pullback (@thunk (ȳ)), " pulling back a thunk:" ; isapprox_kwargs ... )
231
231
check_inferred && _test_inferred (pullback, @thunk (ȳ))
232
232
end
233
233
end # top-level testset
Original file line number Diff line number Diff line change 683
683
function ChainRulesCore. rrule (:: typeof (my_id), x)
684
684
my_id_pb (ȳ) = (NoTangent (), ȳ)
685
685
function my_id_pb (ȳ:: AbstractThunk )
686
- precision = rand () > 0.5 ? Float64 : Float32
686
+ # We use a condition that always evaluates to true to avoid issues with tolerances
687
+ # (see https://github.com/JuliaDiff/ChainRulesTestUtils.jl/pull/247)
688
+ # The function is type unstable for `Float64` inputs nevertheless
689
+ precision = rand () >= 0.0 ? Float64 : Float32
687
690
return (NoTangent (), precision (unthunk (ȳ)))
688
691
end
689
692
return x, my_id_pb
You can’t perform that action at this time.
0 commit comments