Skip to main content

AMD GPU stats

Project description


AMD GPU information


pip install pyamdgpuinfo

Only Linux is supported, using the AMDGPU driver.

The library is written using Cython, meaning that Cython and and a C compiler are needed to build and install from source. Additionally, libdrm development headers are required.

Precompiled wheels for Python 3.8-3.12 are the default method of install. This means that you don't need Cython or any other dependencies to install it normally.



>>> 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 northbridge 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.

Source Distribution

pyamdgpuinfo-2.1.6.tar.gz (21.9 kB view hashes)

Uploaded Source

Built Distributions

pyamdgpuinfo-2.1.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (116.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (116.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-cp312-cp312-musllinux_1_1_x86_64.whl (354.3 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

pyamdgpuinfo-2.1.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (361.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-cp311-cp311-musllinux_1_1_x86_64.whl (359.5 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

pyamdgpuinfo-2.1.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (365.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-cp310-cp310-musllinux_1_1_x86_64.whl (344.8 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

pyamdgpuinfo-2.1.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (352.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-cp39-cp39-musllinux_1_1_x86_64.whl (347.8 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

pyamdgpuinfo-2.1.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (355.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyamdgpuinfo-2.1.6-cp38-cp38-musllinux_1_1_x86_64.whl (367.2 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

pyamdgpuinfo-2.1.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (359.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

Supported by

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