openblas: disable AVX512, make optional

This effectly reverts 383075f38b.

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

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;
};