Skip to content

Instantly share code, notes, and snippets.

@luminoso
Created January 22, 2020 10:20
Show Gist options
  • Save luminoso/f331c4f5be1258647d134f004aa56634 to your computer and use it in GitHub Desktop.
Save luminoso/f331c4f5be1258647d134f004aa56634 to your computer and use it in GitHub Desktop.
test CUDA avaialbility pytorch
# tests the avalability of cuda for pytorch
import torch
torch.cuda.current_device()
torch.cuda.device(0)
torch.cuda.device_count()
torch.cuda.get_device_name(0)
torch.cuda.is_available()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment