Python wrappers
Public Python APIs implemented by this engine symbol.Autograd node for the element-wise square root .
Saves the output because the backward formula is cheaper and numerically identical to recomputing . Defined for ; negative inputs produce NaN.
Math
\frac{\partial y}{\partial x} = \frac{1}{2\sqrt{x}} = \frac{1}{2y}, \qquad \frac{\partial \mathcal{L}}{\partial x} = \frac{1}{2y}\,\frac{\partial \mathcal{L}}{\partial y}, \quad x \geq 0.$$Attributes
schema_ v1OpSchemaRegistered as
"sqrt" with AmpPolicy::Promote.kSavesInputboolfalse.kSavesOutputbooltrue — saved tensor is .Notes
Dispatch: a correctly rounded root on CPU (vvsqrt for F64, a plain loop
for F32 because vvsqrtf is not exact — backend/cpu/Vforce.cpp) / MLX
sqrt (GPU).
Gradient is unbounded as .