Skip to main content

Quick CUDA/GPU status summary for ML engineers

Project description

cgpu

Quick CUDA/GPU status summary for ML engineers. One import, one call, all the info you need.

Installation

Full ML stack (recommended for new projects):

pip install cgpu-info[full]

This installs: torch, torchvision, torchaudio, numpy, pandas, matplotlib, seaborn, scikit-learn

Other options:

# Just PyTorch stack
pip install cgpu-info[torch]

# Just data science packages (no torch)
pip install cgpu-info[science]

# Minimal - just cgpu (if you already have torch)
pip install cgpu-info

Works with uv too:

uv pip install cgpu-info[full]

Installing PyTorch with specific CUDA version

For specific CUDA versions, use the built-in install helper:

# Install torch with CUDA 12.1
cgpu install --cuda 12.1

# Install torch with CUDA 12.4
cgpu install --cuda 12.4

# Install torch with CUDA 11.8
cgpu install --cuda 11.8

# Install CPU-only torch
cgpu install --cuda cpu

Usage

Python

from cgpu import cgpu

device = cgpu()
# Now use `device` in your code
model.to(device)

CLI

# Show GPU status
cgpu

# Show version
cgpu --version

That's it! You'll see a colorful summary like:

═══════════════════════════════════════
          GPU Status Summary
═══════════════════════════════════════
✓ CUDA Available
  Device: cuda
  GPU Count: 1
  [0] NVIDIA GeForce RTX 4090
      VRAM: 24.0 GB
      Allocated: 0.00 GB
      Reserved: 0.00 GB
      Temp: 42°C
      GPU Util: 0%
      Mem Util: 0%
  CUDA Version: 12.1
  cuDNN Version: 8902
  PyTorch: 2.1.0
═══════════════════════════════════════

What it shows

  • CUDA availability status
  • Device string (cuda or cpu)
  • GPU name and count
  • VRAM total and usage
  • Temperature (color-coded: green < 50°C, yellow < 70°C, red >= 70°C)
  • GPU/Memory utilization
  • CUDA, cuDNN, and PyTorch versions

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cgpu_info-0.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cgpu_info-0.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file cgpu_info-0.2.0.tar.gz.

File metadata

  • Download URL: cgpu_info-0.2.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cgpu_info-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d6d761f2b33da8744b06c4e7b625b76bff8ba5a63ffeb944b6f272d413a1f2ea
MD5 17e7d58fddd943a7224d6e0e883a5275
BLAKE2b-256 0d14a0938015ad0c9b0157354fec417049c922d246a2021109d9180ecc567ca2

See more details on using hashes here.

File details

Details for the file cgpu_info-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cgpu_info-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for cgpu_info-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31465f5e18bcb9bfaa86dfafa95e313a3d34c1ef094418068a55fd335825d548
MD5 0cf7a64d6fab6f1aea9509a771b5ed05
BLAKE2b-256 b7aa7fbd093943ab994881e9704b6a29f93161a87fd36e9c9de98cd121ec2524

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page