main_param not initialized when param.type() not in ['torch.cuda.HalfTensor', 'torch.cuda.BFloat16Tensor']
main_param is not initialized when param.type() not in ['torch.cuda.HalfTensor', 'torch.cuda.BFloat16Tensor']
but it is used in the following line:

https://github.com/NVIDIA/NeMo/blob/f4afdf07ad742bdb2f45135f05d5d7dd8270eb51/nemo/core/optim/optimizer_with_main_params.py#L305