Add openblas v0.3.28 with patch (#46495)

This commit is contained in:
Derek Ryan Strong 2024-10-02 00:40:03 -07:00 committed by GitHub
parent 6af8526aa1
commit 6740ea79af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 6 deletions

View File

@ -0,0 +1,14 @@
--- a/driver/others/blas_server.c 2024-09-18 17:09:48.362101394 -0700
+++ b/driver/others/blas_server.c 2024-09-18 17:12:59.690940586 -0700
@@ -1076,6 +1076,11 @@
main_status[cpu] = MAIN_RUNNING1;
#endif
+if (buffer == NULL) {
+ blas_thread_buffer[cpu] = blas_memory_alloc(2);
+ buffer = blas_thread_buffer[cpu];
+}
+
//For target LOONGSON3R5, applying an offset to the buffer is essential
//for minimizing cache conflicts and optimizing performance.
#if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY)

View File

@ -26,6 +26,7 @@ class Openblas(CMakePackage, MakefilePackage):
license("BSD-3-Clause")
version("develop", branch="develop")
version("0.3.28", sha256="f1003466ad074e9b0c8d421a204121100b0751c96fc6fcf3d1456bd12f8a00a1")
version("0.3.27", sha256="aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897")
version("0.3.26", sha256="4e6e4f5cb14c209262e33e6816d70221a2fe49eb69eaf0a06f065598ac602c68")
version("0.3.25", sha256="4c25cb30c4bb23eddca05d7d0a85997b8db6144f5464ba7f8c09ce91e2f35543")
@ -61,10 +62,6 @@ class Openblas(CMakePackage, MakefilePackage):
version("0.2.16", sha256="766f350d0a4be614812d535cead8c816fc3ad3b9afcd93167ea5e4df9d61869b")
version("0.2.15", sha256="73c40ace5978282224e5e122a41c8388c5a19e65a6f2329c2b7c0b61bacc9044")
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
variant(
"fortran",
default=True,
@ -106,6 +103,14 @@ class Openblas(CMakePackage, MakefilePackage):
provides("lapack@3.9.1:", when="@0.3.15:")
provides("lapack@3.7.0", when="@0.2.20")
depends_on("c", type="build")
depends_on("cxx", type="build")
depends_on("fortran", type="build")
depends_on("perl", when="@:0.3.20", type="build")
# https://github.com/OpenMathLib/OpenBLAS/pull/4879
patch("openblas-0.3.28-thread-buffer.patch", when="@0.3.28")
# https://github.com/OpenMathLib/OpenBLAS/pull/4328
patch("xcode15-fortran.patch", when="@0.3.25 %apple-clang@15:")
@ -266,8 +271,6 @@ class Openblas(CMakePackage, MakefilePackage):
conflicts("target=x86_64_v4:", when="%intel@2021")
depends_on("perl", type="build")
build_system("makefile", "cmake", default="makefile")
def flag_handler(self, name, flags):