Skip to content

Commit fcf80fe

Browse files
committed
use DYNAMIC_LIST to limit the number of kernels compiled into the wheel
1 parent 35b5f6a commit fcf80fe

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

tools/build_openblas.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ if [ "$build_bits" == 64 ]; then
6464
extra="-fno-asynchronous-unwind-tables"
6565
vc_arch="X64"
6666
plat_tag="win_amd64"
67+
dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX"
6768
else
6869
march=pentium4
6970
extra="-mfpmath=sse -msse2"
7071
fextra="-m32"
7172
vc_arch="i386"
7273
plat_tag="win32"
74+
dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL"
7375
fi
7476
cflags="-O2 -march=$march -mtune=generic $extra"
7577
fflags="$fextra $cflags -frecursive -ffpe-summary=invalid,zero"
@@ -94,7 +96,8 @@ OPENBLAS_VERSION=$(git describe --tags --abbrev=8)
9496
# Variable used in creating output libraries
9597
make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
9698
NUM_THREADS=24 NO_WARMUP=1 NO_AFFINITY=1 CONSISTENT_FPCSR=1 \
97-
BUILD_LAPACK_DEPRECATED=1 TARGET=PRESCOTT BUFFERSIZE=20\
99+
BUILD_LAPACK_DEPRECATED=1 TARGET=PRESCOTT BUFFERSIZE=20 \
100+
DYNAMIC_LIST="$dynamic_list" \
98101
LDFLAGS="$LDFLAGS" \
99102
COMMON_OPT="$cflags" \
100103
FCOMMON_OPT="$fflags" \

tools/build_steps.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,32 +124,35 @@ function do_build_lib {
124124
case $(get_os)-$plat in
125125
Linux-x86_64)
126126
local bitness=64
127-
local target_flags="TARGET=PRESCOTT"
127+
local target=PRESCOTT
128+
local dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX"
128129
;;
129130
Darwin-x86_64)
130131
local bitness=64
131-
local target_flags="TARGET=CORE2"
132+
local target_flags=CORE2
133+
local dynamic_list="CORE2 NEHALEM SANDYBRIDGE HASWELL SKYLAKEX"
132134
# Pick up the gfortran runtime libraries
133135
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
134136
;;
135137
*-i686)
136138
local bitness=32
137-
local target_flags="TARGET=PRESCOTT"
139+
local target_flags=PRESCOTT
140+
local dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL"
138141
;;
139142
Linux-aarch64)
140143
local bitness=64
141-
local target_flags="TARGET=ARMV8"
144+
local target=ARMV8
142145
;;
143146
Darwin-arm64)
144147
local bitness=64
145-
local target_flags="TARGET=VORTEX"
148+
local target=VORTEX
146149
;;
147150
*-s390x)
148151
local bitness=64
149152
;;
150153
*-ppc64le)
151154
local bitness=64
152-
local target_flags="TARGET=POWER8"
155+
local target=POWER8
153156
;;
154157
*) echo "Strange plat value $plat"; exit 1 ;;
155158
esac

0 commit comments

Comments
 (0)