Skip to content

Commit

Permalink
Merge pull request #183 from loong64/main
Browse files Browse the repository at this point in the history
feat: add loongarch64 platform support
  • Loading branch information
mattip authored Jan 6, 2025
2 parents 0532c11 + 6707b07 commit 85d1b1d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function get_plat_tag {
local mb_ml_ver=${MB_ML_VER:-1}
local mb_ml_libc=${MB_ML_LIBC:-manylinux}
case $plat in
i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le) ;;
i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le|loongarch64) ;;
*) echo Did not recognize plat $plat; return 1 ;;
esac
local uname=${2:-$(uname)}
Expand Down Expand Up @@ -148,6 +148,9 @@ function do_build_lib {
local bitness=64
local target="POWER8"
;;
Linux-loongarch64)
local target="GENERIC"
;;
*) echo "Strange plat value $plat"; exit 1 ;;
esac
case $interface64 in
Expand All @@ -170,6 +173,12 @@ function do_build_lib {
pushd OpenBLAS
patch_source
echo start building
if [ "$plat" == "loongarch64" ]; then
# https://github.com/OpenMathLib/OpenBLAS/blob/develop/.github/workflows/loongarch64.yml#L65
echo -n > utest/test_dsdot.c
echo "Due to the qemu versions 7.2 causing utest cases to fail,"
echo "the utest dsdot:dsdot_n_1 have been temporarily disabled."
fi
if [ -v dynamic_list ]; then
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \
Expand Down

0 comments on commit 85d1b1d

Please sign in to comment.