Autograd node for the element-wise cube .
Saves the input x so the backward pass can build in
grad_formula and multiply it against the upstream gradient.
Math
\frac{\partial y}{\partial x} = 3x^2, \qquad \frac{\partial \mathcal{L}}{\partial x} = 3x^2\,\frac{\partial \mathcal{L}}{\partial y}.$$Attributes
schema_v1OpSchemaRegistered as
"cube" with AmpPolicy::Promote.Notes
Dispatch: dedicated Accelerate kernel (CPU) / MLX element-wise cube (GPU).