From 24737e5beb45e8aade86e94f19ce7cded2c3261b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 23 Jul 2020 09:04:35 +0200 Subject: [PATCH] oneDNN: use SSE 4.1 when running tests Feature detection may fail, leading to illegal instructions when running tests. Cap tests at SSE 4.1, which is supported on many Intel/AMD CPUs since 2006/2007. --- pkgs/development/libraries/oneDNN/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/oneDNN/default.nix b/pkgs/development/libraries/oneDNN/default.nix index af00b757b139..c20a06fc6bc4 100644 --- a/pkgs/development/libraries/oneDNN/default.nix +++ b/pkgs/development/libraries/oneDNN/default.nix @@ -24,6 +24,9 @@ stdenv.mkDerivation rec { preCheck = '' export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/src export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/src + '' + lib.optionalString stdenv.isx86_64 '' + # Use baseline SIMD in case CPU features get misdetected. + export DNNL_MAX_CPU_ISA=SSE41 ''; # The cmake install gets tripped up and installs a nix tree into $out, in