Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenBLAS
4 changes: 2 additions & 2 deletions ci-before-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ set -xe
if [[ "$NIGHTLY" = "true" ]]; then
pushd OpenBLAS
git checkout develop
# Set the pyproject.toml version: convert v0.3.24-30-g138ed79f to 0.3.34.30
# Set the pyproject.toml version: convert v0.3.24-30-g138ed79f to 0.3.24.30.0
version=$(git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
popd
sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml
sed -e "s/^version = .*/version = \"${version}.0\"/" -i.bak pyproject.toml
fi

if [ "$(uname)" != "Darwin" ]; then
Expand Down
2,820 changes: 2,820 additions & 0 deletions patches/extern.patch

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions patches/extern_arm64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/kernel/generic/cabs.c b/kernel/generic/cabs.c
index f76f69b20..e2454b41e 100644
--- a/kernel/generic/cabs.c
+++ b/kernel/generic/cabs.c
@@ -39,6 +39,7 @@
#include <math.h>
#include "common.h"

+__attribute__ ((visibility ("default")))
FLOAT NAME(FLOAT *a){
return fabs(a[0]) + fabs(a[1]);
}
diff --git a/kernel/generic/lsame.c b/kernel/generic/lsame.c
index 83fff1798..3ef95f3d4 100644
--- a/kernel/generic/lsame.c
+++ b/kernel/generic/lsame.c
@@ -38,6 +38,7 @@

#include <ctype.h>

+__attribute__ ((visibility ("default")))
int NAME(const char *A, const char *B){

char a = *A;
84 changes: 84 additions & 0 deletions patches/extern_asm_hidden.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
diff --git a/common_loongarch64.h b/common_loongarch64.h
index 6e96984f6..f0c925132 100644
--- a/common_loongarch64.h
+++ b/common_loongarch64.h
@@ -270,6 +270,7 @@ static inline int get_cpu_model(char *model_name) {
.text ;\
.align 5 ;\
.globl REALNAME ;\
+ .hidden REALNAME ;\
.type REALNAME, @function ;\
REALNAME: ;\

diff --git a/common_mips64.h b/common_mips64.h
index c7eb212df..2f4640323 100644
--- a/common_mips64.h
+++ b/common_mips64.h
@@ -210,6 +210,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
.set ASSEMBLER_ARCH ;\
.align 5 ;\
.globl REALNAME ;\
+ .hidden REALNAME ;\
.ent REALNAME ;\
.type REALNAME, @function ;\
REALNAME: ;\
diff --git a/common_power.h b/common_power.h
index ded76ad51..1bf964528 100644
--- a/common_power.h
+++ b/common_power.h
@@ -535,6 +535,7 @@ static inline int blas_quickdivide(blasint x, blasint y){
.section .text;\
.align 6;\
.globl REALNAME;\
+ .hidden REALNAME ;\
.type REALNAME, @function;\
REALNAME:
#define EPILOGUE .size REALNAME, .-REALNAME
@@ -544,6 +545,7 @@ REALNAME:
.section .text;\
.align 6;\
.globl REALNAME;\
+ .hidden REALNAME ;\
.type REALNAME, @function;\
REALNAME:
#define EPILOGUE .size REALNAME, .-REALNAME
@@ -552,6 +554,7 @@ REALNAME:
.section .text;\
.align 5;\
.globl REALNAME;\
+ .hidden REALNAME ;\
.section ".opd","aw";\
.align 3;\
REALNAME:;\
@@ -560,6 +563,7 @@ REALNAME:;\
.size REALNAME, 24;\
.type .REALNAME, @function;\
.globl .REALNAME;\
+ .hidden .REALNAME ;\
.REALNAME:
#define EPILOGUE \
.long 0 ; \
diff --git a/common_x86.h b/common_x86.h
index 65fb9a460..12c854df4 100644
--- a/common_x86.h
+++ b/common_x86.h
@@ -339,6 +339,7 @@ REALNAME:
.text; \
.align 16; \
.globl REALNAME ;\
+ .hidden REALNAME ;\
.type REALNAME, @function; \
REALNAME: \
_CET_ENDBR
diff --git a/common_x86_64.h b/common_x86_64.h
index 143e188a7..fff5eefbc 100644
--- a/common_x86_64.h
+++ b/common_x86_64.h
@@ -454,6 +454,7 @@ REALNAME:
.text; \
.align 512; \
.globl REALNAME ;\
+ .hidden REALNAME ;\
.type REALNAME, @function; \
REALNAME: \
_CET_ENDBR
12 changes: 12 additions & 0 deletions patches/use_generics.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/kernel/Makefile.LA b/kernel/Makefile.LA
index 88342718c..3b1939d26 100644
--- a/kernel/Makefile.LA
+++ b/kernel/Makefile.LA
@@ -49,3 +49,7 @@ $(KDIR)zlaswp_ncopy$(TSUFFIX).$(SUFFIX) $(KDIR)zlaswp_ncopy$(TSUFFIX).$(PSUFFIX)
$(KDIR)xlaswp_ncopy$(TSUFFIX).$(SUFFIX) $(KDIR)xlaswp_ncopy$(TSUFFIX).$(PSUFFIX) : generic/zlaswp_ncopy_$(XGEMM_UNROLL_N).c
$(CC) -c $(CFLAGS) $< -o $@

+LSAME_KERNEL = ../generic/lsame.c
+SCABS_KERNEL = ../generic/cabs.c
+DCABS_KERNEL = ../generic/cabs.c
+QCABS_KERNEL = ../generic/cabs.c
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "scipy-openblas64"
# v0.3.30-359-g29fab2b9
version = "0.3.30.359.0"
version = "0.3.30.359.1"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
16 changes: 9 additions & 7 deletions tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ function patch_source {
echo applying patch $f
git apply ../patches/$f
done
# local version=$(git describe --tags --abbrev=8 | sed -e "s/^v//" | sed -e "s/\\./-/g")
# sed -e "s/^VERSION = .*/VERSION = ${version}/" -i.bak Makefile.rule
}

function do_build_lib {
Expand Down Expand Up @@ -208,16 +210,16 @@ function do_build_lib {
echo "QEMU has a race condition preventing fork tests to work as expected"
fi
if [ -n "$dynamic_list" ]; then
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \
USE_OPENMP=0 NUM_THREADS=64 \
CFLAGS="$CFLAGS -fvisibility=hidden -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 NO_LAPACKE=1 \
DYNAMIC_LIST="$dynamic_list" \
BINARY="$bitness" $interface_flags \
TARGET="$target"
else
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \
USE_OPENMP=0 NUM_THREADS=64 \
CFLAGS="$CFLAGS -fvisibility=hidden -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 NO_LAPACKE=1 \
BINARY="$bitness" $interface_flags \
TARGET="$target"
fi
Expand Down Expand Up @@ -291,7 +293,7 @@ function build_lib_on_travis {
function build_on_travis {
if [ ${TRAVIS_EVENT_TYPE} == "cron" ]; then
build_lib_on_travis "$PLAT" "$INTERFACE64" 1
version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
local version=$(cd OpenBLAS && git describe --tags --abbrev=8 | sed -e "s/^v\(.*\)-g.*/\1/" | sed -e "s/-/./g")
sed -e "s/^version = .*/version = \"${version}\"/" -i.bak pyproject.toml
else
build_lib_on_travis "$PLAT" "$INTERFACE64" 0
Expand Down
2 changes: 1 addition & 1 deletion tools/local_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ export BUILD_PREFIX=/tmp/openblas
mkdir -p $BUILD_PREFIX

ROOT_DIR=$(dirname $(dirname $0))
bash ${ROOT_DIR}/build-openblas.sh
${ROOT_DIR}/build-openblas.sh
Loading