Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

AMD GPU stats

Project description


AMD GPU information


pip3 install pyamdgpuinfo

Only linux is supported, using the amdgpu driver.

Precompiled wheels for python 3.6, 3.7, 3.8 and 3.9 are the default method of install. This means that you don't need cython or any other dependencies to install it normally.

The library is written using cython, meaning that cython and and a C compiler are needed to build and install from source. Additionally, libdrm-dev is needed.



>>> import pyamdgpuinfo
>>> n_devices = pyamdgpuinfo.detect_gpus()
1 # we have 1 device present, so it'll be at index 0
>>> first_gpu = pyamdgpuinfo.get_gpu(0) # returns a GPUInfo object
>>> vram_usage = first_gpu.query_vram_usage()
>>> print(vram_usage)
3954978816 # number of bytes in use

All documentation is in the docstrings of each function/class.

Available functions are (see docstrings for more info):

  • detect_gpus - Returns the number of GPUs available
  • get_gpu - Returns a GPUInfo object for the device index specified

GPUInfo methods (see docstring for class overview)

  • start_utilisation_polling - Starts polling GPU registers for utilisation statistics
  • stop_utilisation_polling - Stops the utilisation polling thread
  • query_utilisation - Queries utilisation of different GPU parts
  • query_max_clocks - Queries max GPU clocks
  • query_sclk - Queries shader (core) clock
  • query_mclk - Queries memory clock
  • query_vram_usage - Queries VRAM usage
  • query_gtt_usage - Queries GTT usage
  • query_temperature - Queries temperature
  • query_load - Queries GPU load
  • query_power - Queries power consumption
  • query_northbridge_voltage - Queries northbrige voltage
  • query_graphics_voltage - Queries graphics voltage

VRAM and GTT sizes are available as an attribute of GPUInfo.


Parts of this package were inspired by radeontop.



Project details

Download files

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

Files for pyamdgpuinfo, version 2.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pyamdgpuinfo-2.1.1-cp36-cp36m-manylinux2014_x86_64.whl (300.2 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size pyamdgpuinfo-2.1.1-cp37-cp37m-manylinux2014_x86_64.whl (300.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size pyamdgpuinfo-2.1.1-cp38-cp38-manylinux2014_x86_64.whl (335.8 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size pyamdgpuinfo-2.1.1-cp39-cp39-manylinux2014_x86_64.whl (323.9 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size pyamdgpuinfo-2.1.1.tar.gz (9.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page