commit
f4c6b379d2
@ -2,6 +2,7 @@
|
|||||||
, guiSupport ? false, libX11
|
, guiSupport ? false, libX11
|
||||||
|
|
||||||
# see http://dlib.net/compile.html
|
# see http://dlib.net/compile.html
|
||||||
|
, sse4Support ? stdenv.hostPlatform.sse4_1Support
|
||||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||||
, cudaSupport ? true
|
, cudaSupport ? true
|
||||||
}:
|
}:
|
||||||
@ -23,6 +24,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DUSE_DLIB_USE_CUDA=${if cudaSupport then "1" else "0"}"
|
"-DUSE_DLIB_USE_CUDA=${if cudaSupport then "1" else "0"}"
|
||||||
|
"-DUSE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
|
||||||
"-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
|
"-DUSE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ buildPythonPackage, stdenv, lib, dlib, python, pytest, more-itertools
|
{ buildPythonPackage, stdenv, lib, dlib, python, pytest, more-itertools
|
||||||
|
, sse4Support ? stdenv.hostPlatform.sse4_1Support
|
||||||
, avxSupport ? stdenv.hostPlatform.avxSupport
|
, avxSupport ? stdenv.hostPlatform.avxSupport
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -12,7 +13,10 @@ buildPythonPackage {
|
|||||||
${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
|
${python.interpreter} nix_run_setup test --no USE_AVX_INSTRUCTIONS
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupPyBuildFlags = lib.optional avxSupport "--no USE_AVX_INSTRUCTIONS";
|
setupPyBuildFlags = [
|
||||||
|
"--set USE_SSE4_INSTRUCTIONS=${if sse4Support then "yes" else "no"}"
|
||||||
|
"--set USE_AVX_INSTRUCTIONS=${if avxSupport then "yes" else "no"}"
|
||||||
|
];
|
||||||
|
|
||||||
patches = [ ./build-cores.patch ];
|
patches = [ ./build-cores.patch ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user