std :: ml::gpu_rocm
Function std::rocm_half_unscale_many
int rocm_half_unscale_many(
const &Vec<struct RocmHalfBuf> src,
const &Vec<struct RocmBuf> dst,
float scale,
struct RocmBuf flag,
)Gradient unscaling: dst[i] = src[i] * scale in fp32 (16-bit or fp32 sources; the fp32 form may work in place, dst == src), and flag[0] = 1 when any result is inf or NaN. The flag is only ever set: zero it (rocm_zero) before the step.