@@ -33,7 +33,7 @@ function get_plat_tag {
33
33
local mb_ml_ver=${MB_ML_VER:- 1}
34
34
local mb_ml_libc=${MB_ML_LIBC:- manylinux}
35
35
case $plat in
36
- i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le) ;;
36
+ i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le|loongarch64 ) ;;
37
37
* ) echo Did not recognize plat $plat ; return 1 ;;
38
38
esac
39
39
local uname=${2:- $(uname)}
@@ -77,6 +77,9 @@ function build_lib {
77
77
# Manylinux wrapper
78
78
local libc=${MB_ML_LIBC:- manylinux}
79
79
local docker_image=quay.io/pypa/${libc}${manylinux} _${plat}
80
+ if [ " $plat " == " loongarch64" ]; then
81
+ local docker_image=ghcr.io/loong64/${libc}${manylinux} _${plat}
82
+ fi
80
83
docker pull $docker_image
81
84
# Docker sources this script, and runs `do_build_lib`
82
85
docker run --rm \
@@ -148,6 +151,9 @@ function do_build_lib {
148
151
local bitness=64
149
152
local target=" POWER8"
150
153
;;
154
+ Linux-loongarch64)
155
+ local target=" GENERIC"
156
+ ;;
151
157
* ) echo " Strange plat value $plat " ; exit 1 ;;
152
158
esac
153
159
case $interface64 in
@@ -170,6 +176,12 @@ function do_build_lib {
170
176
pushd OpenBLAS
171
177
patch_source
172
178
echo start building
179
+ if [ " $plat " == " loongarch64" ]; then
180
+ # https://github.com/OpenMathLib/OpenBLAS/blob/develop/.github/workflows/loongarch64.yml#L65
181
+ echo -n > utest/test_dsdot.c
182
+ echo " Due to the qemu versions 7.2 causing utest cases to fail,"
183
+ echo " the utest dsdot:dsdot_n_1 have been temporarily disabled."
184
+ fi
173
185
if [ -v dynamic_list ]; then
174
186
CFLAGS=" $CFLAGS -fvisibility=protected -Wno-uninitialized" \
175
187
make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \
0 commit comments