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