Loading megatron/fp16/loss_scaler.py +4 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ # limitations under the License. import torch from apex.multi_tensor_apply import multi_tensor_applier import amp_C from megatron import mpu # item() is a recent addition, so this helps with backward compatibility. Loading Loading
megatron/fp16/loss_scaler.py +4 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ # limitations under the License. import torch from apex.multi_tensor_apply import multi_tensor_applier import amp_C from megatron import mpu # item() is a recent addition, so this helps with backward compatibility. Loading