char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
6b4e4bd58
char/aliceai-t5-moe
1name : CI (cann) 2 3on : 4workflow_dispatch : # allows manual triggering 5push : 6branches : 7- master 8paths : [ 9'.github/workflows/build-cann.yml' , 10'**/CMakeLists.txt' , 11'**/.cmake' , 12'**/*.h' , 13'**/*.hpp' , 14'**/*.c' , 15'**/*.cpp' 16] 17 18pull_request : 19types : [ opened , synchronize , reopened ] 20paths : [ 21'.github/workflows/build-cann.yml' , 22'ggml/src/ggml-cann/**' 23] 24 25concurrency : 26group : ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} 27cancel-in-progress : true 28 29env : 30GGML_NLOOP : 3 31GGML_N_THREADS : 1 32LLAMA_ARG_LOG_COLORS : 1 33LLAMA_ARG_LOG_PREFIX : 1 34LLAMA_ARG_LOG_TIMESTAMPS : 1 35 36jobs : 37# TODO: this build is disabled to save Github Actions resources (https://github.com/ggml-org/llama.cpp/pull/23705) 38# in order to enable it again, we have to provision dedicated runners to run it 39# openEuler-latest-cann: 40# defaults: 41# run: 42# shell: bash -el {0} 43# strategy: 44# matrix: 45# arch: [x86, aarch64] 46# chip_type: ['910b', '310p'] 47# build: ['Release'] 48# use_acl_graph: ['on', 'off'] 49# exclude: 50# # 310P does not support USE_ACL_GRAPH=on 51# - chip_type: '310p' 52# use_acl_graph: 'on' 53# runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} 54# steps: 55# - name: Checkout 56# uses: actions/checkout@v6 57# with: 58# fetch-depth: 0 59# 60# - name: Free up disk space 61# uses: ggml-org/free-disk-space@v1.3.1 62# with: 63# tool-cache: true 64# 65# - name: Set container image 66# id: cann-image 67# run: | 68# image="ascendai/cann:${{ matrix.chip_type == '910b' && '8.5.0-910b-openeuler24.03-py3.11' || '8.5.0-310p-openeuler24.03-py3.11' }}" 69# echo "image=${image}" >> "${GITHUB_OUTPUT}" 70# 71# - name: Pull container image 72# run: docker pull "${{ steps.cann-image.outputs.image }}" 73# 74# - name: Build 75# env: 76# BUILD_TYPE: ${{ matrix.build }} 77# SOC_TYPE: ascend${{ matrix.chip_type }} 78# USE_ACL_GRAPH: ${{ matrix.use_acl_graph }} 79# run: | 80# HOST_UID=$(id -u) 81# HOST_GID=$(id -g) 82# 83# docker run --rm \ 84# -v "${PWD}:/workspace" \ 85# -w /workspace \ 86# -e SOC_TYPE=${SOC_TYPE} \ 87# -e BUILD_TYPE=${BUILD_TYPE} \ 88# -e USE_ACL_GRAPH=${USE_ACL_GRAPH} \ 89# "${{ steps.cann-image.outputs.image }}" \ 90# bash -lc ' 91# set -e 92# yum install -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs git gcc gcc-c++ make cmake openssl-devel 93# yum clean all && rm -rf /var/cache/yum 94# git config --global --add safe.directory "/workspace" 95# export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH} 96# cmake -S . -B build \ 97# -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ 98# -DGGML_CANN=on \ 99# -DSOC_TYPE=${SOC_TYPE} \ 100# -DUSE_ACL_GRAPH=${USE_ACL_GRAPH} 101# cmake --build build -j $(nproc) 102# 103# chown -R '"${HOST_UID}"':'"${HOST_GID}"' /workspace/build 104# '