Skip to content

Commit

Permalink
add an Enzyme docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Nov 5, 2024
1 parent 9740c38 commit 60acf27
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ makedocs(
"Flat vs. Nested" => "reference/destructure.md",
"Callback Helpers" => "reference/training/callbacks.md",
"Gradients -- Zygote.jl" => "reference/training/zygote.md",
"Gradients -- Enzyme.jl" => "reference/training/enzyme.md",
"Transfer Data to GPU -- MLDataDevices.jl" => "reference/data/mldatadevices.md",
"Batching Data -- MLUtils.jl" => "reference/data/mlutils.md",
"OneHotArrays.jl" => "reference/data/onehot.md",
Expand Down
9 changes: 9 additions & 0 deletions docs/src/reference/training/enzyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# [Automatic Differentiation using Enzyme.jl](@id autodiff-enzyme)

Flux now builds in support for Enzyme.jl

```@docs
gradient(f, args::Union{EnzymeCore.Const, EnzymeCore.Duplicated}...)
Flux.withgradient(f, args::Union{EnzymeCore.Const, EnzymeCore.Duplicated}...)
```
4 changes: 3 additions & 1 deletion docs/src/reference/training/zygote.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ CollapsedDocStrings = true

# [Automatic Differentiation using Zygote.jl](@id autodiff-zygote)

Flux re-exports the `gradient` from [Zygote](https://github.com/FluxML/Zygote.jl), and uses this function within [`train!`](@ref Flux.train!) to differentiate the model. Zygote has its own [documentation](https://fluxml.ai/Zygote.jl/dev/), in particular listing some [important limitations](https://fluxml.ai/Zygote.jl/dev/limitations/).
Flux's `gradient` function uses [Zygote](https://github.com/FluxML/Zygote.jl) by default, and also uses this function within [`train!`](@ref Flux.train!) to differentiate the model.
Zygote has its own [documentation](https://fluxml.ai/Zygote.jl/dev/), in particular listing some [important limitations](https://fluxml.ai/Zygote.jl/dev/limitations/).

Flux also has support for Enzyme.jl, documented [on its own page](@ref autodiff-enzyme).

## Explicit style

Expand Down

0 comments on commit 60acf27

Please sign in to comment.