Internal API
This is the documentation of Enzymes's internal API. The internal API is not subject to semantic versioning and may change at any time and without deprecation.
Enzyme.Compiler.EnzymeError — Type
EnzymeErrorCommon supertype for Enzyme-specific errors.
This type is made public so that downstream packages can add custom error hints for the most common exceptions thrown by Enzyme.
sourceEnzyme.Compiler.batch_call_same_with_inverted_arg_if_active! — Method
Helper function for llvm-level rule generation. Will call callsamewithinvertedargifactive with corresponding extracted batches if width > 1, otherwise it will call it once.
sourceEnzyme.Compiler.call_same_with_inverted_arg_if_active! — Method
Helper function for llvm-level rule generation. Will call the same function (and optional postprocessing), if the argument at index cmpidx isn't active. This takes into account runtime activity as a reason the value may not be active.
If postprocess_const is set, the original function will always be called, but the postprocessing will be conditionally gated as follows.
If the relevant input is active (and verified by runtime activity), postprocess(B, result, args) will run as normal Otherwise postprocess_const(B, result, args) will run
sourceEnzyme.guess_activity — Method
Enzyme.guess_activity(::Type{T}, mode::Enzyme.Mode)Try to guess the most appropriate Annotation for arguments of type T passed to autodiff with a given mode.