Hi,
Within the first forward call during the checkpoint, the gradients are not tracked, so any operation will set the grad_fn to None. You can check whether or not the gradients are tracked with torch.is_grad_enabled().