nvitop/examples/select-devices-api/README.md

799 B

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.