From 3ad9a9b18845d2378908f9e1a39603b8d51f20d3 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Thu, 10 Oct 2024 08:02:25 +0200 Subject: [PATCH] Add docstring for `guess_activity` --- src/compiler.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compiler.jl b/src/compiler.jl index 32dd293ece..74a591c940 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -846,6 +846,11 @@ end return rt == Enzyme.Compiler.AnyState || rt == Enzyme.Compiler.DupState end +""" + Enzyme.guess_activity(::Type{T}, mode::Enzyme.Mode) + +Try to guess the most appropriate [`Annotation`](@ref) for arguments of type `T` passed to [`autodiff`](@ref) with a given `mode`. +""" @inline Enzyme.guess_activity(::Type{T}, mode::Enzyme.Mode) where {T} = guess_activity(T, convert(API.CDerivativeMode, mode))