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.
This commit is contained in:
Daniël de Kok 2020-07-23 09:04:35 +02:00
parent af5765b0dc
commit 24737e5beb

View file

@ -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