Skip to content

Commit 6bff01d

Browse files
committed
mark as broken
1 parent eb76681 commit 6bff01d

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

test/reverse.jl

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module reverse_tests
22
using Diffractor
3-
using Diffractor: var"'", ∂⃖, DiffractorRuleConfig
3+
using Diffractor: ∂⃖, DiffractorRuleConfig
44
using ChainRules
55
using ChainRulesCore
66
using ChainRulesCore: ZeroTangent, NoTangent, frule_via_ad, rrule_via_ad
@@ -44,14 +44,6 @@ function simple_control_flow(b, x)
4444
end
4545
end
4646

47-
function myprod(xs)
48-
s = 1
49-
for x in xs
50-
s *= x
51-
end
52-
return s
53-
end
54-
5547
function mypow(x, n)
5648
r = one(x)
5749
while n > 0
@@ -79,10 +71,11 @@ let var"'" = Diffractor.PrimeDerivativeBack
7971
@test @inferred(sin'(1.0)) == cos(1.0)
8072
@test @inferred(sin''(1.0)) == -sin(1.0)
8173
@test @inferred(sin'''(1.0)) == -cos(1.0)
82-
# TODO These currently cause segfaults c.f. https://github.com/JuliaLang/julia/pull/48742
83-
# @test sin''''(1.0) == sin(1.0)
84-
# @test sin'''''(1.0) == cos(1.0)
85-
# @test sin''''''(1.0) == -sin(1.0)
74+
# FIXME: These error with:
75+
# Control flow support not fully implemented yet for higher-order reverse mode (TODO)
76+
@test_broken @inferred(sin''''(1.0)) == sin(1.0)
77+
@test_broken @inferred(sin'''''(1.0)) == cos(1.0)
78+
@test_broken @inferred(sin''''''(1.0)) == -sin(1.0)
8679

8780
f_getfield(x) = getfield((x,), 1)
8881
@test f_getfield'(1) == 1
@@ -93,10 +86,10 @@ let var"'" = Diffractor.PrimeDerivativeBack
9386

9487
complicated_2sin(x) = (x = map(sin, Diffractor.xfill(x, 2)); x[1] + x[2])
9588
@test @inferred(complicated_2sin'(1.0)) == 2sin'(1.0)
96-
@test @inferred(complicated_2sin''(1.0)) == 2sin''(1.0) broken=true
97-
@test @inferred(complicated_2sin'''(1.0)) == 2sin'''(1.0) broken=true
98-
# TODO This currently causes a segfault, c.f. https://github.com/JuliaLang/julia/pull/48742
99-
# @test @inferred(complicated_2sin''''(1.0)) == 2sin''''(1.0) broken=true
89+
# FIXME: These error with: Control flow support not fully implemented yet for higher-order reverse mode (TODO)
90+
@test_broken @inferred(complicated_2sin''(1.0)) == 2sin''(1.0)
91+
@test_broken @inferred(complicated_2sin'''(1.0)) == 2sin'''(1.0)
92+
@test_broken @inferred(complicated_2sin''''(1.0)) == 2sin''''(1.0)
10093

10194
# Control flow cases
10295
@test @inferred((x->simple_control_flow(true, x))'(1.0)) == sin'(1.0)

0 commit comments

Comments
 (0)