Merge pull request #85089 from alexanderwatanabe/master

CUDA support
This commit is contained in:
Maximilian Bosch 2020-04-12 19:24:59 +02:00 committed by GitHub
commit 7f7e55ff5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@
# see http://dlib.net/compile.html
, avxSupport ? true
, cudaSupport ? true
}:
stdenv.mkDerivation rec {
@ -20,7 +21,9 @@ stdenv.mkDerivation rec {
rm -rf dlib/external
'';
cmakeFlags = [ "-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
cmakeFlags = [
"-DUSE_DLIB_USE_CUDA=${if cudaSupport then "1" else "0"}"
"-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
enableParallelBuilding = true;
nativeBuildInputs = [ cmake pkgconfig ];