how to check if gpu is being used pytorch code example Example: check cuda version pytorch torch.version.cuda