check cuda version with pytorch code example Example: get version of cuda in pytorch torch.version.cuda