diff --git a/docs/make.jl b/docs/make.jl index d6c4f3b878..370772ce3c 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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", diff --git a/docs/src/reference/training/enzyme.md b/docs/src/reference/training/enzyme.md new file mode 100644 index 0000000000..b1dc34dd92 --- /dev/null +++ b/docs/src/reference/training/enzyme.md @@ -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}...) +``` diff --git a/docs/src/reference/training/zygote.md b/docs/src/reference/training/zygote.md index 5641f4db23..ddf65917a1 100644 --- a/docs/src/reference/training/zygote.md +++ b/docs/src/reference/training/zygote.md @@ -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