Skip to content

Commit

Permalink
Merge pull request #29 from SciML/gd/diffractor
Browse files Browse the repository at this point in the history
Add AutoDiffractor
  • Loading branch information
Vaibhavdixit02 authored Mar 11, 2024
2 parents 59ded48 + 41d5a38 commit 9f17b82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ADTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,15 @@ Base.@kwdef struct AutoSparseReverseDiff <: AbstractSparseReverseMode
compile::Bool = false
end

"""
AutoDiffractor
Chooses [Diffractor.jl](https://github.com/JuliaDiff/Diffractor.jl).
"""
struct AutoDiffractor <: AbstractADType end

export AutoChainRules,
AutoDiffractor,
AutoFiniteDiff,
AutoFiniteDifferences,
AutoForwardDiff,
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ struct CustomTag end
adtype = AutoEnzyme(; mode = Val(:Reverse))
@test adtype isa ADTypes.AbstractADType
@test adtype isa AutoEnzyme{Val{:Reverse}}

adtype = AutoDiffractor()
@test adtype isa ADTypes.AbstractADType
@test adtype isa AutoDiffractor
end

0 comments on commit 9f17b82

Please sign in to comment.