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
+4 -1
View File
@@ -3,6 +3,7 @@
# see http://dlib.net/compile.html # see http://dlib.net/compile.html
, avxSupport ? true , avxSupport ? true
, cudaSupport ? true
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@@ -20,7 +21,9 @@ stdenv.mkDerivation rec {
rm -rf dlib/external 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; enableParallelBuilding = true;
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];