[LLM] Downgrade amx build gcc version and remove avx flag display (#8856)

* downgrade to gcc 11
* remove avx display
This commit is contained in:
xingyuan li 2023-08-31 14:08:13 +09:00 committed by GitHub
parent 3b4f4e1c3d
commit de6c6bb17f
2 changed files with 5 additions and 21 deletions

View file

@ -239,7 +239,7 @@ jobs:
run: |
export http_proxy=${HTTP_PROXY}
export https_proxy=${HTTPS_PROXY}
yum install -y gcc-toolset-12 cmake git
yum install -y gcc-toolset-11 cmake git
conda remove -n python39 --all -y
conda create -n python39 python=3.9 -y
- uses: actions/checkout@v3
@ -251,13 +251,13 @@ jobs:
- name: Build amx binary
shell: bash
run: |
scl enable gcc-toolset-12 "cmake -DONLYAVX=OFF -DONLYAVX2=OFF -B build"
scl enable gcc-toolset-12 "cmake --build build --config Release -j"
scl enable gcc-toolset-11 "cmake -DONLYAVX=OFF -DONLYAVX2=OFF -B build"
scl enable gcc-toolset-11 "cmake --build build --config Release -j"
# build chatglm
source activate python39 || conda activate python39
cd src/chatglm
scl enable gcc-toolset-12 "cmake -B build"
scl enable gcc-toolset-12 "cmake --build build --config Release -j"
scl enable gcc-toolset-11 "cmake -B build"
scl enable gcc-toolset-11 "cmake --build build --config Release -j"
- name: Move amx release binary
shell: bash
run: |

View file

@ -9,19 +9,6 @@ n_predict=128
llm_dir="$(dirname "$(python -c "import bigdl.llm;print(bigdl.llm.__file__)")")"
lib_dir="$llm_dir/libs"
function get_avx_flags() {
avx="avx2"
if command -v lscpu &>/dev/null; then
msg=$(lscpu)
if [[ $msg == *"avx512_vnni"* ]]; then
avx="avx512"
fi
else
echo "lscpu command not found. Please make sure it is installed."
fi
echo $avx
}
# Function to display help message
function display_help {
echo "usage: ./llm-cli.sh -x MODEL_FAMILY [-h] [args]"
@ -93,9 +80,6 @@ while [[ $# -gt 0 ]]; do
esac
done
avx_flag=$(get_avx_flags)
echo "AVX Flags: $avx_flag"
# Perform actions based on the model_family
if [[ "$model_family" == "llama" ]]; then
llama