Upgrade Thor jtop / jetson-stats to current release to get GPU Memory use and other improvements.
sudo -v
curl -LsSf https://raw.githubusercontent.com/rbonghi/jetson_stats/master/scripts/upgrade-jtop.sh | bash
If you don’t have a gpu using process running you can use this as proof of concept test. Replace “/usr/bin/env python” with the venv python path where you have pytorch installed.
#!/usr/bin/env python
import torch
import time
print("CUDA available:", torch.cuda.is_available())
print("Device:", torch.cuda.get_device_name(0))
# Allocate about 4 GiB on GPU
gb = 4
x = torch.empty((gb * 1024**3 // 4,), dtype=torch.float32, device="cuda")
print(f"Allocated approximately {gb} GiB on GPU.")
print("Sleeping. Press Ctrl-C to stop.")
while True:
time.sleep(1)
Nvidia, I would have added to FAQ but I can’t edit it.