Skip to main content

semantic_vjp

Function semantic_vjp 

Source
pub fn semantic_vjp(
    input: &FrozenProgram,
    active_inputs: &[bool],
    active_outputs: &[bool],
    rules: &SemanticExtensionRuleSet,
) -> Result<SemanticAdProgram, SemanticAdTransformError>
Expand description

Build a reverse-mode derivative program using extension semantic rules.

active_inputs selects requested source-input cotangents and active_outputs selects source outputs that receive appended cotangent seeds. Both masks follow source order.

ยงErrors

Returns SemanticAdTransformError::ActivityArity for a mask-length mismatch, SemanticAdTransformError::Extension for a rejected extension rule, or the corresponding Query, Build, Finish, or unsupported operation/metadata variant for failures encountered during transformation.