From c3d7f2e43befc0ccd1cb35fae6883ca44a6a37e7 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 5 Feb 2020 22:24:08 -0500 Subject: CUDAToolkit: Correct location of OpenCL doc link --- Modules/FindCUDAToolkit.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index 62749ed..a61b3ec 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -333,8 +333,6 @@ Targets Created: - ``CUDA::nvml`` -.. _`cuda_toolkit_opencl`: - .. _`cuda_toolkit_nvToolsExt`: nvToolsExt @@ -347,6 +345,8 @@ Targets Created: - ``CUDA::nvToolsExt`` +.. _`cuda_toolkit_opencl`: + OpenCL """""" -- cgit v0.12 From 27b0d908d46aaffe7df29e32e1b7ddbbd50c983f Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 5 Feb 2020 22:24:37 -0500 Subject: CUDAToolkit: Add support for cupti library Fixes: #20318 --- Modules/FindCUDAToolkit.cmake | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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` - :ref:`cuSOLVER` - :ref:`cuSPARSE` +- :ref:`cuPTI` - :ref:`NPP` - :ref:`nvBLAS` - :ref:`nvGRAPH` @@ -202,6 +203,18 @@ Targets Created: - ``CUDA::cusparse`` - ``CUDA::cusparse_static`` +.. _`cuda_toolkit_cupti`: + +cupti +""""" + +The `NVIDIA CUDA Profiling Tools Interface `_. + +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) -- cgit v0.12