Hi,
The autograd will keep track of all ops in pytorch with the following exceptions:

If you detach() a Tensor, because this function means: “Give me a new Tensor without tracking gradients”
If you perform ops in a with torch.no_grad() block for the same reason as above
If you perform non-pytorch ops
If you perform non-differentiable pytorch ops (like argmax).