Megatron-LM
Megatron-LM copied to clipboard
why `expand_as` is required in param backprop hook registering?
Your question In DDP tensor backprop processing, the param is expanded to get grad_fn and register a hook to that fn, why is that operation required? can we just get the param.grad_fn and register hook to that?
see code: https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/model/distributed.py#L350
Marking as stale. No activity in 60 days.