--- id: gputil version: "1.4.0" license: MIT license_treatment: permissive maintenance: active --- # GPUtil — GPUtil is a Python module for getting the GPU status from NVIDA GPUs using nvidia-smi. License: permissive · Maintenance: active · Downloads: 742.5K/mo ## What it is and what it does GPUtil is a thin Python wrapper around nvidia-smi that detects available NVIDIA GPUs and ranks them by current load and memory consumption. It was designed to help deep learning frameworks automatically select idle GPUs, but works for any task needing GPU availability data. The module has no external dependencies beyond Python's standard library, making it lightweight to install—but it only works on systems with NVIDIA hardware and drivers installed. The package provides two main functions: getAvailable() returns a filtered, ordered list of GPU device IDs based on load and memory thresholds, and getFirstAvailable() blocks until a GPU meeting those criteria becomes available, with configurable retry logic. It also includes utility functions to display current GPU status. Since its last release in 2018, the package has not been updated despite ongoing repository activity, which may affect compatibility with newer NVIDIA driver versions or Python releases. Use it for: - Automatically select an idle GPU before launching a deep learning training job to avoid resource conflicts. - Monitor GPU utilization in a separate thread and log or alert when specific GPUs exceed load or memory thresholds. - Implement a queue system that waits for a GPU to become available before starting a compute task, with configurable retry intervals. - Rank multiple GPUs by current memory usage to assign workloads to the least-loaded device. - Exclude specific GPUs from selection (by ID or UUID) to reserve them for other processes or tasks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. GPUtil queries NVIDIA GPU status and availability by wrapping nvidia-smi, returning ordered lists of GPUs filtered by current load and memory usage. Yes, if you have NVIDIA hardware and need lightweight GPU availability detection. The package is stable, has no external dependencies, and works well for its narrow purpose. However, be cautious: it has not been updated since 2018, so compatibility with very recent NVIDIA drivers or Python versions is unverified. For production systems or modern deep learning frameworks, verify first that it works with your specific CUDA and driver versions. ## Install pip install gputil uv add gputil poetry add gputil ## Installing GPUtil Before you install: No runtime dependencies beyond Python standard library, but requires an NVIDIA GPU with nvidia-smi installed on the system. Package has been inactive since 2018 (latest release 2018-12-18) despite recent repository activity, which may indicate maintenance gaps for newer CUDA/driver versions. License in practice: MIT license is permissive; you can use, modify, and distribute GPUtil with minimal restrictions, provided you retain the license notice. Quickstart: pip install gputil import GPUtil deviceIDs = GPUtil.getAvailable(order='first', limit=1, maxLoad=0.5, maxMemory=0.5) print(deviceIDs) Requires NVIDIA GPU with nvidia-smi installed and accessible in PATH; will fail on non-NVIDIA systems or without proper NVIDIA drivers. Verify before relying: - Compatibility with modern CUDA versions and recent NVIDIA driver releases (last package release was 2018). - Whether the package works reliably on current Python versions beyond 3.5 (tested version noted in description). - Support status for multi-GPU selection patterns in contemporary deep learning frameworks. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: active - Downloads: 742.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags nvidia gpu status query, gpu availability selection, gpu memory load monitoring, select available gpu, nvidia-smi wrapper python, gpu utilization check, deep learning gpu picker, gpu-selection, nvidia-smi-wrapper, hardware-monitoring [View on SkillFed](https://skillfed.io/packages/gputil) · [View on PyPI](https://pypi.org/project/gputil/)