Function std::half_grads_accumulate
generic<E> int half_grads_accumulate(
const &Vec<&DenseTensor<E>> grads,
&Vec<&FloatTensor> params,
float invScale,
)params[i].grad += grads[i] * invScale (allocating the gradient if needed). Returns 1 if every resulting gradient value is finite -- the LossScaler::update argument -- and 0 on an overflow or a size mismatch.