Commit d6214ad
authored
[SYCL][UR][CUDA] Fix CMake CUPTI config (#17457)
Fix-up for #17315 which used incorrect CMake variables for CUPTI:
* `CUDAToolkit_cupti_INCLUDE_DIR` should be
`CUDAToolkit_CUPTI_INCLUDE_DIR`
* `CUDAToolkit_cupti_LIBRARY` should be `CUDA_cupti_LIBRARY`
In addition, we discovered that FindCUDAToolkit:
* does not set the INCLUDE_DIR variable until CMake 3.24 (while we
support back to 3.20)
* fails to find the library in CUDA toolkits installed from runfile
(https://gitlab.kitware.com/cmake/cmake/-/issues/26770)
Fix the variable names and retry the searches with extra paths if the
header/library are not found. The REQUIRED option is enabled in the
retry, which ensures that if CUPTI is not found then the build fails at
CMake configuration instead of later during compilation or linking.1 parent f85999b commit d6214ad
File tree
2 files changed
+49
-3
lines changed- sycl/tools/sycl-trace
- unified-runtime/source/adapters/cuda
2 files changed
+49
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | | - | |
| 111 | + | |
100 | 112 | | |
101 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
102 | 135 | | |
103 | 136 | | |
104 | 137 | | |
105 | | - | |
| 138 | + | |
106 | 139 | | |
107 | 140 | | |
108 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
96 | 109 | | |
97 | 110 | | |
98 | | - | |
| 111 | + | |
99 | 112 | | |
100 | 113 | | |
101 | 114 | | |
| |||
0 commit comments