diff options
author | Tongzhou Wang <SsnL@users.noreply.github.com> | 2018-06-26 00:07:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 00:07:13 -0400 |
commit | 3d580f2f7d904216d215ffa81728dad076b1ac15 (patch) | |
tree | 302f88839dafc7e1884e40dabefc03d750a80530 /cmake | |
parent | 8e98a1a84d7413542829f91824515d58df873e29 (diff) | |
download | pytorch-3d580f2f7d904216d215ffa81728dad076b1ac15.tar.gz pytorch-3d580f2f7d904216d215ffa81728dad076b1ac15.tar.bz2 pytorch-3d580f2f7d904216d215ffa81728dad076b1ac15.zip |
[build] Raise in cmake when seeing NVCC{9/9.1} + GCC6 combo (#8863)
* Add error message for NVCC{9/9.1} + GCC6 combo
* requires -> require
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/public/cuda.cmake | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake index bb9b308d13..f1ab5b975b 100644 --- a/cmake/public/cuda.cmake +++ b/cmake/public/cuda.cmake @@ -298,16 +298,21 @@ else() list(APPEND CUDA_NVCC_FLAGS "-DONNX_NAMESPACE=onnx_c2") endif() -# CUDA 9.x requires GCC version <= 6 +# CUDA 9.0 & 9.1 require GCC version <= 5 +# Although they support GCC 6, but a bug that wasn't fixed until 9.2 prevents +# them from compiling the std::tuple header of GCC 6. +# See Sec. 2.2.1 of +# https://developer.download.nvidia.com/compute/cuda/9.2/Prod/docs/sidebar/CUDA_Toolkit_Release_Notes.pdf if ((CUDA_VERSION VERSION_EQUAL 9.0) OR (CUDA_VERSION VERSION_GREATER 9.0 AND CUDA_VERSION VERSION_LESS 9.2)) if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND - NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0 AND + NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0 AND CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER) message(FATAL_ERROR - "CUDA ${CUDA_VERSION} is not compatible with GCC version >= 7. " - "Use the following option to use another version (for example): \n" - " -DCUDA_HOST_COMPILER=/usr/bin/gcc-6\n") + "CUDA ${CUDA_VERSION} is not compatible with std::tuple from GCC version " + ">= 6. Please upgrade to CUDA 9.2 or use the following option to use " + "another version (for example): \n" + " -DCUDA_HOST_COMPILER=/usr/bin/gcc-5\n") endif() elseif (CUDA_VERSION VERSION_EQUAL 8.0) # CUDA 8.0 requires GCC version <= 5 |