From e9d25d772274b08c72cddbdfde460f4963c3049b Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Thu, 19 Jun 2025 11:59:51 +0100 Subject: [PATCH 01/27] [OpenBLAS] Update to 0.3.30 --- .../OpenBLAS32@0.3.30/build_tarballs.jl | 21 +++ .../patches/10-disable-running-tests.patch | 20 +++ .../patches/30-openblas-ofast-power.patch | 43 +++++ .../bundled/patches/50-openblas-winexit.patch | 170 ++++++++++++++++++ ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ++++ O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 22 +++ .../patches/10-disable-running-tests.patch | 20 +++ .../patches/30-openblas-ofast-power.patch | 43 +++++ .../bundled/patches/50-openblas-winexit.patch | 170 ++++++++++++++++++ ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ++++ .../build_tarballs.jl | 20 +++ .../patches/10-disable-running-tests.patch | 20 +++ .../patches/30-openblas-ofast-power.patch | 43 +++++ .../bundled/patches/50-openblas-winexit.patch | 170 ++++++++++++++++++ ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ++++ O/OpenBLAS/common.jl | 4 + 16 files changed, 856 insertions(+) create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/30-openblas-ofast-power.patch create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/50-openblas-winexit.patch create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/30-openblas-ofast-power.patch create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/50-openblas-winexit.patch create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl new file mode 100644 index 00000000000..f1b6c490d41 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl @@ -0,0 +1,21 @@ +using BinaryBuilder + +include("../common.jl") + +# Collection of sources required to build OpenBLAS +name = "OpenBLAS32" +version = v"0.3.30" + +sources = openblas_sources(version) +script = openblas_script(openblas32=true, bfloat16=true) +platforms = openblas_platforms(; version) +products = openblas_products() +preferred_llvm_version = v"13.0.1" +dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) + +# Build the tarballs +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) + +# Build trigger: 1 diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch new file mode 100644 index 00000000000..7a24cb18442 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch @@ -0,0 +1,20 @@ +diff --git a/ctest/Makefile b/ctest/Makefile +index bbaf96f8e..75ba5426a 100644 +--- a/ctest/Makefile ++++ b/ctest/Makefile +@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1) + OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3 + endif + endif +-endif + + ifeq ($(SUPPORT_GEMM3M),1) + ifeq ($(USE_OPENMP), 1) +@@ -222,6 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1) + endif + endif + endif ++endif + + + diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/30-openblas-ofast-power.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/30-openblas-ofast-power.patch new file mode 100644 index 00000000000..01089286257 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/30-openblas-ofast-power.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile.power b/Makefile.power +index aa1ca080a..42c417a78 100644 +--- a/Makefile.power ++++ b/Makefile.power +@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10) + ifneq ($(C_COMPILER), PGI) + ifeq ($(C_COMPILER), GCC)) + ifeq ($(GCCVERSIONGTEQ10), 1) +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + else ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + $(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math + endif + else +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + endif + ifeq ($(F_COMPILER), IBM) + FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize +@@ -34,7 +34,7 @@ endif + + ifeq ($(CORE), POWER9) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mvsx -fno-fast-math ++CCOMMON_OPT += -mvsx -fno-fast-math + ifeq ($(C_COMPILER), GCC) + ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +@@ -70,7 +70,7 @@ endif + + ifeq ($(CORE), POWER8) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + CCOMMON_OPT += -fast -Mvect=simd -Mcache_align + endif diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/50-openblas-winexit.patch new file mode 100644 index 00000000000..33389f34a40 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/50-openblas-winexit.patch @@ -0,0 +1,170 @@ +diff --git a/driver/others/memory.c b/driver/others/memory.c +index 6e654ccf..1d2f9f12 100644 +--- a/driver/others/memory.c ++++ b/driver/others/memory.c +@@ -1534,7 +1534,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -1572,75 +1572,11 @@ void DESTRUCTOR gotoblas_quit(void) { + } + + #if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +-#if defined(SMP) +- blas_thread_memory_cleanup(); +-#endif +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} + #ifdef _WIN64 + #pragma comment(linker, "/INCLUDE:_tls_used") + #else + #pragma comment(linker, "/INCLUDE:__tls_used") + #endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +- +-#ifdef _WIN64 +-static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma const_seg() +-#else +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +- +-#ifdef _WIN64 +-static const int(*p_process_term)(void) = on_process_term; +-#pragma const_seg() +-#else +-static int(*p_process_term)(void) = on_process_term; +-#pragma data_seg() +-#endif + #endif + + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) +@@ -3146,7 +3082,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -3175,71 +3111,6 @@ void DESTRUCTOR gotoblas_quit(void) { + #endif + } + +-#if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} +-#ifdef _WIN64 +-#pragma comment(linker, "/INCLUDE:_tls_used") +-#else +-#pragma comment(linker, "/INCLUDE:__tls_used") +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +-static int(*p_process_term)(void) = on_process_term; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +-#endif +- + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + /* Don't call me; this is just work around for PGI / Sun bug */ + void gotoblas_dummy_for_PGI(void) { diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch new file mode 100644 index 00000000000..4f17736e907 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -0,0 +1,30 @@ +From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Tue, 9 Apr 2024 23:09:09 +0100 +Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin + +We aren't affected by the problems in AppleClang that prompted this +fallback to an older architecture. +--- + Makefile.arm64 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Makefile.arm64 b/Makefile.arm64 +index 4feb54523..564ca7942 100644 +--- a/Makefile.arm64 ++++ b/Makefile.arm64 +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) +-ifneq ($(OSNAME), Darwin) + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 +-else +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-endif + ifneq ($(F_COMPILER), NAG) + FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 + endif +-- +2.31.0 + diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl new file mode 100644 index 00000000000..07a6d8a6aed --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -0,0 +1,22 @@ +using BinaryBuilder + +include("../common.jl") + +# Collection of sources required to build OpenBLAS +name = "OpenBLAS" +version = v"0.3.30" + +sources = openblas_sources(version) +script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true) +platforms = openblas_platforms(; version) +push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) +products = openblas_products() +preferred_llvm_version = v"13.0.1" +dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) + +# Build the tarballs +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) + +# Build trigger: 1 diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch new file mode 100644 index 00000000000..7a24cb18442 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch @@ -0,0 +1,20 @@ +diff --git a/ctest/Makefile b/ctest/Makefile +index bbaf96f8e..75ba5426a 100644 +--- a/ctest/Makefile ++++ b/ctest/Makefile +@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1) + OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3 + endif + endif +-endif + + ifeq ($(SUPPORT_GEMM3M),1) + ifeq ($(USE_OPENMP), 1) +@@ -222,6 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1) + endif + endif + endif ++endif + + + diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch new file mode 100644 index 00000000000..01089286257 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile.power b/Makefile.power +index aa1ca080a..42c417a78 100644 +--- a/Makefile.power ++++ b/Makefile.power +@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10) + ifneq ($(C_COMPILER), PGI) + ifeq ($(C_COMPILER), GCC)) + ifeq ($(GCCVERSIONGTEQ10), 1) +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + else ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + $(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math + endif + else +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + endif + ifeq ($(F_COMPILER), IBM) + FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize +@@ -34,7 +34,7 @@ endif + + ifeq ($(CORE), POWER9) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mvsx -fno-fast-math ++CCOMMON_OPT += -mvsx -fno-fast-math + ifeq ($(C_COMPILER), GCC) + ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +@@ -70,7 +70,7 @@ endif + + ifeq ($(CORE), POWER8) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + CCOMMON_OPT += -fast -Mvect=simd -Mcache_align + endif diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch new file mode 100644 index 00000000000..33389f34a40 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch @@ -0,0 +1,170 @@ +diff --git a/driver/others/memory.c b/driver/others/memory.c +index 6e654ccf..1d2f9f12 100644 +--- a/driver/others/memory.c ++++ b/driver/others/memory.c +@@ -1534,7 +1534,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -1572,75 +1572,11 @@ void DESTRUCTOR gotoblas_quit(void) { + } + + #if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +-#if defined(SMP) +- blas_thread_memory_cleanup(); +-#endif +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} + #ifdef _WIN64 + #pragma comment(linker, "/INCLUDE:_tls_used") + #else + #pragma comment(linker, "/INCLUDE:__tls_used") + #endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +- +-#ifdef _WIN64 +-static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma const_seg() +-#else +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +- +-#ifdef _WIN64 +-static const int(*p_process_term)(void) = on_process_term; +-#pragma const_seg() +-#else +-static int(*p_process_term)(void) = on_process_term; +-#pragma data_seg() +-#endif + #endif + + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) +@@ -3146,7 +3082,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -3175,71 +3111,6 @@ void DESTRUCTOR gotoblas_quit(void) { + #endif + } + +-#if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} +-#ifdef _WIN64 +-#pragma comment(linker, "/INCLUDE:_tls_used") +-#else +-#pragma comment(linker, "/INCLUDE:__tls_used") +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +-static int(*p_process_term)(void) = on_process_term; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +-#endif +- + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + /* Don't call me; this is just work around for PGI / Sun bug */ + void gotoblas_dummy_for_PGI(void) { diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch new file mode 100644 index 00000000000..4f17736e907 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -0,0 +1,30 @@ +From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Tue, 9 Apr 2024 23:09:09 +0100 +Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin + +We aren't affected by the problems in AppleClang that prompted this +fallback to an older architecture. +--- + Makefile.arm64 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Makefile.arm64 b/Makefile.arm64 +index 4feb54523..564ca7942 100644 +--- a/Makefile.arm64 ++++ b/Makefile.arm64 +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) +-ifneq ($(OSNAME), Darwin) + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 +-else +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-endif + ifneq ($(F_COMPILER), NAG) + FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 + endif +-- +2.31.0 + diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl new file mode 100644 index 00000000000..9d43d4e0834 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl @@ -0,0 +1,20 @@ +using BinaryBuilder + +include("../common.jl") + +# Collection of sources required to build OpenBLAS +name = "OpenBLASConsistentFPCSR" +version = v"0.3.30" + +sources = openblas_sources(version) +script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) +platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) +products = openblas_products() +dependencies = openblas_dependencies(platforms) + +# Build the tarballs +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.6") + +# Build trigger: 1 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch new file mode 100644 index 00000000000..7a24cb18442 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch @@ -0,0 +1,20 @@ +diff --git a/ctest/Makefile b/ctest/Makefile +index bbaf96f8e..75ba5426a 100644 +--- a/ctest/Makefile ++++ b/ctest/Makefile +@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1) + OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3 + endif + endif +-endif + + ifeq ($(SUPPORT_GEMM3M),1) + ifeq ($(USE_OPENMP), 1) +@@ -222,6 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1) + endif + endif + endif ++endif + + + diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/30-openblas-ofast-power.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/30-openblas-ofast-power.patch new file mode 100644 index 00000000000..01089286257 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/30-openblas-ofast-power.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile.power b/Makefile.power +index aa1ca080a..42c417a78 100644 +--- a/Makefile.power ++++ b/Makefile.power +@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10) + ifneq ($(C_COMPILER), PGI) + ifeq ($(C_COMPILER), GCC)) + ifeq ($(GCCVERSIONGTEQ10), 1) +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + else ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + $(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math + endif + else +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + endif + ifeq ($(F_COMPILER), IBM) + FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize +@@ -34,7 +34,7 @@ endif + + ifeq ($(CORE), POWER9) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mvsx -fno-fast-math ++CCOMMON_OPT += -mvsx -fno-fast-math + ifeq ($(C_COMPILER), GCC) + ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +@@ -70,7 +70,7 @@ endif + + ifeq ($(CORE), POWER8) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + CCOMMON_OPT += -fast -Mvect=simd -Mcache_align + endif diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/50-openblas-winexit.patch new file mode 100644 index 00000000000..33389f34a40 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/50-openblas-winexit.patch @@ -0,0 +1,170 @@ +diff --git a/driver/others/memory.c b/driver/others/memory.c +index 6e654ccf..1d2f9f12 100644 +--- a/driver/others/memory.c ++++ b/driver/others/memory.c +@@ -1534,7 +1534,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -1572,75 +1572,11 @@ void DESTRUCTOR gotoblas_quit(void) { + } + + #if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +-#if defined(SMP) +- blas_thread_memory_cleanup(); +-#endif +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} + #ifdef _WIN64 + #pragma comment(linker, "/INCLUDE:_tls_used") + #else + #pragma comment(linker, "/INCLUDE:__tls_used") + #endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +- +-#ifdef _WIN64 +-static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma const_seg() +-#else +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +- +-#ifdef _WIN64 +-static const int(*p_process_term)(void) = on_process_term; +-#pragma const_seg() +-#else +-static int(*p_process_term)(void) = on_process_term; +-#pragma data_seg() +-#endif + #endif + + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) +@@ -3146,7 +3082,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -3175,71 +3111,6 @@ void DESTRUCTOR gotoblas_quit(void) { + #endif + } + +-#if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} +-#ifdef _WIN64 +-#pragma comment(linker, "/INCLUDE:_tls_used") +-#else +-#pragma comment(linker, "/INCLUDE:__tls_used") +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +-static int(*p_process_term)(void) = on_process_term; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +-#endif +- + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + /* Don't call me; this is just work around for PGI / Sun bug */ + void gotoblas_dummy_for_PGI(void) { diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch new file mode 100644 index 00000000000..4f17736e907 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -0,0 +1,30 @@ +From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Tue, 9 Apr 2024 23:09:09 +0100 +Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin + +We aren't affected by the problems in AppleClang that prompted this +fallback to an older architecture. +--- + Makefile.arm64 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Makefile.arm64 b/Makefile.arm64 +index 4feb54523..564ca7942 100644 +--- a/Makefile.arm64 ++++ b/Makefile.arm64 +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) +-ifneq ($(OSNAME), Darwin) + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 +-else +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-endif + ifneq ($(F_COMPILER), NAG) + FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 + endif +-- +2.31.0 + diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index d3dfea5d4d5..91a23397d84 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -4,6 +4,10 @@ using BinaryBuilderBase: sanitize # Collection of sources required to build OpenBLAS function openblas_sources(version::VersionNumber; kwargs...) openblas_version_sources = Dict( + v"0.3.30" => [ + ArchiveSource("https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.30/OpenBLAS-0.3.30.tar.gz", + "27342cff518646afb4c2b976d809102e368957974c250a25ccc965e53063c95d") + ], v"0.3.29" => [ ArchiveSource("https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.29/OpenBLAS-0.3.29.tar.gz", "38240eee1b29e2bde47ebb5d61160207dc68668a54cac62c076bb5032013b1eb") From e5dbd41ba280daad48002a4b5e522696495854f5 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 20 Jun 2025 09:02:26 +0100 Subject: [PATCH 02/27] Add patch to fix compilation of SBGEMM Neoversev1 kernel --- .../bundled/patches/60-arm-sbgemm-types.patch | 98 +++++++++++++++++++ .../bundled/patches/60-arm-sbgemm-types.patch | 98 +++++++++++++++++++ .../bundled/patches/60-arm-sbgemm-types.patch | 98 +++++++++++++++++++ 3 files changed, 294 insertions(+) create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/60-arm-sbgemm-types.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/60-arm-sbgemm-types.patch diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/60-arm-sbgemm-types.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/60-arm-sbgemm-types.patch new file mode 100644 index 00000000000..98926990ea2 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/60-arm-sbgemm-types.patch @@ -0,0 +1,98 @@ +From badef1d32efd5e8bf9cd052b5a57f866a9754308 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Thu, 19 Jun 2025 14:26:16 +0100 +Subject: [PATCH] Update sbgemm_tcopy_4_neoversev1 kernel to use standard C + types + +--- + kernel/arm64/sbgemm_tcopy_4_neoversev1.c | 32 ++++++++++++------------ + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +index 140e8f7ed..16c71559d 100644 +--- a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c ++++ b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +@@ -52,16 +52,16 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + svbool_t pg16_first_8 = svwhilelt_b16(0, 8); + + svbool_t pg64_first_4 = svwhilelt_b64(0, 4); +- +- u_int32_t sizeof_u64 = 8; +- u_int64_t _st_offsets_0[4] = { ++ ++ uint32_t sizeof_u64 = 8; ++ uint64_t _st_offsets_0[4] = { + 0 * sizeof_u64, + 1 * sizeof_u64, + 4 * sizeof_u64, + 5 * sizeof_u64, + }; + +- u_int64_t _st_offsets_1[4] = { ++ uint64_t _st_offsets_1[4] = { + 2 * sizeof_u64, + 3 * sizeof_u64, + 6 * sizeof_u64, +@@ -108,13 +108,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + + a_offset0 += 8 * lda; +@@ -150,13 +150,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + } + } +@@ -194,9 +194,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + + a_offset0 += 8 * lda; +@@ -229,9 +229,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + } + } +-- +2.49.0 + diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch new file mode 100644 index 00000000000..98926990ea2 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch @@ -0,0 +1,98 @@ +From badef1d32efd5e8bf9cd052b5a57f866a9754308 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Thu, 19 Jun 2025 14:26:16 +0100 +Subject: [PATCH] Update sbgemm_tcopy_4_neoversev1 kernel to use standard C + types + +--- + kernel/arm64/sbgemm_tcopy_4_neoversev1.c | 32 ++++++++++++------------ + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +index 140e8f7ed..16c71559d 100644 +--- a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c ++++ b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +@@ -52,16 +52,16 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + svbool_t pg16_first_8 = svwhilelt_b16(0, 8); + + svbool_t pg64_first_4 = svwhilelt_b64(0, 4); +- +- u_int32_t sizeof_u64 = 8; +- u_int64_t _st_offsets_0[4] = { ++ ++ uint32_t sizeof_u64 = 8; ++ uint64_t _st_offsets_0[4] = { + 0 * sizeof_u64, + 1 * sizeof_u64, + 4 * sizeof_u64, + 5 * sizeof_u64, + }; + +- u_int64_t _st_offsets_1[4] = { ++ uint64_t _st_offsets_1[4] = { + 2 * sizeof_u64, + 3 * sizeof_u64, + 6 * sizeof_u64, +@@ -108,13 +108,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + + a_offset0 += 8 * lda; +@@ -150,13 +150,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + } + } +@@ -194,9 +194,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + + a_offset0 += 8 * lda; +@@ -229,9 +229,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + } + } +-- +2.49.0 + diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/60-arm-sbgemm-types.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/60-arm-sbgemm-types.patch new file mode 100644 index 00000000000..98926990ea2 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/60-arm-sbgemm-types.patch @@ -0,0 +1,98 @@ +From badef1d32efd5e8bf9cd052b5a57f866a9754308 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Thu, 19 Jun 2025 14:26:16 +0100 +Subject: [PATCH] Update sbgemm_tcopy_4_neoversev1 kernel to use standard C + types + +--- + kernel/arm64/sbgemm_tcopy_4_neoversev1.c | 32 ++++++++++++------------ + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +index 140e8f7ed..16c71559d 100644 +--- a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c ++++ b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +@@ -52,16 +52,16 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + svbool_t pg16_first_8 = svwhilelt_b16(0, 8); + + svbool_t pg64_first_4 = svwhilelt_b64(0, 4); +- +- u_int32_t sizeof_u64 = 8; +- u_int64_t _st_offsets_0[4] = { ++ ++ uint32_t sizeof_u64 = 8; ++ uint64_t _st_offsets_0[4] = { + 0 * sizeof_u64, + 1 * sizeof_u64, + 4 * sizeof_u64, + 5 * sizeof_u64, + }; + +- u_int64_t _st_offsets_1[4] = { ++ uint64_t _st_offsets_1[4] = { + 2 * sizeof_u64, + 3 * sizeof_u64, + 6 * sizeof_u64, +@@ -108,13 +108,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + + a_offset0 += 8 * lda; +@@ -150,13 +150,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + } + } +@@ -194,9 +194,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + + a_offset0 += 8 * lda; +@@ -229,9 +229,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + } + } +-- +2.49.0 + From ca778650ea66520cd50f023fa3cf0fea6c425258 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 20 Jun 2025 09:03:33 +0100 Subject: [PATCH 03/27] Remove old patch This looks like it was fixed upstream in https://github.com/OpenMathLib/OpenBLAS/commit/48e017de095018c60d83355804a3075658b4970c --- .../patches/10-disable-running-tests.patch | 20 ------------------- .../patches/10-disable-running-tests.patch | 20 ------------------- .../patches/10-disable-running-tests.patch | 20 ------------------- 3 files changed, 60 deletions(-) delete mode 100644 O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch delete mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch delete mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch deleted file mode 100644 index 7a24cb18442..00000000000 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/10-disable-running-tests.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/ctest/Makefile b/ctest/Makefile -index bbaf96f8e..75ba5426a 100644 ---- a/ctest/Makefile -+++ b/ctest/Makefile -@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1) - OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3 - endif - endif --endif - - ifeq ($(SUPPORT_GEMM3M),1) - ifeq ($(USE_OPENMP), 1) -@@ -222,6 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1) - endif - endif - endif -+endif - - - diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch deleted file mode 100644 index 7a24cb18442..00000000000 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/10-disable-running-tests.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/ctest/Makefile b/ctest/Makefile -index bbaf96f8e..75ba5426a 100644 ---- a/ctest/Makefile -+++ b/ctest/Makefile -@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1) - OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3 - endif - endif --endif - - ifeq ($(SUPPORT_GEMM3M),1) - ifeq ($(USE_OPENMP), 1) -@@ -222,6 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1) - endif - endif - endif -+endif - - - diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch deleted file mode 100644 index 7a24cb18442..00000000000 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/10-disable-running-tests.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/ctest/Makefile b/ctest/Makefile -index bbaf96f8e..75ba5426a 100644 ---- a/ctest/Makefile -+++ b/ctest/Makefile -@@ -203,7 +203,6 @@ ifeq ($(BUILD_COMPLEX16),1) - OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3 - endif - endif --endif - - ifeq ($(SUPPORT_GEMM3M),1) - ifeq ($(USE_OPENMP), 1) -@@ -222,6 +221,7 @@ ifeq ($(BUILD_COMPLEX16),1) - endif - endif - endif -+endif - - - From 255afe75dcb8352226562835b2f701e35d9cf956 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 20 Jun 2025 09:12:44 +0100 Subject: [PATCH 04/27] Increase LLVM version to get newer aarch64 instructions --- O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl index f1b6c490d41..408ad17cc4c 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl @@ -10,7 +10,7 @@ sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true) platforms = openblas_platforms(; version) products = openblas_products() -preferred_llvm_version = v"13.0.1" +preferred_llvm_version = v"16.0.6" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl index 07a6d8a6aed..cfe01d69aa6 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -11,7 +11,7 @@ script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=tr platforms = openblas_platforms(; version) push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() -preferred_llvm_version = v"13.0.1" +preferred_llvm_version = v"16.0.6" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl index 9d43d4e0834..df3b44031d5 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl @@ -10,11 +10,12 @@ sources = openblas_sources(version) script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) products = openblas_products() -dependencies = openblas_dependencies(platforms) +preferred_llvm_version = v"16.0.6" +dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version=v"11", lock_microarchitecture=false, - julia_compat="1.6") + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) # Build trigger: 1 From b1d9941857f299f9b27b754731d3f513c94891bc Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Fri, 3 Oct 2025 12:12:45 +0100 Subject: [PATCH 05/27] Add printing of build flags to make it obvious what we do --- O/OpenBLAS/common.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index 91a23397d84..038be529d46 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -218,6 +218,9 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, atomic_patch -p1 ${f} done + # Print the flags for posterity + echo "Build flags: ${flags[@]}" + # Build the actual library make "${flags[@]}" From 43bbf5fcfc4174d1b3d352aae5b52720fbbf8830 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 30 Dec 2025 22:28:14 -0500 Subject: [PATCH 06/27] Correct aarch64 build problems --- O/OpenBLAS/common.jl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index 0c10479e970..17be2dc59ae 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -129,7 +129,14 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, # Build BFLOAT16 kernels if [[ "${BFLOAT16}" == "true" ]]; then - flags+=(BUILD_BFLOAT16=1) + if [[ "${target}" == aarch64-*-darwin* || "${target}" == aarch64-*-freebsd* ]]; then + # Bfloat16 support is broken on aarch64 darwin and freebsd. + # Clang 13 ... 16 report internal compiler errors such as: + # `fatal error: error in backend: Cannot select: 0x1555483de020: bf16,ch = load<(load (s16) from %ir.917, !tbaa !17)> 0x15554822e090, 0x1555483e1830, undef:i64` + flags+=(BUILD_BFLOAT16=0) + else + flags+=(BUILD_BFLOAT16=1) + fi fi # We are cross-compiling @@ -209,7 +216,6 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, export LDFLAGS="${LDFLAGS} -Wl,-rpath,@loader_path/" fi - # Enter the fun zone cd ${WORKSPACE}/srcdir/OpenBLAS*/ @@ -269,7 +275,7 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, end function openblas_platforms(;experimental::Bool=true, version::Union{Nothing,VersionNumber}=nothing, kwargs...) - platforms = expand_gfortran_versions(supported_platforms(;experimental)) + platforms = expand_gfortran_versions(supported_platforms()) # OpenBLAS 0.3.29 doesn't support GCC < v11 on powerpc64le: # . # This means we can't build it at all for libgfortran 3 and 4. From 51854bcf18d8a890a5e14703fffa22c4c0d72ce3 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 31 Dec 2025 11:46:01 -0500 Subject: [PATCH 07/27] OpenBLAS: Correct aarch64 build problems --- O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl | 2 +- ...th-proper-aarch64-flags-on-Neoverse-Darwin.patch | 13 +++++++------ O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 2 +- ...th-proper-aarch64-flags-on-Neoverse-Darwin.patch | 13 +++++++------ .../build_tarballs.jl | 2 +- ...th-proper-aarch64-flags-on-Neoverse-Darwin.patch | 13 +++++++------ O/OpenBLAS/common.jl | 3 +++ 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl index 408ad17cc4c..ff3898fbd67 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl @@ -10,7 +10,7 @@ sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true) platforms = openblas_platforms(; version) products = openblas_products() -preferred_llvm_version = v"16.0.6" +preferred_llvm_version = v"13.0.1+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 4f17736e907..2ea03eb7981 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -13,15 +13,16 @@ diff --git a/Makefile.arm64 b/Makefile.arm64 index 4feb54523..564ca7942 100644 --- a/Makefile.arm64 +++ b/Makefile.arm64 -@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) +@@ -142,11 +142,11 @@ ifeq ($(CORE), NEOVERSEN2) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) --ifneq ($(OSNAME), Darwin) - CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 --else --CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 --endif + ifneq ($(OSNAME), Darwin) +-CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 ++CCOMMON_OPT += -march=armv8.5-a+sve+sve2 -mtune=cortex-a72 + else + CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 + endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 endif diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl index cfe01d69aa6..4c034566285 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -11,7 +11,7 @@ script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=tr platforms = openblas_platforms(; version) push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() -preferred_llvm_version = v"16.0.6" +preferred_llvm_version = v"13.0.1+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 4f17736e907..2ea03eb7981 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -13,15 +13,16 @@ diff --git a/Makefile.arm64 b/Makefile.arm64 index 4feb54523..564ca7942 100644 --- a/Makefile.arm64 +++ b/Makefile.arm64 -@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) +@@ -142,11 +142,11 @@ ifeq ($(CORE), NEOVERSEN2) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) --ifneq ($(OSNAME), Darwin) - CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 --else --CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 --endif + ifneq ($(OSNAME), Darwin) +-CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 ++CCOMMON_OPT += -march=armv8.5-a+sve+sve2 -mtune=cortex-a72 + else + CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 + endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 endif diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl index df3b44031d5..e78e857eaa2 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl @@ -10,7 +10,7 @@ sources = openblas_sources(version) script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) products = openblas_products() -preferred_llvm_version = v"16.0.6" +preferred_llvm_version = v"13.0.1+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 4f17736e907..2ea03eb7981 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -13,15 +13,16 @@ diff --git a/Makefile.arm64 b/Makefile.arm64 index 4feb54523..564ca7942 100644 --- a/Makefile.arm64 +++ b/Makefile.arm64 -@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) +@@ -142,11 +142,11 @@ ifeq ($(CORE), NEOVERSEN2) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) --ifneq ($(OSNAME), Darwin) - CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 --else --CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 --endif + ifneq ($(OSNAME), Darwin) +-CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 ++CCOMMON_OPT += -march=armv8.5-a+sve+sve2 -mtune=cortex-a72 + else + CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 + endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 endif diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index 17be2dc59ae..d539f6a90d1 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -224,6 +224,9 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, atomic_patch -p1 ${f} done + # Choose our make parallelism + flags+=(-j${nproc}) + # Print the flags for posterity echo "Build flags: ${flags[@]}" From da7d7c5dc67d9d3481ca4ce67016cd944941e4bf Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 31 Dec 2025 12:08:49 -0500 Subject: [PATCH 08/27] OpenBLAS: Correct Darwin patch --- ...Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch | 6 +++--- ...Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch | 6 +++--- ...Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 2ea03eb7981..5e2d6246c36 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -18,10 +18,10 @@ index 4feb54523..564ca7942 100644 ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) ifneq ($(OSNAME), Darwin) --CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 -+CCOMMON_OPT += -march=armv8.5-a+sve+sve2 -mtune=cortex-a72 + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 else - CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 ++CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n2 endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 2ea03eb7981..5e2d6246c36 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -18,10 +18,10 @@ index 4feb54523..564ca7942 100644 ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) ifneq ($(OSNAME), Darwin) --CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 -+CCOMMON_OPT += -march=armv8.5-a+sve+sve2 -mtune=cortex-a72 + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 else - CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 ++CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n2 endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 2ea03eb7981..5e2d6246c36 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -18,10 +18,10 @@ index 4feb54523..564ca7942 100644 ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) ifneq ($(OSNAME), Darwin) --CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 -+CCOMMON_OPT += -march=armv8.5-a+sve+sve2 -mtune=cortex-a72 + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 else - CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 ++CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n2 endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 From cef04a7ff1956ae282c71d72d1605b4b418b8b80 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 13 Jan 2026 11:35:06 -0500 Subject: [PATCH 09/27] OpenBLAS: Save state --- O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 5 ++++- ...h-proper-aarch64-flags-on-Neoverse-Darwin.patch | 9 ++++----- O/OpenBLAS/common.jl | 14 +++++++------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl index 4c034566285..8e8cbdd2b96 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -11,7 +11,10 @@ script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=tr platforms = openblas_platforms(; version) push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() -preferred_llvm_version = v"13.0.1+0" +#FAIL preferred_llvm_version = v"13.0.1+0" +#FAIL preferred_llvm_version = v"16.0.6+0" +preferred_llvm_version = v"17.0.6+0" +#GOOD preferred_llvm_version = v"18.1.7+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 5e2d6246c36..4f17736e907 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -13,16 +13,15 @@ diff --git a/Makefile.arm64 b/Makefile.arm64 index 4feb54523..564ca7942 100644 --- a/Makefile.arm64 +++ b/Makefile.arm64 -@@ -142,11 +142,11 @@ ifeq ($(CORE), NEOVERSEN2) +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) - ifneq ($(OSNAME), Darwin) +-ifneq ($(OSNAME), Darwin) CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 - else +-else -CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 -+CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n2 - endif +-endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 endif diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index d539f6a90d1..ae1556225be 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -129,14 +129,14 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, # Build BFLOAT16 kernels if [[ "${BFLOAT16}" == "true" ]]; then - if [[ "${target}" == aarch64-*-darwin* || "${target}" == aarch64-*-freebsd* ]]; then - # Bfloat16 support is broken on aarch64 darwin and freebsd. - # Clang 13 ... 16 report internal compiler errors such as: - # `fatal error: error in backend: Cannot select: 0x1555483de020: bf16,ch = load<(load (s16) from %ir.917, !tbaa !17)> 0x15554822e090, 0x1555483e1830, undef:i64` - flags+=(BUILD_BFLOAT16=0) - else + #TODO if [[ "${target}" == aarch64-*-darwin* || "${target}" == aarch64-*-freebsd* ]]; then + #TODO # Bfloat16 support is broken on aarch64 darwin and freebsd. + #TODO # Clang 13 ... 16 report internal compiler errors such as: + #TODO # `fatal error: error in backend: Cannot select: 0x1555483de020: bf16,ch = load<(load (s16) from %ir.917, !tbaa !17)> 0x15554822e090, 0x1555483e1830, undef:i64` + #TODO flags+=(BUILD_BFLOAT16=0) + #TODO else flags+=(BUILD_BFLOAT16=1) - fi + #TODO fi fi # We are cross-compiling From 0d1e20356f46442342b4c438666ba61e1e84e60b Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 16 Jan 2026 09:22:06 -0500 Subject: [PATCH 10/27] Add bfloat16 for all platforms --- .../OpenBLAS32@0.3.30/build_tarballs.jl | 4 +- ...per-aarch64-flags-on-Neoverse-Darwin.patch | 9 ++- O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 56 ++++++++++++++++--- .../build_tarballs.jl | 6 +- ...per-aarch64-flags-on-Neoverse-Darwin.patch | 9 ++- O/OpenBLAS/common.jl | 9 +-- 6 files changed, 62 insertions(+), 31 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl index ff3898fbd67..bd0653b9f6a 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl @@ -10,7 +10,7 @@ sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true) platforms = openblas_platforms(; version) products = openblas_products() -preferred_llvm_version = v"13.0.1+0" +preferred_llvm_version = v"17.0.6+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs @@ -18,4 +18,4 @@ build_tarballs(ARGS, name, version, sources, script, platforms, products, depend preferred_gcc_version=v"11", lock_microarchitecture=false, julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) -# Build trigger: 1 +# Build trigger: 2 diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 5e2d6246c36..4f17736e907 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -13,16 +13,15 @@ diff --git a/Makefile.arm64 b/Makefile.arm64 index 4feb54523..564ca7942 100644 --- a/Makefile.arm64 +++ b/Makefile.arm64 -@@ -142,11 +142,11 @@ ifeq ($(CORE), NEOVERSEN2) +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) - ifneq ($(OSNAME), Darwin) +-ifneq ($(OSNAME), Darwin) CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 - else +-else -CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 -+CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n2 - endif +-endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 endif diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl index 8e8cbdd2b96..adcc497ca2d 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -1,4 +1,5 @@ using BinaryBuilder +using BinaryBuilderBase include("../common.jl") @@ -7,19 +8,58 @@ name = "OpenBLAS" version = v"0.3.30" sources = openblas_sources(version) -script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true) +script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true) platforms = openblas_platforms(; version) +# Note: The msan build doesn't use gfortran, and we thus don't expand the gfortran versions push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() -#FAIL preferred_llvm_version = v"13.0.1+0" -#FAIL preferred_llvm_version = v"16.0.6+0" preferred_llvm_version = v"17.0.6+0" -#GOOD preferred_llvm_version = v"18.1.7+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) +# Everything below is necessary only because we need to build msan platforms with a different LLVM version. +# We can only build msan platforms with LLVM 13, but we need to build non-msan builds with LLVM 17 to get bfloat16 support. +# +# For the love of god, can someone PLEASE just build msan support for a modern LLVM? + +# Do we build all platforms, or those specified as arguments? +platform_args = filter(arg -> !startswith(arg, "--"), ARGS) +if !isempty(platform_args) + @assert length(platform_args) == 1 + platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) +end + +# The regular options, excluding the list of platforms +option_args = filter(arg -> startswith(arg, "--"), ARGS) + +non_msan_platforms = filter(p -> sanitize(p) != "memory", platforms) +msan_platforms = filter(p -> sanitize(p) == "memory", platforms) + # Build the tarballs -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; - preferred_gcc_version=v"11", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) +if isempty(msan_platforms) + # No special case + build_tarballs(option_args, name, version, sources, script, non_msan_platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) +else + msan_preferred_llvm_version = v"13.0.1+0" + # Note: Only build depencencies differ between msan and non-msan builds + msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) + if isempty(non_msan_platforms) + # Only msan builds -- also straightforward + build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) + else + # We need to build both msan and non-msan platforms. + # We register the build products only after the last build. + non_register_option_args = filter(arg -> arg != "--register", option_args) + build_tarballs(non_register_option_args, name, version, sources, script, non_msan_platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) + build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) + end +end -# Build trigger: 1 +# Build trigger: 2 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl index e78e857eaa2..5c8c1a9396f 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl @@ -7,10 +7,10 @@ name = "OpenBLASConsistentFPCSR" version = v"0.3.30" sources = openblas_sources(version) -script = openblas_script(;aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) +script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) products = openblas_products() -preferred_llvm_version = v"13.0.1+0" +preferred_llvm_version = v"17.0.6+0" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs @@ -18,4 +18,4 @@ build_tarballs(ARGS, name, version, sources, script, platforms, products, depend preferred_gcc_version=v"11", lock_microarchitecture=false, julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) -# Build trigger: 1 +# Build trigger: 2 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch index 5e2d6246c36..4f17736e907 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -13,16 +13,15 @@ diff --git a/Makefile.arm64 b/Makefile.arm64 index 4feb54523..564ca7942 100644 --- a/Makefile.arm64 +++ b/Makefile.arm64 -@@ -142,11 +142,11 @@ ifeq ($(CORE), NEOVERSEN2) +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) - ifneq ($(OSNAME), Darwin) +-ifneq ($(OSNAME), Darwin) CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 - else +-else -CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 -+CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=neoverse-n2 - endif +-endif ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 endif diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index ae1556225be..70c20c7e362 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -129,14 +129,7 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, # Build BFLOAT16 kernels if [[ "${BFLOAT16}" == "true" ]]; then - #TODO if [[ "${target}" == aarch64-*-darwin* || "${target}" == aarch64-*-freebsd* ]]; then - #TODO # Bfloat16 support is broken on aarch64 darwin and freebsd. - #TODO # Clang 13 ... 16 report internal compiler errors such as: - #TODO # `fatal error: error in backend: Cannot select: 0x1555483de020: bf16,ch = load<(load (s16) from %ir.917, !tbaa !17)> 0x15554822e090, 0x1555483e1830, undef:i64` - #TODO flags+=(BUILD_BFLOAT16=0) - #TODO else - flags+=(BUILD_BFLOAT16=1) - #TODO fi + flags+=(BUILD_BFLOAT16=1) fi # We are cross-compiling From e60dca66c247dd83d0ef7c65cae6399b4228d451 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 16 Jan 2026 10:21:59 -0500 Subject: [PATCH 11/27] OpenBLAS: Reduce build parallelism --- O/OpenBLAS/common.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index 70c20c7e362..fcc765ad892 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -4,6 +4,10 @@ using BinaryBuilderBase: sanitize # Collection of sources required to build OpenBLAS function openblas_sources(version::VersionNumber; kwargs...) openblas_version_sources = Dict( + v"0.3.31" => [ + ArchiveSource("https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.31/OpenBLAS-0.3.31.tar.gz", + "6dd2a63ac9d32643b7cc636eab57bf4e57d0ed1fff926dfbc5d3d97f2d2be3a6") + ], v"0.3.30" => [ ArchiveSource("https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.30/OpenBLAS-0.3.30.tar.gz", "27342cff518646afb4c2b976d809102e368957974c250a25ccc965e53063c95d") @@ -217,8 +221,10 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, atomic_patch -p1 ${f} done - # Choose our make parallelism - flags+=(-j${nproc}) + # Choose our make parallelism. + # We need less parallelism so that we don't run out of memory. + flags+=(-j$(((nproc + 1) / 2))) + # Print the flags for posterity echo "Build flags: ${flags[@]}" From c0fbcf7ac623ee586d2da53725f0d63a65ed7a70 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 16 Jan 2026 11:01:10 -0500 Subject: [PATCH 12/27] OpenBLAS: Reduce build parallelism --- O/OpenBLAS/common.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index fcc765ad892..f32ec273c41 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -222,9 +222,9 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, done # Choose our make parallelism. - # We need less parallelism so that we don't run out of memory. - flags+=(-j$(((nproc + 1) / 2))) - + flags+=(-j${nproc}) + # The Makefile will otherwise override our choice + export MAKE_NB_JOBS=0 # Print the flags for posterity echo "Build flags: ${flags[@]}" From 559c696c0f000854a94a39ddfabe7642017db765 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 16 Jan 2026 12:45:23 -0500 Subject: [PATCH 13/27] OpenBLAS: Build with LLVM 18 --- O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl index bd0653b9f6a..05146e9022f 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.30/build_tarballs.jl @@ -10,7 +10,7 @@ sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true) platforms = openblas_platforms(; version) products = openblas_products() -preferred_llvm_version = v"17.0.6+0" +preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl index adcc497ca2d..9b9ba455545 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -13,7 +13,7 @@ platforms = openblas_platforms(; version) # Note: The msan build doesn't use gfortran, and we thus don't expand the gfortran versions push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() -preferred_llvm_version = v"17.0.6+0" +preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Everything below is necessary only because we need to build msan platforms with a different LLVM version. diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl index 5c8c1a9396f..4f152c9ee42 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.30/build_tarballs.jl @@ -10,7 +10,7 @@ sources = openblas_sources(version) script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) products = openblas_products() -preferred_llvm_version = v"17.0.6+0" +preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) # Build the tarballs From 2d9613a3f918d68cdda4eeb6bd4a43acbfc5eed4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 16 Jan 2026 19:30:28 -0500 Subject: [PATCH 14/27] OpenBLAS: Add float16 support --- .../OpenBLAS32@0.3.31/build_tarballs.jl | 23 +++ .../bundled/patches/10-dynamic-riscv64.patch | 21 +++ .../patches/20-riscv64-bfloat.patch.disabled | 14 ++ .../bundled/patches/50-openblas-winexit.patch | 170 ++++++++++++++++++ ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ++++ O/OpenBLAS/common.jl | 8 +- 6 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/10-dynamic-riscv64.patch create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/50-openblas-winexit.patch create mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl new file mode 100644 index 00000000000..7b49990964c --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -0,0 +1,23 @@ +using BinaryBuilder + +include("../common.jl") + +# Collection of sources required to build OpenBLAS +name = "OpenBLAS32" +version = v"0.3.31" + +# NOTE: riscv64: Disabling `_zvfbfwma` in a patch doesn't work. Next idea: Build with GCC 15. + +sources = openblas_sources(version) +script = openblas_script(openblas32=true, bfloat16=true, float16=true) +platforms = openblas_platforms(; version) +products = openblas_products() +preferred_llvm_version = v"18.1.7" +dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) + +# Build the tarballs +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + preferred_gcc_version=v"15", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) + +# Build trigger: 0 diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/10-dynamic-riscv64.patch b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/10-dynamic-riscv64.patch new file mode 100644 index 00000000000..071b421ebe5 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/10-dynamic-riscv64.patch @@ -0,0 +1,21 @@ +diff --git a/driver/others/dynamic_riscv64.c b/driver/others/dynamic_riscv64.c +index 726f76d79..919663b22 100644 +--- a/driver/others/dynamic_riscv64.c ++++ b/driver/others/dynamic_riscv64.c +@@ -99,7 +99,7 @@ struct riscv_hwprobe { + #define RISCV_HWPROBE_IMA_V (1 << 2) + #define RISCV_HWPROBE_EXT_ZFH (1 << 27) + #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) +-#define RISCV_HWPROBE_EXT_ZVFBFWMA (1 << 54) ++#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54) + + #ifndef NR_riscv_hwprobe + #ifndef NR_arch_specific_syscall +@@ -152,6 +152,7 @@ char* gotoblas_corename(void) { + static gotoblas_t* get_coretype(void) { + uint64_t vector_mask; + unsigned vlenb = 0; ++ char coremsg[128]; + + #if !defined(OS_LINUX) + return NULL; diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled new file mode 100644 index 00000000000..006bb2a47c9 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled @@ -0,0 +1,14 @@ +diff --git a/Makefile.riscv64 b/Makefile.riscv64 +index d8da98d5f..9cad6bc19 100644 +--- a/Makefile.riscv64 ++++ b/Makefile.riscv64 +@@ -10,9 +10,6 @@ RISCV64_OPT = rv64imafdcv + ifeq ($(BUILD_HFLOAT16), 1) + RISCV64_OPT := $(RISCV64_OPT)_zvfh_zfh + endif +-ifeq ($(BUILD_BFLOAT16), 1) +-RISCV64_OPT := $(RISCV64_OPT)_zvfbfwma +-endif + ifeq ($(CORE), RISCV64_ZVL256B) + CCOMMON_OPT += -march=$(RISCV64_OPT)_zvl256b -mabi=lp64d + FCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/50-openblas-winexit.patch new file mode 100644 index 00000000000..33389f34a40 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/50-openblas-winexit.patch @@ -0,0 +1,170 @@ +diff --git a/driver/others/memory.c b/driver/others/memory.c +index 6e654ccf..1d2f9f12 100644 +--- a/driver/others/memory.c ++++ b/driver/others/memory.c +@@ -1534,7 +1534,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -1572,75 +1572,11 @@ void DESTRUCTOR gotoblas_quit(void) { + } + + #if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +-#if defined(SMP) +- blas_thread_memory_cleanup(); +-#endif +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} + #ifdef _WIN64 + #pragma comment(linker, "/INCLUDE:_tls_used") + #else + #pragma comment(linker, "/INCLUDE:__tls_used") + #endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +- +-#ifdef _WIN64 +-static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma const_seg() +-#else +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +- +-#ifdef _WIN64 +-static const int(*p_process_term)(void) = on_process_term; +-#pragma const_seg() +-#else +-static int(*p_process_term)(void) = on_process_term; +-#pragma data_seg() +-#endif + #endif + + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) +@@ -3146,7 +3082,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -3175,71 +3111,6 @@ void DESTRUCTOR gotoblas_quit(void) { + #endif + } + +-#if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} +-#ifdef _WIN64 +-#pragma comment(linker, "/INCLUDE:_tls_used") +-#else +-#pragma comment(linker, "/INCLUDE:__tls_used") +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +-static int(*p_process_term)(void) = on_process_term; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +-#endif +- + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + /* Don't call me; this is just work around for PGI / Sun bug */ + void gotoblas_dummy_for_PGI(void) { diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch new file mode 100644 index 00000000000..4f17736e907 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -0,0 +1,30 @@ +From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Tue, 9 Apr 2024 23:09:09 +0100 +Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin + +We aren't affected by the problems in AppleClang that prompted this +fallback to an older architecture. +--- + Makefile.arm64 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Makefile.arm64 b/Makefile.arm64 +index 4feb54523..564ca7942 100644 +--- a/Makefile.arm64 ++++ b/Makefile.arm64 +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) +-ifneq ($(OSNAME), Darwin) + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 +-else +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-endif + ifneq ($(F_COMPILER), NAG) + FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 + endif +-- +2.31.0 + diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index f32ec273c41..2211ea10b52 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -93,7 +93,7 @@ end # Do not override the default `num_64bit_threads` here, instead pass a custom from specific OpenBLAS versions # that should opt into a higher thread count. -function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, aarch64_ilp64::Bool=false, consistent_fpcsr::Bool=false, bfloat16::Bool=false, kwargs...) +function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, aarch64_ilp64::Bool=false, consistent_fpcsr::Bool=false, bfloat16::Bool=false, float16::Bool=false, kwargs...) # Allow some basic configuration script = """ NUM_64BIT_THREADS=$(num_64bit_threads) @@ -101,6 +101,7 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, AARCH64_ILP64=$(aarch64_ilp64) CONSISTENT_FPCSR=$(consistent_fpcsr) BFLOAT16=$(bfloat16) + FLOAT16=$(float16) version_patch=$(version.patch) """ # Bash recipe for building across all platforms @@ -136,6 +137,11 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, flags+=(BUILD_BFLOAT16=1) fi + # Build FLOAT16 kernels + if [[ "${FLOAT16}" == "true" ]]; then + flags+=(BUILD_HFLOAT16=1) + fi + # We are cross-compiling flags+=(CROSS=1 PREFIX=/ "CROSS_SUFFIX=${target}-") From 20f51e6898792e50da522efb529317efeaa4aa48 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 16 Feb 2026 13:21:14 -0500 Subject: [PATCH 15/27] OpenBLAS: Disable -Werror, or try to --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 2 -- O/OpenBLAS/common.jl | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 7b49990964c..18f495f8b4b 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -6,8 +6,6 @@ include("../common.jl") name = "OpenBLAS32" version = v"0.3.31" -# NOTE: riscv64: Disabling `_zvfbfwma` in a patch doesn't work. Next idea: Build with GCC 15. - sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true, float16=true) platforms = openblas_platforms(; version) diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index 2211ea10b52..524c2480619 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -135,10 +135,13 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, # Build BFLOAT16 kernels if [[ "${BFLOAT16}" == "true" ]]; then flags+=(BUILD_BFLOAT16=1) + if [[ "${target}" == riscv64-* ]]; then + CFLAGS="${CFLAGS} -Wno-error=incompatible-pointer-types" + fi fi # Build FLOAT16 kernels - if [[ "${FLOAT16}" == "true" ]]; then + if [[ "${FLOAT16}" == "true" && "${target}" != arm-* && "${target}" != powerpc64le-* ]]; then flags+=(BUILD_HFLOAT16=1) fi From 268e40bae62b6dbea687cae8a159fe3910952683 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 16 Feb 2026 17:57:53 -0500 Subject: [PATCH 16/27] OpenBLAS: Correct x86_64-apple build --- O/OpenBLAS/common.jl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index 524c2480619..aa439110756 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -126,6 +126,14 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, cp -rL ${prefix}/lib/linux/* $(dirname $(readlink -f $(which flang)))/../lib/clang/13.0.1/lib/linux/ fi + # GCC 14+ on Darwin requires additional libraries. + # (These should be in our image; remove this when the RootFS images have been updated.) + if [[ ${target} == *-darwin* ]]; then + if gcc --version | head -n 1 | grep -q '(GCC) 1[45][.]'; then + apk add libdispatch libdispatch-dev --repository=http://dl-cdn.alpinelinux.org/alpine/v3.17/community + fi + fi + # We always want threading flags=(USE_THREAD=1 GEMM_MULTITHREADING_THRESHOLD=400 NO_AFFINITY=1) if [[ "${CONSISTENT_FPCSR}" == "true" ]]; then @@ -136,12 +144,12 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, if [[ "${BFLOAT16}" == "true" ]]; then flags+=(BUILD_BFLOAT16=1) if [[ "${target}" == riscv64-* ]]; then - CFLAGS="${CFLAGS} -Wno-error=incompatible-pointer-types" + flags+=(CFLAGS=-Wno-error=incompatible-pointer-types) fi fi # Build FLOAT16 kernels - if [[ "${FLOAT16}" == "true" && "${target}" != arm-* && "${target}" != powerpc64le-* ]]; then + if [[ "${FLOAT16}" == "true" && "${target}" != arm-* && "${target}" != powerpc64le-* && "${target}" != x86_64-apple-* ]]; then flags+=(BUILD_HFLOAT16=1) fi From fed83f94120fbe6bb2595db27f669df2d9d24313 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 10:41:35 -0500 Subject: [PATCH 17/27] OpenBLAS: All working now --- .../patches/20-riscv64-bfloat.patch.disabled | 14 -- ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ---- .../patches/30-openblas-ofast-power.patch | 43 ----- .../bundled/patches/60-arm-sbgemm-types.patch | 98 ---------- ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ---- .../build_tarballs.jl | 10 +- .../bundled/patches/10-dynamic-riscv64.patch | 21 +++ .../bundled/patches/50-openblas-winexit.patch | 0 .../build_tarballs.jl | 21 +++ .../bundled/patches/10-dynamic-riscv64.patch | 21 +++ .../bundled/patches/50-openblas-winexit.patch | 170 ++++++++++++++++++ O/OpenBLAS/common.jl | 5 + 12 files changed, 243 insertions(+), 220 deletions(-) delete mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled delete mode 100644 O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch delete mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch delete mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch delete mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch rename O/OpenBLAS/{OpenBLAS@0.3.30 => OpenBLAS@0.3.31}/build_tarballs.jl (92%) create mode 100644 O/OpenBLAS/OpenBLAS@0.3.31/bundled/patches/10-dynamic-riscv64.patch rename O/OpenBLAS/{OpenBLAS@0.3.30 => OpenBLAS@0.3.31}/bundled/patches/50-openblas-winexit.patch (100%) create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/10-dynamic-riscv64.patch create mode 100644 O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/50-openblas-winexit.patch diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled deleted file mode 100644 index 006bb2a47c9..00000000000 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/20-riscv64-bfloat.patch.disabled +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Makefile.riscv64 b/Makefile.riscv64 -index d8da98d5f..9cad6bc19 100644 ---- a/Makefile.riscv64 -+++ b/Makefile.riscv64 -@@ -10,9 +10,6 @@ RISCV64_OPT = rv64imafdcv - ifeq ($(BUILD_HFLOAT16), 1) - RISCV64_OPT := $(RISCV64_OPT)_zvfh_zfh - endif --ifeq ($(BUILD_BFLOAT16), 1) --RISCV64_OPT := $(RISCV64_OPT)_zvfbfwma --endif - ifeq ($(CORE), RISCV64_ZVL256B) - CCOMMON_OPT += -march=$(RISCV64_OPT)_zvl256b -mabi=lp64d - FCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch deleted file mode 100644 index 4f17736e907..00000000000 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ /dev/null @@ -1,30 +0,0 @@ -From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 -From: Ian McInerney -Date: Tue, 9 Apr 2024 23:09:09 +0100 -Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin - -We aren't affected by the problems in AppleClang that prompted this -fallback to an older architecture. ---- - Makefile.arm64 | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/Makefile.arm64 b/Makefile.arm64 -index 4feb54523..564ca7942 100644 ---- a/Makefile.arm64 -+++ b/Makefile.arm64 -@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) - ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) - ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) - ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) --ifneq ($(OSNAME), Darwin) - CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 --else --CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 --endif - ifneq ($(F_COMPILER), NAG) - FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 - endif --- -2.31.0 - diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch deleted file mode 100644 index 01089286257..00000000000 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/Makefile.power b/Makefile.power -index aa1ca080a..42c417a78 100644 ---- a/Makefile.power -+++ b/Makefile.power -@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10) - ifneq ($(C_COMPILER), PGI) - ifeq ($(C_COMPILER), GCC)) - ifeq ($(GCCVERSIONGTEQ10), 1) --CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math -+CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math - else ifneq ($(GCCVERSIONGT4), 1) - $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) --CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math -+CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math - else - $(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended) --CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math -+CCOMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math - endif - else --CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math -+CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math - endif - ifeq ($(F_COMPILER), IBM) - FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize -@@ -34,7 +34,7 @@ endif - - ifeq ($(CORE), POWER9) - ifneq ($(C_COMPILER), PGI) --CCOMMON_OPT += -Ofast -mvsx -fno-fast-math -+CCOMMON_OPT += -mvsx -fno-fast-math - ifeq ($(C_COMPILER), GCC) - ifneq ($(GCCVERSIONGT4), 1) - $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) -@@ -70,7 +70,7 @@ endif - - ifeq ($(CORE), POWER8) - ifneq ($(C_COMPILER), PGI) --CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math -+CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math - else - CCOMMON_OPT += -fast -Mvect=simd -Mcache_align - endif diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch deleted file mode 100644 index 98926990ea2..00000000000 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch +++ /dev/null @@ -1,98 +0,0 @@ -From badef1d32efd5e8bf9cd052b5a57f866a9754308 Mon Sep 17 00:00:00 2001 -From: Ian McInerney -Date: Thu, 19 Jun 2025 14:26:16 +0100 -Subject: [PATCH] Update sbgemm_tcopy_4_neoversev1 kernel to use standard C - types - ---- - kernel/arm64/sbgemm_tcopy_4_neoversev1.c | 32 ++++++++++++------------ - 1 file changed, 16 insertions(+), 16 deletions(-) - -diff --git a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c -index 140e8f7ed..16c71559d 100644 ---- a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c -+++ b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c -@@ -52,16 +52,16 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { - svbool_t pg16_first_8 = svwhilelt_b16(0, 8); - - svbool_t pg64_first_4 = svwhilelt_b64(0, 4); -- -- u_int32_t sizeof_u64 = 8; -- u_int64_t _st_offsets_0[4] = { -+ -+ uint32_t sizeof_u64 = 8; -+ uint64_t _st_offsets_0[4] = { - 0 * sizeof_u64, - 1 * sizeof_u64, - 4 * sizeof_u64, - 5 * sizeof_u64, - }; - -- u_int64_t _st_offsets_1[4] = { -+ uint64_t _st_offsets_1[4] = { - 2 * sizeof_u64, - 3 * sizeof_u64, - 6 * sizeof_u64, -@@ -108,13 +108,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { - m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); - m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); - -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_0, svreinterpret_u64_u32(m00)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_1, svreinterpret_u64_u32(m01)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, - st_offsets_0, svreinterpret_u64_u32(m10)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, - st_offsets_1, svreinterpret_u64_u32(m11)); - - a_offset0 += 8 * lda; -@@ -150,13 +150,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { - m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); - m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); - -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_0, svreinterpret_u64_u32(m00)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_1, svreinterpret_u64_u32(m01)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, - st_offsets_0, svreinterpret_u64_u32(m10)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, - st_offsets_1, svreinterpret_u64_u32(m11)); - } - } -@@ -194,9 +194,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { - - m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); - m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_0, svreinterpret_u64_u32(m00)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_1, svreinterpret_u64_u32(m01)); - - a_offset0 += 8 * lda; -@@ -229,9 +229,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { - m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); - m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); - -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_0, svreinterpret_u64_u32(m00)); -- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, -+ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, - st_offsets_1, svreinterpret_u64_u32(m01)); - } - } --- -2.49.0 - diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch deleted file mode 100644 index 4f17736e907..00000000000 --- a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch +++ /dev/null @@ -1,30 +0,0 @@ -From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 -From: Ian McInerney -Date: Tue, 9 Apr 2024 23:09:09 +0100 -Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin - -We aren't affected by the problems in AppleClang that prompted this -fallback to an older architecture. ---- - Makefile.arm64 | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/Makefile.arm64 b/Makefile.arm64 -index 4feb54523..564ca7942 100644 ---- a/Makefile.arm64 -+++ b/Makefile.arm64 -@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) - ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) - ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) - ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) --ifneq ($(OSNAME), Darwin) - CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 --else --CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 --endif - ifneq ($(F_COMPILER), NAG) - FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 - endif --- -2.31.0 - diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl similarity index 92% rename from O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl rename to O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 9b9ba455545..bd67d1d0f51 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -5,7 +5,7 @@ include("../common.jl") # Collection of sources required to build OpenBLAS name = "OpenBLAS" -version = v"0.3.30" +version = v"0.3.31" sources = openblas_sources(version) script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true) @@ -38,7 +38,7 @@ msan_platforms = filter(p -> sanitize(p) == "memory", platforms) if isempty(msan_platforms) # No special case build_tarballs(option_args, name, version, sources, script, non_msan_platforms, products, dependencies; - preferred_gcc_version=v"11", lock_microarchitecture=false, + preferred_gcc_version=v"15", lock_microarchitecture=false, julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) else msan_preferred_llvm_version = v"13.0.1+0" @@ -54,12 +54,12 @@ else # We register the build products only after the last build. non_register_option_args = filter(arg -> arg != "--register", option_args) build_tarballs(non_register_option_args, name, version, sources, script, non_msan_platforms, products, dependencies; - preferred_gcc_version=v"11", lock_microarchitecture=false, + preferred_gcc_version=v"15", lock_microarchitecture=false, julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; - preferred_gcc_version=v"11", lock_microarchitecture=false, + preferred_gcc_version=v"15", lock_microarchitecture=false, julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) end end -# Build trigger: 2 +# Build trigger: 0 diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/bundled/patches/10-dynamic-riscv64.patch b/O/OpenBLAS/OpenBLAS@0.3.31/bundled/patches/10-dynamic-riscv64.patch new file mode 100644 index 00000000000..071b421ebe5 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.31/bundled/patches/10-dynamic-riscv64.patch @@ -0,0 +1,21 @@ +diff --git a/driver/others/dynamic_riscv64.c b/driver/others/dynamic_riscv64.c +index 726f76d79..919663b22 100644 +--- a/driver/others/dynamic_riscv64.c ++++ b/driver/others/dynamic_riscv64.c +@@ -99,7 +99,7 @@ struct riscv_hwprobe { + #define RISCV_HWPROBE_IMA_V (1 << 2) + #define RISCV_HWPROBE_EXT_ZFH (1 << 27) + #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) +-#define RISCV_HWPROBE_EXT_ZVFBFWMA (1 << 54) ++#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54) + + #ifndef NR_riscv_hwprobe + #ifndef NR_arch_specific_syscall +@@ -152,6 +152,7 @@ char* gotoblas_corename(void) { + static gotoblas_t* get_coretype(void) { + uint64_t vector_mask; + unsigned vlenb = 0; ++ char coremsg[128]; + + #if !defined(OS_LINUX) + return NULL; diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLAS@0.3.31/bundled/patches/50-openblas-winexit.patch similarity index 100% rename from O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch rename to O/OpenBLAS/OpenBLAS@0.3.31/bundled/patches/50-openblas-winexit.patch diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl new file mode 100644 index 00000000000..b455faec7c7 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -0,0 +1,21 @@ +using BinaryBuilder + +include("../common.jl") + +# Collection of sources required to build OpenBLAS +name = "OpenBLASConsistentFPCSR" +version = v"0.3.31" + +sources = openblas_sources(version) +script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) +platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) +products = openblas_products() +preferred_llvm_version = v"18.1.7" +dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) + +# Build the tarballs +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + preferred_gcc_version=v"15", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) + +# Build trigger: 0 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/10-dynamic-riscv64.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/10-dynamic-riscv64.patch new file mode 100644 index 00000000000..071b421ebe5 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/10-dynamic-riscv64.patch @@ -0,0 +1,21 @@ +diff --git a/driver/others/dynamic_riscv64.c b/driver/others/dynamic_riscv64.c +index 726f76d79..919663b22 100644 +--- a/driver/others/dynamic_riscv64.c ++++ b/driver/others/dynamic_riscv64.c +@@ -99,7 +99,7 @@ struct riscv_hwprobe { + #define RISCV_HWPROBE_IMA_V (1 << 2) + #define RISCV_HWPROBE_EXT_ZFH (1 << 27) + #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) +-#define RISCV_HWPROBE_EXT_ZVFBFWMA (1 << 54) ++#define RISCV_HWPROBE_EXT_ZVFBFWMA (1ULL << 54) + + #ifndef NR_riscv_hwprobe + #ifndef NR_arch_specific_syscall +@@ -152,6 +152,7 @@ char* gotoblas_corename(void) { + static gotoblas_t* get_coretype(void) { + uint64_t vector_mask; + unsigned vlenb = 0; ++ char coremsg[128]; + + #if !defined(OS_LINUX) + return NULL; diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/50-openblas-winexit.patch new file mode 100644 index 00000000000..33389f34a40 --- /dev/null +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/bundled/patches/50-openblas-winexit.patch @@ -0,0 +1,170 @@ +diff --git a/driver/others/memory.c b/driver/others/memory.c +index 6e654ccf..1d2f9f12 100644 +--- a/driver/others/memory.c ++++ b/driver/others/memory.c +@@ -1534,7 +1534,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -1572,75 +1572,11 @@ void DESTRUCTOR gotoblas_quit(void) { + } + + #if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +-#if defined(SMP) +- blas_thread_memory_cleanup(); +-#endif +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} + #ifdef _WIN64 + #pragma comment(linker, "/INCLUDE:_tls_used") + #else + #pragma comment(linker, "/INCLUDE:__tls_used") + #endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +- +-#ifdef _WIN64 +-static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma const_seg() +-#else +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +- +-#ifdef _WIN64 +-static const int(*p_process_term)(void) = on_process_term; +-#pragma const_seg() +-#else +-static int(*p_process_term)(void) = on_process_term; +-#pragma data_seg() +-#endif + #endif + + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) +@@ -3146,7 +3082,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -3175,71 +3111,6 @@ void DESTRUCTOR gotoblas_quit(void) { + #endif + } + +-#if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} +-#ifdef _WIN64 +-#pragma comment(linker, "/INCLUDE:_tls_used") +-#else +-#pragma comment(linker, "/INCLUDE:__tls_used") +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +-static int(*p_process_term)(void) = on_process_term; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +-#endif +- + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + /* Don't call me; this is just work around for PGI / Sun bug */ + void gotoblas_dummy_for_PGI(void) { diff --git a/O/OpenBLAS/common.jl b/O/OpenBLAS/common.jl index aa439110756..49146bab289 100644 --- a/O/OpenBLAS/common.jl +++ b/O/OpenBLAS/common.jl @@ -215,6 +215,11 @@ function openblas_script(;num_64bit_threads::Integer=32, openblas32::Bool=false, flags+=(TARGET=RISCV64_GENERIC DYNAMIC_ARCH=1) fi + if [[ ${target} == aarch64-*-darwin* ]]; then + # Disable SME (not support on Darwin -- neither by the hardware nor by the toolchain) + export NO_SME=1 + fi + # If we're building for x86_64 Windows gcc7+, we need to disable usage of # certain AVX-512 registers (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782) if [[ ${target} == x86_64-w64-mingw32 ]] && [[ $(gcc --version | head -1 | awk '{ print $3 }') =~ (7|8).* ]]; then From 80547c561c7cfc7de22b9afec274a1bf47369581 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 11:06:51 -0500 Subject: [PATCH 18/27] OpenBLAS: Undo accidental delete --- O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl | 65 +++++++ .../patches/30-openblas-ofast-power.patch | 43 +++++ .../bundled/patches/50-openblas-winexit.patch | 170 ++++++++++++++++++ .../bundled/patches/60-arm-sbgemm-types.patch | 98 ++++++++++ ...per-aarch64-flags-on-Neoverse-Darwin.patch | 30 ++++ 5 files changed, 406 insertions(+) create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch create mode 100644 O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl new file mode 100644 index 00000000000..9b9ba455545 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/build_tarballs.jl @@ -0,0 +1,65 @@ +using BinaryBuilder +using BinaryBuilderBase + +include("../common.jl") + +# Collection of sources required to build OpenBLAS +name = "OpenBLAS" +version = v"0.3.30" + +sources = openblas_sources(version) +script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true) +platforms = openblas_platforms(; version) +# Note: The msan build doesn't use gfortran, and we thus don't expand the gfortran versions +push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) +products = openblas_products() +preferred_llvm_version = v"18.1.7" +dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) + +# Everything below is necessary only because we need to build msan platforms with a different LLVM version. +# We can only build msan platforms with LLVM 13, but we need to build non-msan builds with LLVM 17 to get bfloat16 support. +# +# For the love of god, can someone PLEASE just build msan support for a modern LLVM? + +# Do we build all platforms, or those specified as arguments? +platform_args = filter(arg -> !startswith(arg, "--"), ARGS) +if !isempty(platform_args) + @assert length(platform_args) == 1 + platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) +end + +# The regular options, excluding the list of platforms +option_args = filter(arg -> startswith(arg, "--"), ARGS) + +non_msan_platforms = filter(p -> sanitize(p) != "memory", platforms) +msan_platforms = filter(p -> sanitize(p) == "memory", platforms) + +# Build the tarballs +if isempty(msan_platforms) + # No special case + build_tarballs(option_args, name, version, sources, script, non_msan_platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) +else + msan_preferred_llvm_version = v"13.0.1+0" + # Note: Only build depencencies differ between msan and non-msan builds + msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) + if isempty(non_msan_platforms) + # Only msan builds -- also straightforward + build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) + else + # We need to build both msan and non-msan platforms. + # We register the build products only after the last build. + non_register_option_args = filter(arg -> arg != "--register", option_args) + build_tarballs(non_register_option_args, name, version, sources, script, non_msan_platforms, products, dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) + build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; + preferred_gcc_version=v"11", lock_microarchitecture=false, + julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) + end +end + +# Build trigger: 2 diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch new file mode 100644 index 00000000000..01089286257 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/30-openblas-ofast-power.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile.power b/Makefile.power +index aa1ca080a..42c417a78 100644 +--- a/Makefile.power ++++ b/Makefile.power +@@ -13,16 +13,16 @@ ifeq ($(CORE), POWER10) + ifneq ($(C_COMPILER), PGI) + ifeq ($(C_COMPILER), GCC)) + ifeq ($(GCCVERSIONGTEQ10), 1) +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + else ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + $(warning your compiler is too old to fully support POWER10, getting a newer version of gcc is recommended) +-CCOMMON_OPT += -Ofast -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power9 -mtune=power9 -mvsx -fno-fast-math + endif + else +-CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math + endif + ifeq ($(F_COMPILER), IBM) + FCOMMON_OPT += -O2 -qrecur -qnosave -qarch=pwr10 -qtune=pwr10 -qfloat=nomaf -qzerosize +@@ -34,7 +34,7 @@ endif + + ifeq ($(CORE), POWER9) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mvsx -fno-fast-math ++CCOMMON_OPT += -mvsx -fno-fast-math + ifeq ($(C_COMPILER), GCC) + ifneq ($(GCCVERSIONGT4), 1) + $(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended) +@@ -70,7 +70,7 @@ endif + + ifeq ($(CORE), POWER8) + ifneq ($(C_COMPILER), PGI) +-CCOMMON_OPT += -Ofast -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math ++CCOMMON_OPT += -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math + else + CCOMMON_OPT += -fast -Mvect=simd -Mcache_align + endif diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch new file mode 100644 index 00000000000..33389f34a40 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/50-openblas-winexit.patch @@ -0,0 +1,170 @@ +diff --git a/driver/others/memory.c b/driver/others/memory.c +index 6e654ccf..1d2f9f12 100644 +--- a/driver/others/memory.c ++++ b/driver/others/memory.c +@@ -1534,7 +1534,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -1572,75 +1572,11 @@ void DESTRUCTOR gotoblas_quit(void) { + } + + #if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +-#if defined(SMP) +- blas_thread_memory_cleanup(); +-#endif +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} + #ifdef _WIN64 + #pragma comment(linker, "/INCLUDE:_tls_used") + #else + #pragma comment(linker, "/INCLUDE:__tls_used") + #endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +- +-#ifdef _WIN64 +-static const PIMAGE_TLS_CALLBACK dll_callback(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma const_seg() +-#else +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +- +-#ifdef _WIN64 +-static const int(*p_process_term)(void) = on_process_term; +-#pragma const_seg() +-#else +-static int(*p_process_term)(void) = on_process_term; +-#pragma data_seg() +-#endif + #endif + + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) +@@ -3146,7 +3082,7 @@ void CONSTRUCTOR gotoblas_init(void) { + + } + +-void DESTRUCTOR gotoblas_quit(void) { ++void gotoblas_quit(void) { + + if (gotoblas_initialized == 0) return; + +@@ -3175,71 +3111,6 @@ void DESTRUCTOR gotoblas_quit(void) { + #endif + } + +-#if defined(_MSC_VER) && !defined(__clang__) +-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +-{ +- switch (ul_reason_for_call) +- { +- case DLL_PROCESS_ATTACH: +- gotoblas_init(); +- break; +- case DLL_THREAD_ATTACH: +- break; +- case DLL_THREAD_DETACH: +- break; +- case DLL_PROCESS_DETACH: +- gotoblas_quit(); +- break; +- default: +- break; +- } +- return TRUE; +-} +- +-/* +- This is to allow static linking. +- Code adapted from Google performance tools: +- https://gperftools.googlecode.com/git-history/perftools-1.0/src/windows/port.cc +- Reference: +- https://sourceware.org/ml/pthreads-win32/2008/msg00028.html +- http://ci.boost.org/svn-trac/browser/trunk/libs/thread/src/win32/tss_pe.cpp +-*/ +-static int on_process_term(void) +-{ +- gotoblas_quit(); +- return 0; +-} +-#ifdef _WIN64 +-#pragma comment(linker, "/INCLUDE:_tls_used") +-#else +-#pragma comment(linker, "/INCLUDE:__tls_used") +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XLB") +-#else +-#pragma data_seg(".CRT$XLB") +-#endif +-static void (APIENTRY *dll_callback)(HINSTANCE h, DWORD ul_reason_for_call, PVOID pv) = DllMain; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +- +-#ifdef _WIN64 +-#pragma const_seg(".CRT$XTU") +-#else +-#pragma data_seg(".CRT$XTU") +-#endif +-static int(*p_process_term)(void) = on_process_term; +-#ifdef _WIN64 +-#pragma const_seg() +-#else +-#pragma data_seg() +-#endif +-#endif +- + #if (defined(C_PGI) || (!defined(C_SUN) && defined(F_INTERFACE_SUN))) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + /* Don't call me; this is just work around for PGI / Sun bug */ + void gotoblas_dummy_for_PGI(void) { diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch new file mode 100644 index 00000000000..98926990ea2 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/60-arm-sbgemm-types.patch @@ -0,0 +1,98 @@ +From badef1d32efd5e8bf9cd052b5a57f866a9754308 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Thu, 19 Jun 2025 14:26:16 +0100 +Subject: [PATCH] Update sbgemm_tcopy_4_neoversev1 kernel to use standard C + types + +--- + kernel/arm64/sbgemm_tcopy_4_neoversev1.c | 32 ++++++++++++------------ + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +index 140e8f7ed..16c71559d 100644 +--- a/kernel/arm64/sbgemm_tcopy_4_neoversev1.c ++++ b/kernel/arm64/sbgemm_tcopy_4_neoversev1.c +@@ -52,16 +52,16 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + svbool_t pg16_first_8 = svwhilelt_b16(0, 8); + + svbool_t pg64_first_4 = svwhilelt_b64(0, 4); +- +- u_int32_t sizeof_u64 = 8; +- u_int64_t _st_offsets_0[4] = { ++ ++ uint32_t sizeof_u64 = 8; ++ uint64_t _st_offsets_0[4] = { + 0 * sizeof_u64, + 1 * sizeof_u64, + 4 * sizeof_u64, + 5 * sizeof_u64, + }; + +- u_int64_t _st_offsets_1[4] = { ++ uint64_t _st_offsets_1[4] = { + 2 * sizeof_u64, + 3 * sizeof_u64, + 6 * sizeof_u64, +@@ -108,13 +108,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + + a_offset0 += 8 * lda; +@@ -150,13 +150,13 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + m11 = svzip2_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_0, svreinterpret_u64_u32(m10)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset1, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset1, + st_offsets_1, svreinterpret_u64_u32(m11)); + } + } +@@ -194,9 +194,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + + a_offset0 += 8 * lda; +@@ -229,9 +229,9 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b) { + m00 = svzip1_u32(svreinterpret_u32_u16(t0), svreinterpret_u32_u16(t1)); + m01 = svzip1_u32(svreinterpret_u32_u16(t2), svreinterpret_u32_u16(t3)); + +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_0, svreinterpret_u64_u32(m00)); +- svst1_scatter_u64offset_u64(pg64_first_4, (u_int64_t *)b_offset0, ++ svst1_scatter_u64offset_u64(pg64_first_4, (uint64_t *)b_offset0, + st_offsets_1, svreinterpret_u64_u32(m01)); + } + } +-- +2.49.0 + diff --git a/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch new file mode 100644 index 00000000000..4f17736e907 --- /dev/null +++ b/O/OpenBLAS/OpenBLAS@0.3.30/bundled/patches/70-Build-with-proper-aarch64-flags-on-Neoverse-Darwin.patch @@ -0,0 +1,30 @@ +From df138bb4eb87e4e6770876f167c427cc9ea205a2 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Tue, 9 Apr 2024 23:09:09 +0100 +Subject: [PATCH 1/1] Build with proper aarch64 flags on Neoverse Darwin + +We aren't affected by the problems in AppleClang that prompted this +fallback to an older architecture. +--- + Makefile.arm64 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Makefile.arm64 b/Makefile.arm64 +index 4feb54523..564ca7942 100644 +--- a/Makefile.arm64 ++++ b/Makefile.arm64 +@@ -142,11 +142,7 @@ ifeq ($(CORE), NEOVERSEN2) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCVERSIONGTEQ10) $(ISCLANG))) + ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ11) $(ISCLANG))) +-ifneq ($(OSNAME), Darwin) + CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 +-else +-CCOMMON_OPT += -march=armv8.2-a+sve+bf16 -mtune=cortex-a72 +-endif + ifneq ($(F_COMPILER), NAG) + FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2 + endif +-- +2.31.0 + From 92adfcf9cc2ba7896b6bb58115e0a106474151f0 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 18:03:48 -0500 Subject: [PATCH 19/27] Use GCC 11 except for aarch64-*-darwin* --- .../OpenBLAS32@0.3.31/build_tarballs.jl | 30 ++++++++++-- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 47 +++++++------------ .../build_tarballs.jl | 21 +++++++-- 3 files changed, 60 insertions(+), 38 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 18f495f8b4b..b80bcd5a28e 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -10,12 +10,34 @@ sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true, float16=true) platforms = openblas_platforms(; version) products = openblas_products() +preferred_gcc_version = v"11" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) -# Build the tarballs -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; - preferred_gcc_version=v"15", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) +# Do we build all platforms, or those specified as arguments? +platform_args = filter(arg -> !startswith(arg, "--"), ARGS) +if !isempty(platform_args) + @assert length(platform_args) == 1 + platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) +end + +aarch64_darwin_preferred_gcc_version = v"15" + +# The regular options, excluding the list of platforms +option_args = filter(arg -> startswith(arg, "--"), ARGS) +non_register_option_args = filter(arg -> arg != "--register", option_args) + +for (n,platform) in enumerate(platforms) + # We register the build products only after the last build. + args = n == length(platforms) ? option_args : non_register_option_args + + build_tarballs(args, name, version, sources, script, non_msan_platforms, products, dependencies; + julia_compat="1.11", + lock_microarchitecture=false, + preferred_gcc_version = + arch(p) == "aarch64" && Sys.isapple(arch) ? aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_llvm_version=preferred_llvm_version, + ) +end # Build trigger: 0 diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index bd67d1d0f51..687700e42d0 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -13,6 +13,7 @@ platforms = openblas_platforms(; version) # Note: The msan build doesn't use gfortran, and we thus don't expand the gfortran versions push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() +preferred_gcc_version = v"11" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) @@ -28,38 +29,24 @@ if !isempty(platform_args) platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) end +msan_preferred_llvm_version = v"13.0.1+0" +aarch64_darwin_preferred_gcc_version = v"15" + # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) - -non_msan_platforms = filter(p -> sanitize(p) != "memory", platforms) -msan_platforms = filter(p -> sanitize(p) == "memory", platforms) - -# Build the tarballs -if isempty(msan_platforms) - # No special case - build_tarballs(option_args, name, version, sources, script, non_msan_platforms, products, dependencies; - preferred_gcc_version=v"15", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) -else - msan_preferred_llvm_version = v"13.0.1+0" - # Note: Only build depencencies differ between msan and non-msan builds - msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) - if isempty(non_msan_platforms) - # Only msan builds -- also straightforward - build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; - preferred_gcc_version=v"11", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) - else - # We need to build both msan and non-msan platforms. - # We register the build products only after the last build. - non_register_option_args = filter(arg -> arg != "--register", option_args) - build_tarballs(non_register_option_args, name, version, sources, script, non_msan_platforms, products, dependencies; - preferred_gcc_version=v"15", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) - build_tarballs(option_args, name, version, sources, script, msan_platforms, products, msan_dependencies; - preferred_gcc_version=v"15", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=msan_preferred_llvm_version) - end +non_register_option_args = filter(arg -> arg != "--register", option_args) + +for (n,platform) in enumerate(platforms) + # We register the build products only after the last build. + args = n == length(platforms) ? option_args : non_register_option_args + + build_tarballs(args, name, version, sources, script, non_msan_platforms, products, dependencies; + julia_compat="1.11", + lock_microarchitecture=false, + preferred_gcc_version = + arch(p) == "aarch64" && Sys.isapple(arch) ? aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_llvm_version = sanitize(p) == "memory" ? msan_preferred_llvm_version : preferred_llvm_version, + ) end # Build trigger: 0 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index b455faec7c7..31dcc02ca81 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -10,12 +10,25 @@ sources = openblas_sources(version) script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) products = openblas_products() +preferred_gcc_version = v"11" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) -# Build the tarballs -build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; - preferred_gcc_version=v"15", lock_microarchitecture=false, - julia_compat="1.11", preferred_llvm_version=preferred_llvm_version) +# The regular options, excluding the list of platforms +option_args = filter(arg -> startswith(arg, "--"), ARGS) +non_register_option_args = filter(arg -> arg != "--register", option_args) + +for (n,platform) in enumerate(platforms) + # We register the build products only after the last build. + args = n == length(platforms) ? option_args : non_register_option_args + + build_tarballs(args, name, version, sources, script, non_msan_platforms, products, dependencies; + julia_compat="1.11", + lock_microarchitecture=false, + preferred_gcc_version = + arch(p) == "aarch64" && Sys.isapple(arch) ? aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_llvm_version=preferred_llvm_version, + ) +end # Build trigger: 0 From c98c48ddf865d372f6d8f92f77d9164991946fd6 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 18:06:51 -0500 Subject: [PATCH 20/27] Correct platform selection --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 3 ++- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 5 +++-- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index b80bcd5a28e..7f5c9591202 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -35,7 +35,8 @@ for (n,platform) in enumerate(platforms) julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version = - arch(p) == "aarch64" && Sys.isapple(arch) ? aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + arch(platform) == "aarch64" && Sys.isapple(platform) ? + aarch64_darwin_preferred_gcc_version : preferred_gcc_version, preferred_llvm_version=preferred_llvm_version, ) end diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 687700e42d0..72029e2da06 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -44,8 +44,9 @@ for (n,platform) in enumerate(platforms) julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version = - arch(p) == "aarch64" && Sys.isapple(arch) ? aarch64_darwin_preferred_gcc_version : preferred_gcc_version, - preferred_llvm_version = sanitize(p) == "memory" ? msan_preferred_llvm_version : preferred_llvm_version, + arch(platform) == "aarch64" && Sys.isapple(platform) ? + aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_llvm_version = sanitize(platform) == "memory" ? msan_preferred_llvm_version : preferred_llvm_version, ) end diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index 31dcc02ca81..f653e2c0842 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -26,7 +26,8 @@ for (n,platform) in enumerate(platforms) julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version = - arch(p) == "aarch64" && Sys.isapple(arch) ? aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + arch(platform) == "aarch64" && Sys.isapple(platform) ? + aarch64_darwin_preferred_gcc_version : preferred_gcc_version, preferred_llvm_version=preferred_llvm_version, ) end From f8deaf30450c0d3f5135e39ed69dae973c0ea1e5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 18:14:26 -0500 Subject: [PATCH 21/27] Debug platform selection --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 7f5c9591202..7b260f7467e 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -31,7 +31,7 @@ for (n,platform) in enumerate(platforms) # We register the build products only after the last build. args = n == length(platforms) ? option_args : non_register_option_args - build_tarballs(args, name, version, sources, script, non_msan_platforms, products, dependencies; + build_tarballs(args, name, version, sources, script, [platform], products, dependencies; julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version = diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 72029e2da06..469afa096de 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -40,7 +40,7 @@ for (n,platform) in enumerate(platforms) # We register the build products only after the last build. args = n == length(platforms) ? option_args : non_register_option_args - build_tarballs(args, name, version, sources, script, non_msan_platforms, products, dependencies; + build_tarballs(args, name, version, sources, script, [platform], products, dependencies; julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version = diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index f653e2c0842..b3c2ce2a650 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -22,7 +22,7 @@ for (n,platform) in enumerate(platforms) # We register the build products only after the last build. args = n == length(platforms) ? option_args : non_register_option_args - build_tarballs(args, name, version, sources, script, non_msan_platforms, products, dependencies; + build_tarballs(args, name, version, sources, script, [platform], products, dependencies; julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version = From d9ac582430e1a02871f24fceccb1f0df11e6f8fc Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 18:17:06 -0500 Subject: [PATCH 22/27] Debug platform selection --- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index b3c2ce2a650..f415eed080b 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -14,6 +14,8 @@ preferred_gcc_version = v"11" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) +aarch64_darwin_preferred_gcc_version = v"15" + # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) non_register_option_args = filter(arg -> arg != "--register", option_args) From 517f59f2a8a1372a44ed0e21fb0ebc0bd1786e58 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 18:25:04 -0500 Subject: [PATCH 23/27] Debug platform selection --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 6 ++---- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 6 ++---- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 7b260f7467e..007bc092878 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -21,7 +21,7 @@ if !isempty(platform_args) platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) end -aarch64_darwin_preferred_gcc_version = v"15" +riscv64_preferred_gcc_version = v"15" # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) @@ -34,9 +34,7 @@ for (n,platform) in enumerate(platforms) build_tarballs(args, name, version, sources, script, [platform], products, dependencies; julia_compat="1.11", lock_microarchitecture=false, - preferred_gcc_version = - arch(platform) == "aarch64" && Sys.isapple(platform) ? - aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_gcc_version = arch(platform) == "riscv64" ? riscv64_preferred_gcc_version : preferred_gcc_version, preferred_llvm_version=preferred_llvm_version, ) end diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 469afa096de..576b971f9b0 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -30,7 +30,7 @@ if !isempty(platform_args) end msan_preferred_llvm_version = v"13.0.1+0" -aarch64_darwin_preferred_gcc_version = v"15" +riscv64_preferred_gcc_version = v"15" # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) @@ -43,9 +43,7 @@ for (n,platform) in enumerate(platforms) build_tarballs(args, name, version, sources, script, [platform], products, dependencies; julia_compat="1.11", lock_microarchitecture=false, - preferred_gcc_version = - arch(platform) == "aarch64" && Sys.isapple(platform) ? - aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_gcc_version = arch(platform) == "riscv64" ? riscv64_preferred_gcc_version : preferred_gcc_version, preferred_llvm_version = sanitize(platform) == "memory" ? msan_preferred_llvm_version : preferred_llvm_version, ) end diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index f415eed080b..bae42cb6792 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -14,7 +14,7 @@ preferred_gcc_version = v"11" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) -aarch64_darwin_preferred_gcc_version = v"15" +riscv64_preferred_gcc_version = v"15" # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) @@ -27,9 +27,7 @@ for (n,platform) in enumerate(platforms) build_tarballs(args, name, version, sources, script, [platform], products, dependencies; julia_compat="1.11", lock_microarchitecture=false, - preferred_gcc_version = - arch(platform) == "aarch64" && Sys.isapple(platform) ? - aarch64_darwin_preferred_gcc_version : preferred_gcc_version, + preferred_gcc_version = arch(platform) == "riscv64" ? riscv64_preferred_gcc_version : preferred_gcc_version, preferred_llvm_version=preferred_llvm_version, ) end From 7ce67d6ec2f6663ef101d027bf0ee65b911b2b2e Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 19:23:06 -0500 Subject: [PATCH 24/27] Debug platform selection --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 1 + O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 1 + 2 files changed, 2 insertions(+) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 007bc092878..4f3b7f55d2e 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -1,4 +1,5 @@ using BinaryBuilder +using BinaryBuilderBase include("../common.jl") diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index bae42cb6792..80f27f7cadb 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -1,4 +1,5 @@ using BinaryBuilder +using BinaryBuilderBase include("../common.jl") From 67fc8164afdac820f183c900c9107d7229996e2b Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 17 Feb 2026 20:49:39 -0500 Subject: [PATCH 25/27] Require GCC 12 --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 15 ++++++++------- .../build_tarballs.jl | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 4f3b7f55d2e..ce59b94675f 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -11,7 +11,7 @@ sources = openblas_sources(version) script = openblas_script(openblas32=true, bfloat16=true, float16=true) platforms = openblas_platforms(; version) products = openblas_products() -preferred_gcc_version = v"11" +preferred_gcc_version = v"12" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 576b971f9b0..6c8dccd96b8 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -13,7 +13,7 @@ platforms = openblas_platforms(; version) # Note: The msan build doesn't use gfortran, and we thus don't expand the gfortran versions push!(platforms, Platform("x86_64", "linux"; sanitize="memory")) products = openblas_products() -preferred_gcc_version = v"11" +preferred_gcc_version = v"12" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) @@ -30,6 +30,7 @@ if !isempty(platform_args) end msan_preferred_llvm_version = v"13.0.1+0" +msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) riscv64_preferred_gcc_version = v"15" # The regular options, excluding the list of platforms @@ -40,12 +41,12 @@ for (n,platform) in enumerate(platforms) # We register the build products only after the last build. args = n == length(platforms) ? option_args : non_register_option_args - build_tarballs(args, name, version, sources, script, [platform], products, dependencies; - julia_compat="1.11", - lock_microarchitecture=false, - preferred_gcc_version = arch(platform) == "riscv64" ? riscv64_preferred_gcc_version : preferred_gcc_version, - preferred_llvm_version = sanitize(platform) == "memory" ? msan_preferred_llvm_version : preferred_llvm_version, - ) + deps = sanitize(platform) == "memory" ? msan_dependencies : dependencies + pref_gcc = arch(platform) == "riscv64" ? riscv64_preferred_gcc_version : preferred_gcc_version + pref_llvm = sanitize(platform) == "memory" ? msan_preferred_llvm_version : preferred_llvm_version + + build_tarballs(args, name, version, sources, script, [platform], products, deps; + julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version=pref_gcc, preferred_llvm_version=pref_llvm) end # Build trigger: 0 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index 80f27f7cadb..8db0717fd1a 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -11,7 +11,7 @@ sources = openblas_sources(version) script = openblas_script(; aarch64_ilp64=true, num_64bit_threads=512, bfloat16=true, consistent_fpcsr=true) platforms = expand_gfortran_versions(supported_platforms(; exclude=p -> !(arch(p) in ("x86_64", "aarch64")))) products = openblas_products() -preferred_gcc_version = v"11" +preferred_gcc_version = v"12" preferred_llvm_version = v"18.1.7" dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=preferred_llvm_version) From 1ab75747449184f83dc4fa0a390b998bfd45b843 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 18 Feb 2026 09:26:40 -0500 Subject: [PATCH 26/27] Trigger rebuild --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 4 ++-- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index ce59b94675f..3c2dfbda2c9 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -40,4 +40,4 @@ for (n,platform) in enumerate(platforms) ) end -# Build trigger: 0 +# Build trigger: 1 diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 6c8dccd96b8..527e0d2dedc 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -29,9 +29,9 @@ if !isempty(platform_args) platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) end -msan_preferred_llvm_version = v"13.0.1+0" msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) riscv64_preferred_gcc_version = v"15" +msan_preferred_llvm_version = v"13.0.1+0" # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) @@ -49,4 +49,4 @@ for (n,platform) in enumerate(platforms) julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version=pref_gcc, preferred_llvm_version=pref_llvm) end -# Build trigger: 0 +# Build trigger: 1 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index 8db0717fd1a..5ab7ee5e6ea 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -33,4 +33,4 @@ for (n,platform) in enumerate(platforms) ) end -# Build trigger: 0 +# Build trigger: 1 From f7880458ec0553c7f463d1ae5bc9c252037d606b Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 18 Feb 2026 09:31:04 -0500 Subject: [PATCH 27/27] Trigger rebuild --- O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl | 2 +- O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl | 4 ++-- O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl index 3c2dfbda2c9..364f88f4344 100644 --- a/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS32@0.3.31/build_tarballs.jl @@ -40,4 +40,4 @@ for (n,platform) in enumerate(platforms) ) end -# Build trigger: 1 +# Build trigger: 2 diff --git a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl index 527e0d2dedc..45b79f757c6 100644 --- a/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLAS@0.3.31/build_tarballs.jl @@ -29,9 +29,9 @@ if !isempty(platform_args) platforms = BinaryBuilderBase.parse_platform.(split(platform_args[1], ",")) end -msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) riscv64_preferred_gcc_version = v"15" msan_preferred_llvm_version = v"13.0.1+0" +msan_dependencies = openblas_dependencies(platforms; llvm_compilerrt_version=msan_preferred_llvm_version) # The regular options, excluding the list of platforms option_args = filter(arg -> startswith(arg, "--"), ARGS) @@ -49,4 +49,4 @@ for (n,platform) in enumerate(platforms) julia_compat="1.11", lock_microarchitecture=false, preferred_gcc_version=pref_gcc, preferred_llvm_version=pref_llvm) end -# Build trigger: 1 +# Build trigger: 2 diff --git a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl index 5ab7ee5e6ea..cece982838c 100644 --- a/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl +++ b/O/OpenBLAS/OpenBLASConsistentFPCSR@0.3.31/build_tarballs.jl @@ -33,4 +33,4 @@ for (n,platform) in enumerate(platforms) ) end -# Build trigger: 1 +# Build trigger: 2