Skip to content

Commit bf6c547

Browse files
authored
Fix ci (#2615)
* Fix ci * Refactor f_simple_exc and uns_ad_forward functions Refactor f_simple_exc function and update uns_ad_forward implementation.
1 parent 724e6e4 commit bf6c547

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ end
606606
end
607607

608608
@testset "Simple Exception" begin
609+
f_simple_exc(x, i) = x[i]
609610
y = [1.0, 2.0]
610611
f_x = zero.(y)
611612
@test_throws BoundsError autodiff(Reverse, f_simple_exc, Duplicated(y, f_x), Const(0))
@@ -3426,8 +3427,7 @@ function uns_sum2(x::Array{T})::T where T
34263427
return v
34273428
end
34283429

3429-
function uns_ad_forward(scale_diag::Vector{T}, c) where T
3430-
ccall(:jl_, Cvoid, (Any,), scale_diag)
3430+
function uns_ad_forward(scale_diag::Vector{T}, c) where T
34313431
res = uns_mymean(uns_sum2, [scale_diag,], T, c)
34323432
return res
34333433
end

0 commit comments

Comments
 (0)