Thank you for the quick answer.
I actually used “torch.version.cuda” and checked it as in my original post (and it was 10.2). However, I was wondering why it still works with the setting “CUDA_PATH=/opt/NVIDIA/cuda-9.1”. In other words, how it finds the correct cuda version to use (or which environment variable it uses to do so) in run-time?