summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSergio Sánchez Ramírez <15837247+mofeing@users.noreply.github.com>2023-11-20 11:20:11 +0100
committerGitHub <noreply@github.com>2023-11-20 11:20:11 +0100
commit8003f187098d3c44121f94b8ce716a8eaa1a47c9 (patch)
tree2c056bdfd23a72432760583738fd4430cfb419fd /var
parent87a9b428e5a412a527c11fe641fa9d359dbc1877 (diff)
downloadspack-8003f187098d3c44121f94b8ce716a8eaa1a47c9.tar.gz
spack-8003f187098d3c44121f94b8ce716a8eaa1a47c9.tar.bz2
spack-8003f187098d3c44121f94b8ce716a8eaa1a47c9.tar.xz
spack-8003f187098d3c44121f94b8ce716a8eaa1a47c9.zip
openblas: optimize flags for A64FX (#41093)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index bb9a5ef9ff..e88a3f418e 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -192,6 +192,13 @@ class Openblas(CMakePackage, MakefilePackage):
when="@0.3.21 %gcc@:9",
)
+ # Fix build on A64FX for OpenBLAS v0.3.24
+ patch(
+ "https://github.com/OpenMathLib/OpenBLAS/commit/90231bfc4e4afc51f67c248328fbef0cecdbd2c2.patch?full_index=1",
+ sha256="139e314f3408dc5c080d28887471f382e829d1bd06c8655eb72593e4e7b921cc",
+ when="@0.3.24 target=a64fx",
+ )
+
# See https://github.com/spack/spack/issues/19932#issuecomment-733452619
# Notice: fixed on Amazon Linux GCC 7.3.1 (which is an unofficial version
# as GCC only has major.minor releases. But the bound :7.3.0 doesn't hurt)
@@ -370,6 +377,14 @@ class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder):
# case can go away.
args.append("TARGET=" + "RISCV64_GENERIC")
+ elif self.spec.satisfies("@0.3.19: target=a64fx"):
+ # Special case for Fujitsu's A64FX
+ if any(self.spec.satisfies(i) for i in ["%gcc@11:", "%clang", "%fj"]):
+ args.append("TARGET=A64FX")
+ else:
+ # fallback to armv8-a+sve without -mtune=a64fx flag
+ args.append("TARGET=ARMV8SVE")
+
else:
args.append("TARGET=" + microarch.name.upper())