From 6707b07093a714595c07d36c9b5413a1be7b4db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Wed, 1 Jan 2025 16:07:20 +0800 Subject: [PATCH] feat: add loongarch64 platform support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴小白 <296015668@qq.com> --- tools/build_steps.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/build_steps.sh b/tools/build_steps.sh index 0715c12..3b9d509 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -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)} @@ -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 @@ -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 \