From b36f3ae761a66b426ee37c96450cd72742387911 Mon Sep 17 00:00:00 2001 From: qijun Date: Mon, 7 Aug 2017 10:42:05 +0800 Subject: [PATCH] follow comments and add flags in cuda 8.0 --- cmake/configure.cmake | 2 +- cmake/flags.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/configure.cmake b/cmake/configure.cmake index 04cc327323c..69220e03fe8 100644 --- a/cmake/configure.cmake +++ b/cmake/configure.cmake @@ -60,7 +60,7 @@ else() message(FATAL_ERROR "Paddle need cudnn to compile") endif() - set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SIMD_FLAG}" "--expt-relaxed-constexpr") + set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler ${SIMD_FLAG}") # Include cuda and cudnn include_directories(${CUDNN_INCLUDE_DIR}) diff --git a/cmake/flags.cmake b/cmake/flags.cmake index 0803a4e8740..e26d8d9df38 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -195,6 +195,7 @@ endif() # Modern gpu architectures: Pascal if (CUDA_VERSION VERSION_GREATER "8.0" OR CUDA_VERSION VERSION_EQUAL "8.0") list(APPEND __arch_flags " -gencode arch=compute_60,code=sm_60") + list(APPEND CUDA_NVCC_FLAGS --expt-relaxed-constexpr) endif() # Custom gpu architecture -- GitLab