The temporary results are not linked to the nn.Module, that means that you can reuse it multiple times without any problem.
The two above snippets will give you the same gradients and are both correct.