summaryrefslogtreecommitdiffstats
path: root/Modules/FindCUDAToolkit.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-02-06 03:24:37 (GMT)
committerBrad King <brad.king@kitware.com>2020-02-06 14:41:24 (GMT)
commit27b0d908d46aaffe7df29e32e1b7ddbbd50c983f (patch)
tree8743dcd82f9096cff4f8564dce4b6de10ea8d777 /Modules/FindCUDAToolkit.cmake
parentc3d7f2e43befc0ccd1cb35fae6883ca44a6a37e7 (diff)
downloadCMake-27b0d908d46aaffe7df29e32e1b7ddbbd50c983f.zip
CMake-27b0d908d46aaffe7df29e32e1b7ddbbd50c983f.tar.gz
CMake-27b0d908d46aaffe7df29e32e1b7ddbbd50c983f.tar.bz2
CUDAToolkit: Add support for cupti library
Fixes: #20318
Diffstat (limited to 'Modules/FindCUDAToolkit.cmake')
-rw-r--r--Modules/FindCUDAToolkit.cmake24
1 files changed, 23 insertions, 1 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index a61b3ec..f251b41 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -105,6 +105,7 @@ of the following libraries that are part of the CUDAToolkit:
- :ref:`cuRAND<cuda_toolkit_cuRAND>`
- :ref:`cuSOLVER<cuda_toolkit_cuSOLVER>`
- :ref:`cuSPARSE<cuda_toolkit_cuSPARSE>`
+- :ref:`cuPTI<cuda_toolkit_cupti>`
- :ref:`NPP<cuda_toolkit_NPP>`
- :ref:`nvBLAS<cuda_toolkit_nvBLAS>`
- :ref:`nvGRAPH<cuda_toolkit_nvGRAPH>`
@@ -202,6 +203,18 @@ Targets Created:
- ``CUDA::cusparse``
- ``CUDA::cusparse_static``
+.. _`cuda_toolkit_cupti`:
+
+cupti
+"""""
+
+The `NVIDIA CUDA Profiling Tools Interface <https://developer.nvidia.com/CUPTI>`_.
+
+Targets Created:
+
+- ``CUDA::cupti``
+- ``CUDA::cupti_static``
+
.. _`cuda_toolkit_NPP`:
NPP
@@ -732,15 +745,17 @@ endif()
if(CUDAToolkit_FOUND)
function(_CUDAToolkit_find_and_add_import_lib lib_name)
- cmake_parse_arguments(arg "" "" "ALT;DEPS" ${ARGN})
+ cmake_parse_arguments(arg "" "" "ALT;DEPS;EXTRA_PATH_SUFFIXES" ${ARGN})
set(search_names ${lib_name} ${arg_ALT})
+ message(STATUS "arg_EXTRA_PATH_SUFFIXES: ${arg_EXTRA_PATH_SUFFIXES}")
find_library(CUDA_${lib_name}_LIBRARY
NAMES ${search_names}
HINTS ${CUDAToolkit_LIBRARY_DIR}
ENV CUDA_PATH
PATH_SUFFIXES nvidia/current lib64 lib64/stubs lib/x64 lib lib/stubs
+ ${arg_EXTRA_PATH_SUFFIXES}
)
if (NOT TARGET CUDA::${lib_name} AND CUDA_${lib_name}_LIBRARY)
@@ -815,6 +830,13 @@ if(CUDAToolkit_FOUND)
_CUDAToolkit_find_and_add_import_lib(${cuda_lib}_static DEPS nppc_static)
endforeach()
+ _CUDAToolkit_find_and_add_import_lib(cupti
+ EXTRA_PATH_SUFFIXES ../extras/CUPTI/lib64/
+ ../extras/CUPTI/lib/)
+ _CUDAToolkit_find_and_add_import_lib(cupti_static
+ EXTRA_PATH_SUFFIXES ../extras/CUPTI/lib64/
+ ../extras/CUPTI/lib/)
+
_CUDAToolkit_find_and_add_import_lib(nvrtc DEPS cuda_driver)
_CUDAToolkit_find_and_add_import_lib(nvml ALT nvidia-ml nvml)