openblas: disable AVX512, make optional

This effectly reverts 383075f38b94b25ff30ec68a1bb19b35dc9ce4e8.

Some AVX512 optimized kernels seem to be broken in openblas.
See https://github.com/NixOS/nixpkgs/issues/124250.

(cherry picked from commit 5946bc724fe4f7f37ba907ae01d851f070fc97e0)
This commit is contained in:
Markus Kowalewski 2021-05-25 10:22:25 +02:00
parent 65a1f5fbdc
commit 95bb2c374f
No known key found for this signature in database
GPG Key ID: 502A248E3FB4FF48

View File

@ -17,6 +17,10 @@
, target ? null
# Select whether DYNAMIC_ARCH is enabled or not.
, dynamicArch ? null
# enable AVX512 optimized kernels.
# These kernels have been a source of trouble in the past.
# Use with caution.
, enableAVX512 ? false
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
@ -71,6 +75,7 @@ let
BINARY = 64;
TARGET = setTarget "ATHLON";
DYNAMIC_ARCH = setDynamicArch true;
NO_AVX512 = !enableAVX512;
USE_OPENMP = false;
MACOSX_DEPLOYMENT_TARGET = "10.7";
};
@ -79,6 +84,7 @@ let
BINARY = 64;
TARGET = setTarget "ATHLON";
DYNAMIC_ARCH = setDynamicArch true;
NO_AVX512 = !enableAVX512;
USE_OPENMP = !stdenv.hostPlatform.isMusl;
};