if cuda is avialable device = cuda code example Example: check cuda version pytorch torch.version.cuda