There are a bunch of scripts to visualize the graph floating around the internet, but I don’t think it’s part of core PyTorch.
You can also just inspect the grad_fn attribute and grad_fn.next_functions to manually verify.