How to Check for GPU on your system

Whether you’re a data scientist crunching numbers or a software engineer crafting AI dreams, GPUs are your ultimate performance allies. But before unleashing their power, you need to know… does your system even have one? This guide sheds light on the art of GPU detection, unveiling methods for Windows, CentOS Linux, and other distributions. So, grab your curiosity and let’s embark on a GPU detective adventure!

Table of Contents

  1. For Windows
  2. For CentOS Linux
  3. Other Linux Distributions
  4. Conclusion

For Windows:

You can check for GPUs on Windows using several methods. Here are a few ways to do it:

  1. Device Manager:
  • Press Win + X and select “Device Manager.”
  • Look for the “Display adapters” section to see the GPUs installed on your system.
  1. System Information:
  • Press Win + R to open the Run dialog, type msinfo32, and press Enter.
  • In the System Information window, navigate to “Components” -> “Display” to see information about your GPUs.
  1. Task Manager:
  • Right-click on the taskbar and select “Task Manager” or press Ctrl + Shift + Esc to open it.
  • Go to the “Performance” tab and select “GPU” from the left sidebar to see GPU usage and information.
  1. Command Prompt or PowerShell:
  • Open the Command Prompt or PowerShell.
  • Type the following command and press Enter: wmic path win32_videocontroller get caption
  1. DirectX Diagnostic Tool:
  • Press Win + R to open the Run dialog, type dxdiag, and press Enter.
  • In the DirectX Diagnostic Tool, go to the “Display” tab to view information about your GPUs.

Choose the method that best fits your preferences or needs. These methods provide information about the GPUs installed on your Windows system.

For CentOS Linux:

CentOS is a popular Linux distribution that is widely used in the enterprise world.

Method 1: Using the lspci command

The first method to check for a GPU on CentOS Linux is by using the lspci command. lspci is a command-line utility that displays information about all PCI buses and devices in the system.

To check for a GPU, open the terminal and run the following command:

lspci | grep -i nvidia

This command will search for any NVIDIA GPUs on your system. If your system has an NVIDIA GPU, you will see the following output:

01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)

The output shows that the system has an NVIDIA Corporation GP104 [GeForce GTX 1080] GPU.

If you see no output, it means that your system does not have an NVIDIA GPU.

Method 2: Using the nvidia-smi command

The second method to check for a GPU on CentOS Linux is by using the nvidia-smi command. nvidia-smi is a command-line utility that displays information about NVIDIA GPUs installed in the system.

To check for a GPU, open the terminal and run the following command:

nvidia-smi

If your system has an NVIDIA GPU, you will see the following output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.50       Driver Version: 430.50       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro P4000        Off  | 00000000:04:00.0  On |                  N/A |
| 34%   53C    P8    10W / 105W |   3964MiB /  8116MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

The output shows that the system has an NVIDIA Quadro P4000 GPU.

If you see an error message or no output, it means that your system does not have an NVIDIA GPU.

Other Linux Distributions:

  1. lshw:
  • Open a terminal.
  • Type the following command and press Enter:
sudo lshw -C display
  1. nvidia-smi (NVIDIA GPUs):

If you have an NVIDIA GPU and the NVIDIA driver installed, you can use the following command:

nvidia-smi

This command provides detailed information about the NVIDIA GPU, including its utilization and temperature.

  1. radeontop (AMD GPUs):

If you have an AMD GPU, you can use the following command:

radeontop

This tool provides real-time monitoring of AMD GPU utilization.

Conclusion

In this tutorial, we learned how to check for a GPU on different enviornments. Knowing how to check for a GPU is the first step in setting up a machine for machine learning or deep learning tasks. If your system does not have a GPU or has an outdated GPU, you may need to upgrade your hardware to achieve optimal performance.


About Saturn Cloud

Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Request a demo today to learn more.