Skip to content

Commit 865d8f0

Browse files
authored
[CUDA] Support NVTX in CUDA 13 (#18300)
This PR adds the support of NVTX for CUDA 13. The change is because that starting CUDA 13, the nvtx functions are moved to the lirbary of `libnvtx3interop.so`, and the previous nvToolsExt library no longer exists. To ensure compatibility with both CUDA 12 and 13, we add libnvtx3interop.so to the library lookup list.
1 parent b07c6c1 commit 865d8f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/utils/FindCUDA.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ macro(find_cuda use_cuda use_cudnn)
101101
PATH_SUFFIXES lib lib64 targets/x86_64-linux/lib targets/x86_64-linux/lib/stubs lib64/stubs lib/x86_64-linux-gnu
102102
NO_DEFAULT_PATH)
103103
find_library(CUDA_NVTX_LIBRARY
104-
NAMES nvToolsExt nvTools nvtoolsext nvtools nvtx NVTX
104+
NAMES nvToolsExt nvTools nvtoolsext nvtools nvtx NVTX nvtx3interop
105105
PATHS "${CUDA_CUDART_LIBRARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}" ENV LD_LIBRARY_PATH
106106
PATH_SUFFIXES "lib64" "common/lib64" "common/lib" "lib"
107107
DOC "Location of the CUDA Toolkit Extension (NVTX) library"

0 commit comments

Comments
 (0)