Skip to content

Commit c370d96

Browse files
committed
Add enzyme_autodiff doc comment
1 parent 3aa5c8e commit c370d96

File tree

1 file changed

+11
-0
lines changed
  • library/core/src/intrinsics

1 file changed

+11
-0
lines changed

library/core/src/intrinsics/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3163,6 +3163,17 @@ pub const unsafe fn copysignf64(x: f64, y: f64) -> f64;
31633163
#[rustc_intrinsic]
31643164
pub const unsafe fn copysignf128(x: f128, y: f128) -> f128;
31653165

3166+
/// Generates the LLVM body for the automatic differentiation of `f` using Enzyme,
3167+
/// with `df` as the derivative function and `args` as its arguments.
3168+
///
3169+
/// Used internally as the body of `df` when expanding the `#[autodiff_forward]`
3170+
/// and `#[autodiff_reverse]` attribute macros.
3171+
///
3172+
/// Type Parameters:
3173+
/// - `F`: The original function to differentiate. Must be a function item.
3174+
/// - `G`: The derivative function. Must be a function item.
3175+
/// - `T`: A tuple of arguments passed to `df`.
3176+
/// - `R`: The return type of the derivative function.
31663177
#[rustc_nounwind]
31673178
#[rustc_intrinsic]
31683179
pub const fn enzyme_autodiff<F, G, T: crate::marker::Tuple, R>(f: F, df: G, args: T) -> R;

0 commit comments

Comments
 (0)