Skip to content

Commit

Permalink
ci: fix build failure
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <thxcode0824@gmail.com>
  • Loading branch information
thxCode committed Sep 28, 2024
1 parent e784ca2 commit 5f77b6c
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 6 deletions.
65 changes: 59 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,15 @@ jobs:
if [ "\${ID}" = "ubuntu" ]; then
apt-get update -y \
&& apt-get install -y binutils pkg-config build-essential libopenblas-dev ccache curl git
if [[ "\${VERSION_ID}" =~ 18\\.* ]]; then
apt-get install -y software-properties-common
if [[ "\$(uname -m)" == "aarch64" ]]; then
apt-get update -y \
&& apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update -y \
&& apt-get install -y gcc-9 g++-9
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 30 --slave /usr/bin/g++ g++ /usr/bin/g++-9
update-alternatives --config gcc
&& apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
gcc --version
fi
elif [ "\${ID}" = "rocky" ]; then
# NB(thxCode): Enbale EPEL, see
Expand Down Expand Up @@ -376,6 +378,16 @@ jobs:
if [ "\${ID}" = "ubuntu" ]; then
apt-get update -y \
&& apt-get install -y build-essential ccache curl git
if [[ "\$(uname -m)" == "aarch64" ]]; then
apt-get update -y \
&& apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update -y \
&& apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
gcc --version
fi
elif [ "\${ID}" = "centos" ]; then
yum install -y https://packages.endpointdev.com/rhel/\${VERSION_ID}/os/\$(uname -m)/endpoint-repo.\$(uname -m).rpm
yum update -y \
Expand Down Expand Up @@ -500,6 +512,16 @@ jobs:
if [ "\${ID}" = "ubuntu" ]; then
apt-get update -y \
&& apt-get install -y build-essential ccache curl git
if [[ "\$(uname -m)" == "aarch64" ]]; then
apt-get update -y \
&& apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update -y \
&& apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
gcc --version
fi
elif [ "\${ID}" = "rocky" ]; then
# NB(thxCode): Enbale EPEL, see
# https://wiki.rockylinux.org/rocky/repo/#notes-on-epel.
Expand Down Expand Up @@ -650,6 +672,16 @@ jobs:
if [ "\${ID}" = "ubuntu" ]; then
apt-get update -y \
&& apt-get install -y build-essential ccache curl git
if [[ "\$(uname -m)" == "aarch64" ]]; then
apt-get update -y \
&& apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update -y \
&& apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
gcc --version
fi
elif [ "\${ID}" = "rocky" ]; then
# NB(thxCode): Enbale EPEL, see
# https://wiki.rockylinux.org/rocky/repo/#notes-on-epel.
Expand Down Expand Up @@ -780,6 +812,16 @@ jobs:
if [ "\${ID}" = "ubuntu" ]; then
apt-get update -y \
&& apt-get install -y build-essential ccache curl git
if [[ "\$(uname -m)" == "aarch64" ]]; then
apt-get update -y \
&& apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update -y \
&& apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
gcc --version
fi
elif [ "\${ID}" = "openEuler" ]; then
yum update -y \
&& yum install -y gcc gcc-c++ gcc-toolset-10-gcc*
Expand Down Expand Up @@ -900,7 +942,18 @@ jobs:
source /etc/os-release
cat /etc/os-release
if [ "\${ID}" = "ubuntu" ]; then
apt-get update -y && apt-get install -y build-essential ccache curl git
apt-get update -y \
&& apt-get install -y build-essential ccache curl git
if [[ "\$(uname -m)" == "aarch64" ]]; then
apt-get update -y \
&& apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update -y \
&& apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
gcc --version
fi
else
echo "Unsupport distribution: \$ID"
exit 1
Expand Down
16 changes: 16 additions & 0 deletions llama-box/patches/ggml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c
index fac4466e..e8fbc784 100644
--- a/ggml/src/ggml.c
+++ b/ggml/src/ggml.c
@@ -3693,7 +3693,11 @@ static void ggml_init_arm_arch_features(void) {
uint32_t hwcap2 = getauxval(AT_HWCAP2);

ggml_arm_arch_features.has_neon = !!(hwcap & HWCAP_ASIMD);
+#if defined(GGML_ARM_CPU_I8MM_DETECT)
ggml_arm_arch_features.has_i8mm = !!(hwcap2 & HWCAP2_I8MM);
+#else
+ ggml_arm_arch_features.has_i8mm = 0;
+#endif
ggml_arm_arch_features.has_sve = !!(hwcap & HWCAP_SVE);

#if defined(__ARM_FEATURE_SVE)

0 comments on commit 5f77b6c

Please sign in to comment.