summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-02-07 14:15:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-02-07 14:15:45 (GMT)
commit6d7d0d24461964c8546b7034594aa76a6caf729f (patch)
tree6d9d550f4ac93a43c0199bcb177ea0fe4b2ea0bf
parent13ef3285df97fa97a4cc1b7fe81741aeb8adcf7a (diff)
parent27b0d908d46aaffe7df29e32e1b7ddbbd50c983f (diff)
downloadCMake-6d7d0d24461964c8546b7034594aa76a6caf729f.zip
CMake-6d7d0d24461964c8546b7034594aa76a6caf729f.tar.gz
CMake-6d7d0d24461964c8546b7034594aa76a6caf729f.tar.bz2
Merge topic 'cuda_toolkit_add_cupti' into release-3.17
27b0d908d4 CUDAToolkit: Add support for cupti library c3d7f2e43b CUDAToolkit: Correct location of OpenCL doc link Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4329
-rw-r--r--Modules/FindCUDAToolkit.cmake28
1 files changed, 25 insertions, 3 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index 62749ed..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
@@ -333,8 +346,6 @@ Targets Created:
- ``CUDA::nvml``
-.. _`cuda_toolkit_opencl`:
-
.. _`cuda_toolkit_nvToolsExt`:
nvToolsExt
@@ -347,6 +358,8 @@ Targets Created:
- ``CUDA::nvToolsExt``
+.. _`cuda_toolkit_opencl`:
+
OpenCL
""""""
@@ -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)