Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / torch / pytorch-pr-108847.patch
blob9511191ca926ad29a2792161944e37c2c9660e03
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
5 CUDA_SOURCE_DIR
7 Limitation discovered in https://github.com/NixOS/nixpkgs/pull/249259.
8 ---
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}
21 NO_DEFAULT_PATH)
23 find_path(CUPTI_INCLUDE_DIR cupti.h PATHS
24 @@ -1886,6 +1887,7 @@ if(USE_KINETO)
25 ${CUDA_INCLUDE_DIRS}
26 ${CUDA_SOURCE_DIR}
27 ${CUDA_SOURCE_DIR}/include
28 + $ENV{CUPTI_INCLUDE_DIR}
29 NO_DEFAULT_PATH)
31 if(CUPTI_LIBRARY_PATH AND CUPTI_INCLUDE_DIR)