pytorch/cmake/Modules_CUDA_fix
Rong Rong 611080a118 [hot fix] cuda 11.0.x doesn't support sm86. (#47408)
Summary:
Bump condition check from >11.0 to >11.0.3

CMAKE 3.5 doesn't support VERSION_GREATER_EQUAL see [here](https://github.com/Dav1dde/glad/issues/134), so we might need to bump this again iv 11.0.4+ releases.

should fix https://github.com/pytorch/pytorch/issues/47352

Pull Request resolved: https://github.com/pytorch/pytorch/pull/47408

Reviewed By: glaringlee

Differential Revision: D24759949

Pulled By: walterddr

fbshipit-source-id: de384c7b150babaf799cce53ed198e5e931899da
2020-11-06 10:34:25 -08:00
..
upstream [hot fix] cuda 11.0.x doesn't support sm86. (#47408) 2020-11-06 10:34:25 -08:00
FindCUDA.cmake
FindCUDNN.cmake
README.md

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.