If we have the latest Nvidia driver, we can install pytorch with cuda in 3 ways:
conda install pytorch cudatoolkit=9.2 -c pytorch
conda install pytorch cudatoolkit=10.1 -c pytorch
conda install pytorch cudatoolkit=10.2 -c pytorch
All three methods work. So what is the difference among installed pytorchs with 3 types of cuda? Such as running efficiency or features?
in a nutshell, you get more optimizations, fixes, etc.
sometimes newer versions interduce some bugs, in which case, you check and if that affects you, you use the former (bug-free) version.
in any case, as a rule of thumb try to use the latest version unless you have a good reason not to (compatibility issues, etc in your environment or pipeline for example)
Also you can always check the changelog and see whats new/different compared to the former version.