|
| 1 | +module AbstractDifferentiationTests |
| 2 | + |
1 | 3 | using AbstractDifferentiation, Diffractor, Test, LinearAlgebra, ChainRulesCore
|
2 | 4 | import AbstractDifferentiation as AD
|
3 | 5 | backend = Diffractor.DiffractorForwardBackend()
|
@@ -36,36 +38,37 @@ include(joinpath(pathof(AbstractDifferentiation), "..", "..", "test", "test_util
|
36 | 38 | @testset for backend in backends
|
37 | 39 | @test backend isa AD.AbstractForwardMode
|
38 | 40 |
|
39 |
| - @testset "Derivative" begin #setfield!(::Core.Box, ::Symbol, ::Float64) |
40 |
| - @test_broken test_derivatives(backend) |
| 41 | + @testset "Derivative" begin |
| 42 | + test_derivatives(backend) |
41 | 43 | end
|
42 |
| - @testset "Gradient" begin #Diffractor.TangentBundle{1, Float64, Diffractor.TaylorTangent{Tuple{Float64}}}(::Float64, ::Tuple{Float64}) |
| 44 | + @testset "Gradient" begin # no method matching size(::ZeroTangent) |
43 | 45 | @test_broken test_gradients(backend)
|
44 | 46 | end
|
45 | 47 | @testset "Jacobian" begin #setfield!(::Core.Box, ::Symbol, ::Vector{Float64})
|
46 |
| - @test_broken test_jacobians(backend) |
| 48 | + test_jacobians(backend) |
47 | 49 | end
|
48 |
| - @testset "Hessian" begin #setindex!(::ChainRulesCore.ZeroTangent, ::Float64, ::Int64) |
| 50 | + @testset "Hessian" begin # no method matching (Diffractor.TangentBundle{…} where P)(::Tuple{…}, ::Tuple{…}) |
49 | 51 | @test_broken test_hessians(backend)
|
50 | 52 | end
|
51 |
| - @testset "jvp" begin #setfield!(::Core.Box, ::Symbol, ::Vector{Float64}) |
52 |
| - @test_broken test_jvp(backend; vaugmented=true) |
| 53 | + @testset "jvp" begin # Expression: pf1[1] isa Vector{Float64} |
| 54 | + @test_broken false # test_jvp(backend; vaugmented=true) |
53 | 55 | end
|
54 |
| - @testset "j′vp" begin #setfield!(::Core.Box, ::Symbol, ::Vector{Float64}) |
55 |
| - @test_broken test_j′vp(backend) |
| 56 | + @testset "j′vp" begin # no method matching *(::Diffractor.PrimeDerivativeBack{1, Diagonal{Bool, Vector{Bool}}}, ::Vector{Float64}) |
| 57 | + @test_broken false #test_j′vp(backend) |
56 | 58 | end
|
57 | 59 | @testset "Lazy Derivative" begin
|
58 | 60 | test_lazy_derivatives(backend)
|
59 | 61 | end
|
60 |
| - @testset "Lazy Gradient" begin #Diffractor.TangentBundle{1, Float64, Diffractor.TaylorTangent{Tuple{Float64}}}(::Float64, ::Tuple{Float64}) |
| 62 | + @testset "Lazy Gradient" begin #MethodError: no method matching size(::ZeroTangent) |
61 | 63 | @test_broken test_lazy_gradients(backend)
|
62 | 64 | end
|
63 |
| - @testset "Lazy Jacobian" begin #MethodError: no method matching *(::Diffractor.PrimeDerivativeBack{1, Diagonal{Bool, Vector{Bool}}}, ::Vector{Float64}) |
64 |
| - @test_broken test_lazy_jacobians(backend; vaugmented=true) |
| 65 | + @testset "Lazy Jacobian" begin # no method matching *(::Diffractor.PrimeDerivativeBack{1, Diagonal{Bool, Vector{Bool}}}, ::Vector{Float64}) |
| 66 | + @test_broken false #test_lazy_jacobians(backend) |
65 | 67 | end
|
66 |
| - @testset "Lazy Hessian" begin # everything everywhere all at once is broken |
67 |
| - @test_broken test_lazy_hessians(backend) |
| 68 | + @testset "Lazy Hessian" begin # ERROR: MethodError: no method matching *(::Vector{Float64}, ::Diffractor.PrimeDerivativeBack{1, Vector{Float64}}) |
| 69 | + @test_broken false #test_lazy_hessians(backend) |
68 | 70 | end
|
69 | 71 | end
|
70 | 72 | end
|
71 | 73 |
|
| 74 | +end #module AbstractDifferentiationTests |
0 commit comments