check if pytorch gpu is installed code example Example: check cuda version pytorch torch.version.cuda