You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/EnzymeCore/src/EnzymeCore.jl
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -258,7 +258,7 @@ Abstract type for which differentiation mode will be used.
258
258
- `ABI`: what runtime [`ABI`](@ref) to use
259
259
- `ErrIfFuncWritten`: whether to error when the function differentiated is a closure and written to.
260
260
- `RuntimeActivity`: whether to enable runtime activity (default off). Runtime Activity is required is the differentiability of all mutable variables cannot be determined statically. For a deeper explanation see the [FAQ](@ref faq-runtime-activity)
261
-
- `StrongZero`: whether to enforce that propagating a zero derivative input always ends up in zero derivative outputs. This is required to avoid nan's if one of the arguments may be infinite or nan. For a deeper explanation see the [FAQ](@ref faq-runtime-activity)
261
+
- `StrongZero`: whether to enforce that propagating a zero derivative input always ends up in zero derivative outputs. This is required to avoid nan's if one of the arguments may be infinite or nan. For a deeper explanation see the [FAQ](@ref faq-strong-zero)
262
262
263
263
!!! warning
264
264
The type parameters of `Mode` are not part of the public API and can change without notice.
@@ -271,6 +271,24 @@ Abstract type for which differentiation mode will be used.
271
271
"""
272
272
abstract type Mode{ABI, ErrIfFuncWritten, RuntimeActivity, StrongZero} end
273
273
274
+
"""
275
+
runtime_activity(::Mode)
276
+
strong_zero(::Type{<:Mode})
277
+
278
+
Returns whether the given mode has runtime activity set. For a deeper explanation of what strong zero is see the [FAQ](@ref faq-runtime-activity)
279
+
"""
280
+
runtime_activity(::Mode{<:Any, <:Any, RuntimeActivity}) where RuntimeActivity = RuntimeActivity
281
+
runtime_activity(::Type{<:Mode{<:Any, <:Any, RuntimeActivity}}) where RuntimeActivity = RuntimeActivity
282
+
283
+
"""
284
+
strong_zero(::Mode)
285
+
strong_zero(::Type{<:Mode})
286
+
287
+
Returns whether the given mode has strong zero set. For a deeper explanation of what strong zero is see the [FAQ](@ref faq-strong-zero)
288
+
"""
289
+
strong_zero(::Mode{<:Any, <:Any, <:Any, StrongZero}) where StrongZero = StrongZero
290
+
strong_zero(::Type{<:Mode{<:Any, <:Any, <:Any, StrongZero}}) where StrongZero = StrongZero
0 commit comments