diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2020-05-05 11:45:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 13:45:01 -0500 |
commit | 7be7d672b788f807ec9ca8fdead07538806236a3 (patch) | |
tree | a4e6efa6d8bb58d22ae2c78e619496e32f156e4f /var | |
parent | eff8e1d20bf1c957546f696cf2fcb0b385e51807 (diff) | |
download | spack-7be7d672b788f807ec9ca8fdead07538806236a3.tar.gz spack-7be7d672b788f807ec9ca8fdead07538806236a3.tar.bz2 spack-7be7d672b788f807ec9ca8fdead07538806236a3.tar.xz spack-7be7d672b788f807ec9ca8fdead07538806236a3.zip |
OpenBLAS: Fix LLVM 9.0.0 ICE on macOS (#16471)
Recently added patch to port the LLVM 9.0.0 ICE with OpenBLAS and
AVX-512 instructions as well to AppleClang (11.0.3).
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/openblas_appleclang11.patch | 37 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 3 |
2 files changed, 40 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/openblas_appleclang11.patch b/var/spack/repos/builtin/packages/openblas/openblas_appleclang11.patch new file mode 100644 index 0000000000..88fc14aeb0 --- /dev/null +++ b/var/spack/repos/builtin/packages/openblas/openblas_appleclang11.patch @@ -0,0 +1,37 @@ +From 90dba9f71668c0de77b77f32462c78fbbd424db1 Mon Sep 17 00:00:00 2001 +From: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de> +Date: Tue, 5 May 2020 10:44:50 +0200 +Subject: [PATCH] Duplicate earlier Clang 9.0.0 workaround for corresponding + Apple Clang version + +As discussed on the original PR #2329, the "Apple Clang 11.0.3" that appears to be based the same LLVM release produces the same miscompilation of this file. +--- + kernel/x86_64/dsymv_L_microk_skylakex-2.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/kernel/x86_64/dsymv_L_microk_skylakex-2.c b/kernel/x86_64/dsymv_L_microk_skylakex-2.c +index bdcd914fb..f0df5aaa8 100644 +--- a/kernel/x86_64/dsymv_L_microk_skylakex-2.c ++++ b/kernel/x86_64/dsymv_L_microk_skylakex-2.c +@@ -36,7 +36,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #if defined(__clang_patchlevel__) && __clang_major__ == 9 && __clang_minor__ == 0 && __clang_patchlevel__ == 0 + #pragma clang optimize off + #endif +- ++#if defined(__apple_build_version__) && __clang_major__ == 11 && __clang_minor__ == 0 && __clang_patchlevel__ == 3 ++#pragma clang optimize off ++#endif + static void dsymv_kernel_4x4(BLASLONG from, BLASLONG to, FLOAT **a, FLOAT *x, FLOAT *y, FLOAT *temp1, FLOAT *temp2) + { + +@@ -164,6 +166,9 @@ static void dsymv_kernel_4x4(BLASLONG from, BLASLONG to, FLOAT **a, FLOAT *x, FL + #if defined(__clang_patchlevel__) && __clang_major__ == 9 && __clang_minor__ == 0 && __clang_patchlevel__ == 0 + #pragma clang optimize on + #endif ++#if defined(__apple_build_version__) && __clang_major__ == 11 && __clang_minor__ == 0 && __clang_patchlevel__ == 3 ++#pragma clang optimize on ++#endif + + #else + #include "dsymv_L_microk_haswell-2.c" + diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 7d71702de0..da2b461d39 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -92,6 +92,9 @@ class Openblas(MakefilePackage): # Fix https://github.com/xianyi/OpenBLAS/issues/2431 # Patch derived from https://github.com/xianyi/OpenBLAS/pull/2424 patch('openblas-0.3.8-darwin.patch', when='@0.3.8 platform=darwin') + # Fix ICE in LLVM 9.0.0 https://github.com/xianyi/OpenBLAS/pull/2329 + # Patch as in https://github.com/xianyi/OpenBLAS/pull/2597 + patch('openblas_appleclang11.patch', when='@0.3.8:0.3.9 %clang@11.0.3-apple') # Add conditions to f_check to determine the Fujitsu compiler patch('openblas_fujitsu.patch', when='%fj') |