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