Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add loongarch64 platform support #183

Merged
merged 1 commit into from
Jan 6, 2025
Merged
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
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