Skip to content

Commit

Permalink
Merge pull request #26 from gdalle/docstring_chainrules
Browse files Browse the repository at this point in the history
Document AutoChainRules
  • Loading branch information
Vaibhavdixit02 authored Mar 11, 2024
2 parents 0af4052 + aa4e1a9 commit 4bd7704
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ADTypes"
uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
authors = ["Vaibhav Dixit <[email protected]> and contributors"]
version = "0.2.6"
version = "0.2.7"

[compat]
julia = "1.6"
Expand Down
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 4bd7704

Please sign in to comment.