Apply --expt-relaxed-constexpr to all older versions of cuda.

This commit is contained in:
Davis King 2020-07-24 23:50:22 -04:00
parent 5650ce45a1
commit 5a80ca9e5f

View File

@ -633,7 +633,7 @@ if (NOT TARGET dlib)
endif()
endif()
if (CUDA_VERSION VERSION_EQUAL 10.2 OR CUDA_VERSION VERSION_EQUAL 10.1)
if (CUDA_VERSION VERSION_LESS 10.3)
# To avoid this error from nvcc:
# error: calling a constexpr __host__ function("log1p") from a __device__ function("cuda_log1pexp")
# is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.