pytorch/cmake/Modules_CUDA_fix
nihui b69c685c4a try to find cudnn header in /usr/include/cuda (#31755)
Summary:
With fedora negativo17 repo, the cudnn headers are installed in /usr/include/cuda directory, along side with other cuda libraries.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31755

Differential Revision: D19697262

Pulled By: ezyang

fbshipit-source-id: be80d3467ffb90fd677d551f4403aea65a2ef5b3
2020-02-04 14:10:32 -08:00
..
upstream Docs: c++11 -> c++14 (#30530) 2019-12-17 14:09:02 -08:00
FindCUDA.cmake cmake wrapper (#8797) 2018-06-22 15:29:25 -04:00
FindCUDNN.cmake try to find cudnn header in /usr/include/cuda (#31755) 2020-02-04 14:10:32 -08:00
README.md Add torch.backends.openmp.is_available(); fix some cmake messages (#16425) 2019-01-31 16:15:46 -08:00

This ./upstream subfolder contains fixes for FindCUDA that are introduced in later versions of cmake but cause generator expression errors in earlier CMake versions. Specifically:

  1. a problem where a generator expression for include directories was passed to NVCC, where the generator expression itself was prefixed by -I. As the NNPACK include directory generator expression expands to multiple directories, the second and later ones were not prefixed by -I, causing NVCC to return an error. First fixed in CMake 3.7 (see Kitware/CMake@7ded655f).

  2. Windows VS2017 fixes that allows one to define the ccbin path differently between earlier versions of Visual Studio and VS2017. First introduced after 3.10.1 master version (see Kitware/CMake@bc88329e).

The downside of using these fixes is that ./upstream/CMakeInitializeConfigs.cmake, defining some new CMake variables (added in Kitware/CMake@48f7e2d3), must be included before ./upstream/FindCUDA.cmake to support older CMake versions. A wrapper ./FindCUDA.cmake is created to do this automatically, and to allow submodules to use these fixes because we can't patch their CMakeList.txt.

If you need to update files under ./upstream folder, we recommend you issue PRs against the CMake mainline branch, and then backport it here for earlier CMake compatibility.