Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for the element-wise absolute value .
Saves the input x so the backward pass can recover
and scale the upstream gradient by it. The derivative is undefined at
; the implementation follows the reference framework's convention
of returning there (sub-gradient).
Math
\frac{\partial y}{\partial x} = \mathrm{sign}(x), \qquad \frac{\partial \mathcal{L}}{\partial x} = \mathrm{sign}(x)\,\frac{\partial \mathcal{L}}{\partial y}.$$Attributes
schema_v1OpSchemaRegistered as
"abs" with AmpPolicy::Promote.Notes
Dispatch: Accelerate vDSP_vabs (CPU) / MLX abs (GPU).