Since PyTorch 0.1.12 (if I am not wrong), they have included a torch.__version__ attribute that helps you find out which version of PyTorch you are using.
Run torch.__version__ on a Python interpreter after importing PyTorch to find out.