Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Robotic Tooling
  3. gputil

gputil

MITPythonv1.4.0

A Python module for programmatically retrieving NVIDIA GPU status and selecting available GPUs based on memory and load.

GitHubGitHub
1.2k stars130 forks0 contributors

What is gputil?

GPUtil is a Python module that provides programmatic access to NVIDIA GPU status via the `nvidia-smi` command-line tool. It helps developers identify available GPUs based on current memory and load thresholds, automating GPU selection for tasks like deep learning training and computational workloads. The module simplifies GPU resource management in multi-GPU setups without requiring external dependencies.

Target Audience

Developers and researchers working with NVIDIA GPUs in Python, especially those in deep learning, scientific computing, or any field requiring efficient GPU resource allocation. It is particularly useful for teams managing shared GPU servers or running multi-GPU experiments.

Value Proposition

GPUtil offers a straightforward, dependency-free way to interact with NVIDIA GPUs, eliminating the need to manually parse `nvidia-smi` output. Its flexible filtering and ordering options make it ideal for automating GPU selection, saving time and reducing errors in GPU-intensive workflows.

Overview

A Python module for getting the GPU status from NVIDA GPUs using nvidia-smi programmically in Python

Use Cases

Best For

  • Automatically selecting idle GPUs for deep learning training jobs
  • Monitoring GPU utilization across multiple NVIDIA devices in real-time
  • Integrating GPU availability checks into TensorFlow or Caffe pipelines
  • Managing GPU resources in shared computing environments or labs
  • Building custom GPU scheduling or orchestration tools
  • Running GPU-dependent scripts that require specific memory/load thresholds

Not Ideal For

  • Environments with AMD or non-NVIDIA GPUs, as it exclusively relies on NVIDIA's `nvidia-smi` tool.
  • Production clusters requiring advanced job scheduling, resource quotas, or container orchestration, where tools like Kubernetes GPU plugins are more suitable.
  • Applications needing real-time, sub-second GPU monitoring, as `nvidia-smi` sampling rates may introduce latency.

Pros & Cons

Pros

Dependency-Free Simplicity

Uses only Python's standard library, making it easy to install and run without external dependencies, as shown in the README's minimal requirements.

Flexible GPU Selection

Offers multiple ordering options (by ID, load, memory, or random) and customizable thresholds for load and memory, allowing tailored availability checks.

Ready-to-Use Examples

Includes practical integration examples for deep learning frameworks like TensorFlow and Caffe, speeding up implementation in common workflows.

Lightweight Monitoring

Provides functions like showUtilization() and a thread-based monitor for real-time GPU status display, useful for basic monitoring needs.

Cons

NVIDIA-Only Limitation

Tied exclusively to NVIDIA GPUs via `nvidia-smi`, making it unusable for systems with AMD, Intel, or other GPU vendors.

Basic Feature Set

Lacks advanced features such as historical data logging, predictive load balancing, or integration with modern orchestration tools, limiting its use in complex environments.

Potential Stability Issues

Relies on the correct installation and output parsing of `nvidia-smi`, which can fail if the NVIDIA driver is outdated or if there are system-specific issues.

Frequently Asked Questions

Quick Stats

Stars1,211
Forks130
Contributors0
Open Issues19
Last commit1 month ago
CreatedSince 2017

Tags

#multi-gpu#nvidia#deep-learning#gpu-utilization#resource-monitoring#python

Built With

P
Python

Included in

Robotic Tooling3.8k
Auto-fetched 1 day ago

Related Projects

spdlogspdlog

Fast C++ logging library.

Stars28,707
Forks5,129
Last commit14 days ago
ctopctop

Top-like interface for container metrics

Stars17,717
Forks590
Last commit1 year ago
ntopntop

Web-based Traffic and Security Network Traffic Monitoring

Stars7,767
Forks735
Last commit2 days ago
htophtop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.

Stars5,917
Forks576
Last commit5 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub