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

uv pip install cgpu-info

Or with pip:

pip install cgpu-info

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

Installing PyTorch with specific CUDA version

Use the built-in install helper to get PyTorch with your desired CUDA version:

# 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

Optional dependencies

If you want to install additional ML packages along with cgpu:

# Full ML stack: torch, torchvision, torchaudio, numpy, pandas, matplotlib, seaborn, scikit-learn
uv pip install cgpu-info[full]

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

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

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.1.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.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cgpu_info-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 085b15935eeb3b511998af741d180e4eb2ef0d988c0cb948cc85b1469a2e34f1
MD5 c3d0d2fa754e89791f8706f07c579fa6
BLAKE2b-256 230307b3142c20372abf899e0d623fe316034263bde0ed7574cff86873c6d69e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cgpu_info-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b27626cf7277277e07d7413a7de266099e6b3f0bd780f3d72746d14059691db5
MD5 9a25aa8b4008cde9e8a06ea3b0ac0acd
BLAKE2b-256 abc65e67a90f8ac21032249d6cc2e753cd3a5e0c61c5225a5d3337410d60ee67

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