oa::ml::optim::clip_parameter_grad_norm
Clip the combined L2 norm of accumulated Parameter gradients. This is the parameter-level form of clip_grad_norm: each parameter’s live gradient handle is collected, parameters without a gradient are skipped, and gradient values are rescaled so a following Optimizer::step observes clipped values. Up to sixteen nonempty gradients scale in place through the fused two-pass kernel; larger models take an equivalent device-resident reduction and broadcast-rescale path that stores a detached replacement gradient. Call between backward and the optimizer step. Inside crate::ml::Training::step the call belongs in the record closure so the rescale is captured into the training program; in eager steps it belongs before crate::ml::Training::complete_step. Errors Returns an error when max_norm is negative or non-finite, gradients do not share one runtime or are not FP32, storages are duplicated on the fused path, a size exceeds the shader ABI, or allocation and runtime recording fail.