From 4453d767593d15d8f6486a1e99bc7a0482081178 Mon Sep 17 00:00:00 2001 From: liaogang Date: Tue, 6 Dec 2016 14:01:54 +0800 Subject: [PATCH] Upgrade cuda minimum version to 7.0 --- CMakeLists.txt | 6 ++---- cmake/flags.cmake | 3 +++ doc/getstarted/build_and_install/build_from_source.md | 9 +++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b36088b75..ba6fb95315 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,12 +77,10 @@ if(NOT WITH_GPU) add_definitions(-DHPPL_STUB_FUNC) list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS cu) else() - if(${CUDA_VERSION_MAJOR} GREATER 6) - LIST(APPEND CUDA_NVCC_FLAGS -std=c++11) + if(${CUDA_VERSION_MAJOR} VERSION_LESS 7) + message(FATAL_ERROR "Paddle need CUDA >= 7.0 to compile") endif() - set(CUDA_PROPAGATE_HOST_FLAGS OFF) - if(NOT CUDNN_FOUND) message(FATAL_ERROR "Paddle need cudnn to compile") endif() diff --git a/cmake/flags.cmake b/cmake/flags.cmake index 4531efb1d5..0983d83b73 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -138,8 +138,11 @@ foreach(flag ${GPU_COMMON_FLAGS}) endforeach() +set(CUDA_PROPAGATE_HOST_FLAGS OFF) + # Release/Debug flags set by cmake. Such as -O3 -g -DNDEBUG etc. # So, don't set these flags here. +LIST(APPEND CUDA_NVCC_FLAGS -std=c++11) LIST(APPEND CUDA_NVCC_FLAGS --use_fast_math) if(CMAKE_BUILD_TYPE STREQUAL "Debug") diff --git a/doc/getstarted/build_and_install/build_from_source.md b/doc/getstarted/build_and_install/build_from_source.md index a71a9c3143..92389905e5 100644 --- a/doc/getstarted/build_and_install/build_from_source.md +++ b/doc/getstarted/build_and_install/build_from_source.md @@ -17,14 +17,15 @@ cd paddle To compile the source code, your computer must be equipped with the following dependencies. -### Dependencies - - **Compiler**: GCC >= 4.8 or Clang >= 3.3 (AppleClang >= 5.1) - **CMake**: version >= 2.8 - **BLAS**: MKL, OpenBlas or ATLAS - **Protocol Buffers**: version >= 2.4, **Note: 3.x is not supported** - **Python**: only python 2.7 is supported currently +**Note:** For CUDA 7.0 and CUDA 7.5, GCC 5.0 and up are not supported! +For CUDA 8.0, GCC versions later than 5.3 are not supported! + ### Options PaddlePaddle supports some build options. To enable it, first you need to install the related libraries. @@ -51,8 +52,8 @@ PaddlePaddle supports some build options. To enable it, first you need to instal **Note:** - - The GPU version works best with Cuda Toolkit 7.5 and cuDNN v5. - - Other versions like Cuda Toolkit 6.5, 7.0, 8.0 and cuDNN v2, v3, v4 are also supported. + - The GPU version works best with Cuda Toolkit 8.0 and cuDNN v5. + - Other versions like Cuda Toolkit 7.0, 7.5 and cuDNN v3, v4 are also supported. - **To utilize cuDNN v5, Cuda Toolkit 7.5 is prerequisite and vice versa.** As a simple example, consider the following: -- GitLab