1 From bf4050edab9f294a8e0060c47f906cd7a80f25a2 Mon Sep 17 00:00:00 2001
2 From: Samuel Ainsworth <skainsworth@gmail.com>
3 Date: Sat, 9 Sep 2023 02:04:09 +0000
4 Subject: [PATCH] Dependencies.cmake: support building against CUPTI outside of
7 Limitation discovered in https://github.com/NixOS/nixpkgs/pull/249259.
9 cmake/Dependencies.cmake | 2 ++
10 1 file changed, 2 insertions(+)
12 diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
13 index 0602d534dc4c14..5f6a5f79f3e3dc 100644
14 --- a/cmake/Dependencies.cmake
15 +++ b/cmake/Dependencies.cmake
16 @@ -1879,6 +1879,7 @@ if(USE_KINETO)
17 ${CUDA_SOURCE_DIR}/extras/CUPTI/lib64
18 ${CUDA_SOURCE_DIR}/lib
19 ${CUDA_SOURCE_DIR}/lib64
20 + $ENV{CUPTI_LIBRARY_DIR}
23 find_path(CUPTI_INCLUDE_DIR cupti.h PATHS
24 @@ -1886,6 +1887,7 @@ if(USE_KINETO)
27 ${CUDA_SOURCE_DIR}/include
28 + $ENV{CUPTI_INCLUDE_DIR}
31 if(CUPTI_LIBRARY_PATH AND CUPTI_INCLUDE_DIR)