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

pip install cgpu-info

or with uv:

uv pip install cgpu-info

Note: You need PyTorch installed separately. For temperature/utilization info, also install pynvml:

pip install torch pynvml

Usage

from cgpu import cgpu

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

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.1.0.tar.gz (4.0 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.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cgpu_info-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 7b4f7d5030623c6f53442717cca9eac1a93cbb04fa4ccee0453fdc88ea1b4527
MD5 99e7aca684c5968ec4f0ac3bfc66d24d
BLAKE2b-256 452ac77c944cd7f5bfa807083ffca42e22961aa84045fd4d78df02f94f1fae1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cgpu_info-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18850ebe97128d3d907f30c1d9a0db7aa3ab18716a60fa537c016abebbafe794
MD5 a2629b037633dab7bccd0c00bc487900
BLAKE2b-256 27b29f2015efaa17cc45b86093d87579e2cb196281482515289a76a7503c0dc8

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