Skip to content

Instantly share code, notes, and snippets.

@ericspod
Last active April 14, 2025 16:43
Show Gist options
  • Save ericspod/310d7dc82acbb84c682ca28c1740cd52 to your computer and use it in GitHub Desktop.
Save ericspod/310d7dc82acbb84c682ca28c1740cd52 to your computer and use it in GitHub Desktop.
Pytorch Test Script
import torch
print("Version=",torch.__version__)
print("CUDA=",torch.cuda.is_available())
for i in range(torch.cuda.device_count()):
props=torch.cuda.get_device_properties(i)
print(f" {props.name}, mem={int(props.total_memory/2**20)}MiB")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment