nvitop/examples/select-devices-api
2026-05-16 15:37:30 +08:00
..
README.md feat(examples): add examples/ folder and relocate the deprecated nvitop.callbacks (#216) 2026-05-16 15:34:29 +08:00
select_devices_api.py chore: update license header 2026-05-16 15:37:30 +08:00

Programmatic CUDA Device Selection

Shows nvitop.select_devices — the Python API behind the nvisel CLI. Useful for scripts that need to pick GPUs based on free memory, utilization, or other criteria before launching a training job.

APIs Used

  • nvitop.select_devices — supports format='index' | 'uuid' | 'device', min_count, min_free_memory, max_gpu_utilization, and more.

Run

python3 examples/select-devices-api/select_devices_api.py

Requires only nvitop itself; no other dependencies.

See ../README.md for the full example index.