| import torch | |
| print("available", torch.cuda.is_available()) | |
| tensor = torch.zeros(1, device="cuda") | |
| print("allocated", tensor) | |
| print("device", torch.cuda.get_device_name(0)) | |
| import torch | |
| print("available", torch.cuda.is_available()) | |
| tensor = torch.zeros(1, device="cuda") | |
| print("allocated", tensor) | |
| print("device", torch.cuda.get_device_name(0)) | |