diff --git a/cmake/configure.cmake b/cmake/configure.cmake index 04cc327323c76bfe29934cfb243f34bec5de4224..69220e03fe8e337205f31cb1f45e3e19ae4f5d1e 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 0803a4e8740453a5c64f3cae9d42ecff807b29e5..e26d8d9df386e65137aa83cc60a43bfeabf7a4a6 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