Skip to content

Instantly share code, notes, and snippets.

@neomatrix369
Last active December 14, 2023 02:44
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save neomatrix369/256913dcf77cdbb5855dd2d7f5d81b84 to your computer and use it in GitHub Desktop.
Save neomatrix369/256913dcf77cdbb5855dd2d7f5d81b84 to your computer and use it in GitHub Desktop.
Know your GPUs

Commands on Linux to gather information related to GPUs

Below is a list of commands and resources that work on Linux (some need installation of packages), would love to welcome contributions for the same for MacOSX and Windows platforms too. Please share and contribute back.

Please run the below in both vagrant, docker and other container environments and share your experiences with us!

About me: http://neomatrix369.wordpress.com/about, my blogs: http://neomatrix369.wordpress.com/

Get Hardware Details
sudo apt-get install mesa-utils
glxinfo
glxinfo | grep OpenGL
lshw -C display
lshw -numeric -C display

To see lshw info in a GUI:

sudo apt-get install lshw-gtk
lspci  -v -s  $(lspci | grep ' VGA ' | cut -d" " -f 1)
lspci -vnn | grep VGA -A 12

If your graphics card is from NVIDIA and it is listed in http://developer.nvidia.com/cuda-gpus, your GPU is CUDA-capable:

lspci | grep -i nvidia

What Graphics card is used?

sudo lshw -c video | grep configuration

  modinfo <model id next to the driver text>
	for e.g.
		modinfo i915
lspci | grep VGA
  • NVIDIA System Management Interface program, query your GPU using nvidia-smi (NVIDIA users):
nvidia-smi -q
  • View GPU info via your browser:
chrome://gpu/
  • Checking the `cat /proc/driver/nvidia/`` folder for nvidia driver info:
  ls /proc/driver/nvidia/gpus/
  cat /proc/driver/nvidia/gpus/0000:01:00.0/information
  • clinfo - show OpenCL platforms and devices:
  sudo apt-get install clinfo
	clinfo
  • Benchmarking your GPUs

OpenGL rendering of a simple arrangement of three rotating gears:

sudo apt-get install mesa-utils
glxgears

GLMarks

sudo apt-get install glmark2
glmark2

Unigine Benchmark products (free versions - Valley, Heaven, Tropics, Sanctuary and Superposition)

See screen-shots of the programs:

Superposition - benchmark and compete scores with other users' machines

Download Valley, Heaven, Tropics, Sanctuary and Superposition from the above site:

  • the download artifacts will be called Unique_Xxxx-n.n.run
  • chmod +x Unique_Xxxx-n.n.run on each of them
  • invoke each of them with ./Unique_Xxxx-n.n.run, they will unpack into their respective directories
  • the binaries are present in each of the folders created by running the above commands

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment