Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining which gencode (compute_, arch_) values I need for nvcc - within CMake

Tags:

People also ask

How do I check my Nvidia GPU compute capability?

To check if your computer has an NVIDA GPU and if it is CUDA enabled: Right click on the Windows desktop. If you see “NVIDIA Control Panel” or “NVIDIA Display” in the pop up dialogue, the computer has an NVIDIA GPU.

Where is compute capability of GPU in Linux?

The most common way is to use the NVidia System Management Interface (nvidia-smi). This is a command line tool that is included with the NVidia drivers and can be used to query information about the GPU. Another way to check the compute capability of a GPU is to use the CUDA Toolkit.

What is nvcc command?

nvcc The main wrapper for the NVIDIA CUDA Compiler suite. Used to compile and link both host and gpu code. cuobjdump The NVIDIA CUDA equivalent to the Linux objdump tool.


I'm using CMake as a build system for my code, which involves CUDA. I was thinking of automating the task of deciding which compute_XX and arch_XX I need to to pass to my nvcc in order to compile for the GPU(s) on my current machine.

  • Is there a way to do this:

    1. With the NVIDIA GPU deployment kit?
    2. Without the NVIDIA GPU deployment kit?
  • Does CMake's FindCUDA help you in determining the values for these switches?