Skip to content

Commit

Permalink
Document AutoChainRules
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle committed Mar 10, 2024
1 parent 0af4052 commit bc1554c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ Just run the following code in a Julia REPL to find out:
julia> using ADTypes

julia> names(ADTypes)
15-element Vector{Symbol}:
16-element Vector{Symbol}:
:ADTypes
:AutoChainRules
:AutoEnzyme
:AutoFiniteDiff
:AutoFiniteDifferences
Expand Down
9 changes: 9 additions & 0 deletions src/ADTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ abstract type AbstractSparseReverseMode <: AbstractReverseMode end
abstract type AbstractSparseForwardMode <: AbstractForwardMode end
abstract type AbstractSparseFiniteDifferences <: AbstractFiniteDifferencesMode end

"""
AutoChainRules{RC}
Chooses any AD library based on [ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl), given an appropriate [`RuleConfig`](https://juliadiff.org/ChainRulesCore.jl/stable/rule_author/superpowers/ruleconfig.html) object.
# Fields
- `ruleconfig::RC`
"""
Base.@kwdef struct AutoChainRules{RC} <: AbstractADType
ruleconfig::RC
end
Expand Down

0 comments on commit bc1554c

Please sign in to comment.