mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-22 06:05:47 -06:00
| .. | ||
| README.md | ||
| select_devices_api.py | ||
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— supportsformat='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.