ci : change the cann version and the container pull method (#17953)
fix error format Update build.yml Remove unnecessary zip files fix update
This commit is contained in:
parent
b7f5f46e03
commit
a8c7f33d79
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# Define the CANN base image for easier version updates later
|
# Define the CANN base image for easier version updates later
|
||||||
ARG CHIP_TYPE=910b
|
ARG CHIP_TYPE=910b
|
||||||
ARG CANN_BASE_IMAGE=quay.io/ascend/cann:8.3.rc1.alpha001-${CHIP_TYPE}-openeuler22.03-py3.11
|
ARG CANN_BASE_IMAGE=quay.io/ascend/cann:8.3.rc2-${CHIP_TYPE}-openeuler24.03-py3.11
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# BUILD STAGE
|
# BUILD STAGE
|
||||||
|
|
|
||||||
|
|
@ -1400,26 +1400,55 @@ jobs:
|
||||||
chip_type: ['910b', '310p']
|
chip_type: ['910b', '310p']
|
||||||
build: ['Release']
|
build: ['Release']
|
||||||
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
||||||
container: ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc1.alpha001-910b-openeuler22.03-py3.11' || '8.2.rc1-310p-openeuler22.03-py3.11' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Dependencies
|
- name: Free up disk space
|
||||||
|
uses: ggml-org/free-disk-space@v1.3.1
|
||||||
|
with:
|
||||||
|
tool-cache: true
|
||||||
|
|
||||||
|
- name: Set container image
|
||||||
|
id: cann-image
|
||||||
run: |
|
run: |
|
||||||
yum update -y
|
image="ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc2-910b-openeuler24.03-py3.11' || '8.3.rc2-310p-openeuler24.03-py3.11' }}"
|
||||||
yum install -y git gcc gcc-c++ make cmake libcurl-devel
|
echo "image=${image}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
|
- name: Pull container image
|
||||||
|
run: docker pull "${{ steps.cann-image.outputs.image }}"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
env:
|
||||||
|
BUILD_TYPE: ${{ matrix.build }}
|
||||||
|
SOC_TYPE: ascend${{ matrix.chip_type }}
|
||||||
run: |
|
run: |
|
||||||
export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
|
HOST_UID=$(id -u)
|
||||||
|
HOST_GID=$(id -g)
|
||||||
|
|
||||||
|
docker run --rm \
|
||||||
|
-v "${PWD}:/workspace" \
|
||||||
|
-w /workspace \
|
||||||
|
-e SOC_TYPE=${SOC_TYPE} \
|
||||||
|
-e BUILD_TYPE=${BUILD_TYPE} \
|
||||||
|
"${{ steps.cann-image.outputs.image }}" \
|
||||||
|
bash -lc '
|
||||||
|
set -e
|
||||||
|
yum install -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs git gcc gcc-c++ make cmake libcurl-devel
|
||||||
|
yum clean all && rm -rf /var/cache/yum
|
||||||
|
git config --global --add safe.directory "/workspace"
|
||||||
|
export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
|
||||||
cmake -S . -B build \
|
cmake -S . -B build \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
|
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||||
-DGGML_CANN=on \
|
-DGGML_CANN=on \
|
||||||
-DSOC_TYPE=ascend${{ matrix.chip_type }}
|
-DSOC_TYPE=${SOC_TYPE}
|
||||||
cmake --build build -j $(nproc)
|
cmake --build build -j $(nproc)
|
||||||
|
|
||||||
|
chown -R '"${HOST_UID}"':'"${HOST_GID}"' /workspace/build
|
||||||
|
'
|
||||||
|
|
||||||
# TODO: simplify the following workflows using a matrix
|
# TODO: simplify the following workflows using a matrix
|
||||||
# TODO: run lighter CI on PRs and the full CI only on master (if needed)
|
# TODO: run lighter CI on PRs and the full CI only on master (if needed)
|
||||||
ggml-ci-x64-cpu-low-perf:
|
ggml-ci-x64-cpu-low-perf:
|
||||||
|
|
|
||||||
|
|
@ -731,6 +731,78 @@ jobs:
|
||||||
path: llama-${{ steps.tag.outputs.name }}-xcframework.tar.gz
|
path: llama-${{ steps.tag.outputs.name }}-xcframework.tar.gz
|
||||||
name: llama-${{ steps.tag.outputs.name }}-xcframework.tar.gz
|
name: llama-${{ steps.tag.outputs.name }}-xcframework.tar.gz
|
||||||
|
|
||||||
|
|
||||||
|
openEuler-cann:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [x86, aarch64]
|
||||||
|
chip_type: ['910b', '310p']
|
||||||
|
build: ['Release']
|
||||||
|
runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Free up disk space
|
||||||
|
uses: ggml-org/free-disk-space@v1.3.1
|
||||||
|
with:
|
||||||
|
tool-cache: true
|
||||||
|
|
||||||
|
- name: Set container image
|
||||||
|
id: cann-image
|
||||||
|
run: |
|
||||||
|
image="ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc2-910b-openeuler24.03-py3.11' || '8.3.rc2-310p-openeuler24.03-py3.11' }}"
|
||||||
|
echo "image=${image}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
|
- name: Pull container image
|
||||||
|
run: docker pull "${{ steps.cann-image.outputs.image }}"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
BUILD_TYPE: ${{ matrix.build }}
|
||||||
|
SOC_TYPE: ascend${{ matrix.chip_type }}
|
||||||
|
run: |
|
||||||
|
HOST_UID=$(id -u)
|
||||||
|
HOST_GID=$(id -g)
|
||||||
|
|
||||||
|
docker run --rm \
|
||||||
|
-v "${PWD}:/workspace" \
|
||||||
|
-w /workspace \
|
||||||
|
-e SOC_TYPE=${SOC_TYPE} \
|
||||||
|
-e BUILD_TYPE=${BUILD_TYPE} \
|
||||||
|
"${{ steps.cann-image.outputs.image }}" \
|
||||||
|
bash -lc '
|
||||||
|
set -e
|
||||||
|
yum install -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs git gcc gcc-c++ make cmake libcurl-devel
|
||||||
|
yum clean all && rm -rf /var/cache/yum
|
||||||
|
git config --global --add safe.directory "/workspace"
|
||||||
|
export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
|
||||||
|
cmake -S . -B build \
|
||||||
|
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||||
|
-DGGML_CANN=on \
|
||||||
|
-DSOC_TYPE=${SOC_TYPE}
|
||||||
|
cmake --build build -j $(nproc)
|
||||||
|
|
||||||
|
chown -R '"${HOST_UID}"':'"${HOST_GID}"' /workspace/build
|
||||||
|
'
|
||||||
|
|
||||||
|
- name: Determine tag name
|
||||||
|
id: tag
|
||||||
|
uses: ./.github/actions/get-tag-name
|
||||||
|
|
||||||
|
- name: Pack artifacts
|
||||||
|
run: |
|
||||||
|
cp LICENSE ./build/bin/
|
||||||
|
tar -czvf llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}.tar.gz --transform "s,./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
|
||||||
|
|
||||||
|
- name: Upload artifacts (tar)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
path: llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}.tar.gz
|
||||||
|
name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}.tar.gz
|
||||||
|
|
||||||
release:
|
release:
|
||||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
|
||||||
|
|
||||||
|
|
@ -752,6 +824,7 @@ jobs:
|
||||||
- macOS-arm64
|
- macOS-arm64
|
||||||
- macOS-x64
|
- macOS-x64
|
||||||
- ios-xcode-build
|
- ios-xcode-build
|
||||||
|
- openEuler-cann
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
|
|
@ -844,6 +917,12 @@ jobs:
|
||||||
- [Windows x64 (SYCL)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip)
|
- [Windows x64 (SYCL)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip)
|
||||||
- [Windows x64 (HIP)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-hip-radeon-x64.zip)
|
- [Windows x64 (HIP)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-hip-radeon-x64.zip)
|
||||||
|
|
||||||
|
**openEuler:**
|
||||||
|
- [openEuler x86 (310p)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-310p-openEuler-x86.tar.gz)
|
||||||
|
- [openEuler x86 (910b)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-910b-openEuler-x86.tar.gz)
|
||||||
|
- [openEuler aarch64 (310p)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-310p-openEuler-aarch64.tar.gz)
|
||||||
|
- [openEuler aarch64 (910b)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-910b-openEuler-aarch64.tar.gz)
|
||||||
|
|
||||||
- name: Upload release
|
- name: Upload release
|
||||||
id: upload_release
|
id: upload_release
|
||||||
uses: actions/github-script@v3
|
uses: actions/github-script@v3
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue