fn
policy_dtype
Dtype policy_dtype(AmpPolicy policy, Dtype input, Dtype autocast_dt, Device device)The dtype one eligible input computes in under policy while autocast_dt is active on device.
PromoteWidest needs the other inputs to mean anything, so for one
input it is KeepInput; AmpScope::cast_widest resolves it over all
of them. Promote with float16 on the CPU computes in float32, because
Accelerate has no float16 arithmetic.