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 ops own their own AD support through the extension trait.

Modules§

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

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.