Skip to main content

Module ad

Module ad 

Source
Expand description

Automatic differentiation rules for StdTensorOp.

linearize and transpose_rule are separate graph-level contracts. Core ops keep their rules here. Extension semantic rules are owned by tenferro-ad; the private dispatcher below is only the context-owned bridge used while the core sweep remains graph based.

Modules§

context
AD context for guard-based shape resolution and value metadata queries.

Enums§

ADRuleError
ADRuleKind
PrimitiveTransposeInput

Traits§

PrimitiveRuleBuilder
Builder interface used by tenferro AD rules.

Functions§

linearize
Forward-mode AD (JVP) for StdTensorOp: given the primal op and its tangent inputs, emit the linearized graph into builder and return the output tangents.
transpose_rule
Reverse-mode AD (VJP) for StdTensorOp: given the primal op, its inputs, and the output cotangent, emit the transposed graph and return the input cotangents.

Type Aliases§

ADRuleResult