This script locates the NVIDIA CUDA toolkit and the associated libraries, butdoes not require the
CUDA language be enabled for a given project. Thismodule does not search for the NVIDIA CUDA Samples.
New in version 3.19: QNX support.
CMake seems to be unable to find CUDA, catkin build brings: CMake Error at /home/nvidia/driverws/src/sekonixcamera/cmake/FindCUDA.cmake:655 (message): Specify CUDATOOLKITROOTDIR Call Stack (most recent call first): CMakeLists.txt:19 (findpackage) I added set(CUDATOOLKITROOTDIR /usr/local/cuda-10.2) to the CMakeLists.txt but that didn’t solve the problem. FindCMake.cmake looks for /usr/local/cuda. In your case, that directory might not be there. Just create a symbolic link of that name to your actual CUDA installation directory: $ sudo ln -s /usr/local/cuda-5.5 /usr/local/cuda. Your CMake should be able to generate the Makefile for your project now.
The CUDA Toolkit search behavior uses the following order:
CUDAlanguage has been enabled we will use the directorycontaining the compiler as the first search location for
CUDAToolkit_ROOTcmake configuration variable (e.g.,
-DCUDAToolkit_ROOT=/some/path) or environment variable is defined, itwill be searched. If both an environment variable and aconfiguration variable are specified, the configuration variable takesprecedence.
The directory specified here must be such that the executable
version.txtfile can be found underneath the specifieddirectory.
If the CUDA_PATH environment variable is defined, it will be searchedfor
The user's path is searched for
find_program(). Ifthis is found, no subsequent search attempts are performed. Users areresponsible for ensuring that the first
nvccto show up in the path isthe desired path in the event that multiple CUDA Toolkits are installed.
On Unix systems, if the symbolic link
/usr/local/cudaexists, this isused. No subsequent search attempts are performed. No default symbolic linklocation exists for the Windows platform.
The platform specific default install locations are searched. If exactly onecandidate is found, this is used. The default CUDA Toolkit install locationssearched are:
X.Ywould be a specific version of the CUDA Toolkit, such as
When multiple CUDA Toolkits are installed in the default location of asystem (e.g., both
/usr/local/cuda-10.0exist but the
/usr/local/cudasymbolic link does not exist), thispackage is marked as not found.
There are too many factors involved in making an automatic decision inthe presence of multiple CUDA Toolkits being installed. In thissituation, users are encouraged to either (1) set
CUDAToolkit_ROOTor(2) ensure that the correct
nvccexecutable shows up in
If specified, describes the version of the CUDA Toolkit to search for.
If specified, configuration will error if a suitable CUDA Toolkit is notfound.
If specified, the search for a suitable CUDA Toolkit will not produce anymessages.
If specified, the CUDA Toolkit is considered found only if the exact
VERSION specified is recovered.
An imported target named
CUDA::toolkit is provided.
This module defines
IMPORTED targets for eachof the following libraries that are part of the CUDAToolkit:
CUDA Runtime Library¶
The CUDA Runtime library (cudart) are what most applications will typicallyneed to link against to make any calls such as cudaMalloc, and cudaFree.
CUDA Driver Library¶
The CUDA Driver library (cuda) are used by applications that use callssuch as cuMemAlloc, and cuMemFree. This is generally used by advanced
The cuBLAS library.
CUDA::cublasLtstarting in CUDA 10.1
CUDA::cublasLt_staticstarting in CUDA 10.1
The cuFFT library.
The cuRAND library.
The cuSOLVER library.
The cuSPARSE library.
The NVIDIA CUDA Profiling Tools Interface.
The NPP libraries.
nppial: Arithmetic and logical operation functions in nppi_arithmetic_and_logical_operations.h
nppicc: Color conversion and sampling functions in nppi_color_conversion.h
nppicom: JPEG compression and decompression functions in nppi_compression_functions.hRemoved starting in CUDA 11.0, use nvJPEG instead.
nppidei: Data exchange and initialization functions in nppi_data_exchange_and_initialization.h
nppif: Filtering and computer vision functions in nppi_filter_functions.h
nppig: Geometry transformation functions found in nppi_geometry_transforms.h
nppim: Morphological operation functions found in nppi_morphological_operations.h
nppist: Statistics and linear transform in nppi_statistics_functions.h and nppi_linear_transforms.h
nppisu: Memory support functions in nppi_support_functions.h
nppitc: Threshold and compare operation functions in nppi_threshold_and_compare_operations.h
The nvBLAS libraries.This is a shared library only.
The nvGRAPH library.Removed starting in CUDA 11.0
The nvJPEG library.Introduced in CUDA 10.
The nvRTC (Runtime Compilation) library.This is a shared library only.
The NVIDIA Management Library.This is a shared library only.
The NVIDIA Tools Extension.This is a shared library only.
The NVIDIA OpenCL Library.This is a shared library only.
The cuLIBOS library is a backend thread abstraction layer library which isstatic only. The
CUDA::curand_static, and (when implemented) NPPlibraries all automatically have this dependency linked.
Note: direct usage of this target by consumers should not be necessary.
Cmake Find Cuda Company
A boolean specifying whether or not the CUDA Toolkit was found.
The exact version of the CUDA Toolkit found (as reported by
The major version of the CUDA Toolkit.
The minor version of the CUDA Toolkit.
Cmake Find Cuda Version
The patch version of the CUDA Toolkit.
The path to the CUDA Toolkit library directory that contains the CUDAexecutable
The path to the CUDA Toolkit
include folder containing the header filesrequired to compile a project linking against CUDA.
The path to the CUDA Toolkit library directory that contains the CUDARuntime library
The path to the CUDA Toolkit directory containing the nvvm directory andversion.txt.
The path to the CUDA Toolkit directory including the target architecturewhen cross-compiling. When not cross-compiling this will be equivalent tothe parent directory of
The path to the NVIDIA CUDA compiler
nvcc. Note that this path maynot be the same as_COMPILER'>
nvcc must befound to determine the CUDA Toolkit version as well as determining otherfeatures of the Toolkit. This variable is set for the convenience ofmodules that depend on this one.
Please provide the following info:
Hardware Platform: DRIVE AGX Xavier™ Developer Kit
Software Version: DRIVE Software 10
Host Machine Version: native Ubuntu 18.04
SDK Manager Version: 126.96.36.19933
I’m having a problem trying to compile this sekonix_camera GMSL ROS-wrapper on the target machine.
CMake seems to be unable to find CUDA,
catkin build brings:
set(CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda-10.2) to the CMakeLists.txt but that didn’t solve the problem:
What path should I set CUDA_NVCC_EXECUTABLE, CUDA_INCLUDE_DIRS and CUDA_CUDART_LIBRARY to; or is there something else wrong?
Also I’m quite confused becuase calling nvcc doesn’t work:
I actually installed CUDA during flashing. Also, it seemed to be installed at
Thanks in advance!