work around a bug in nvcc

This commit is contained in:
Davis King 2020-06-10 08:19:59 -04:00
parent 7fe355e0ec
commit 1515adc744
1 changed files with 1 additions and 1 deletions

View File

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