@@ -243,7 +243,7 @@ jobs:
243243 echo "Fetch llama2c model"
244244 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
245245 ./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
246- ./bin/llama-cli -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
246+ ./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
247247
248248 - name : Test llama2c (s390x)
249249 id : llama2c_test_s390x
@@ -252,7 +252,7 @@ jobs:
252252 cd build
253253 echo "Fetch llama2c big-endian model"
254254 wget https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K-be.gguf
255- ./bin/llama-cli -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
255+ ./bin/llama-completion -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
256256
257257 ubuntu-latest-cmake-sanitizer :
258258 runs-on : ubuntu-latest
@@ -1400,25 +1400,54 @@ jobs:
14001400 chip_type : ['910b', '310p']
14011401 build : ['Release']
14021402 runs-on : ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
1403- container : ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc1.alpha001-910b-openeuler22.03-py3.11' || '8.2.rc1-310p-openeuler22.03-py3.11' }}
14041403 steps :
14051404 - name : Checkout
14061405 uses : actions/checkout@v4
1406+ with :
1407+ fetch-depth : 0
14071408
1408- - name : Dependencies
1409- run : |
1410- yum update -y
1411- yum install -y git gcc gcc-c++ make cmake libcurl-devel
1409+ - name : Free up disk space
1410+ 1411+ with :
1412+ tool-cache : true
14121413
1413- - name : Build
1414+ - name : Set container image
1415+ id : cann-image
14141416 run : |
1415- export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
1417+ image="ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc2-910b-openeuler24.03-py3.11' || '8.3.rc2-310p-openeuler24.03-py3.11' }}"
1418+ echo "image=${image}" >> "${GITHUB_OUTPUT}"
14161419
1417- cmake -S . -B build \
1418- -DCMAKE_BUILD_TYPE=${{ matrix.build }} \
1419- -DGGML_CANN=on \
1420- -DSOC_TYPE=ascend${{ matrix.chip_type }}
1421- cmake --build build -j $(nproc)
1420+ - name : Pull container image
1421+ run : docker pull "${{ steps.cann-image.outputs.image }}"
1422+
1423+ - name : Build
1424+ env :
1425+ BUILD_TYPE : ${{ matrix.build }}
1426+ SOC_TYPE : ascend${{ matrix.chip_type }}
1427+ run : |
1428+ HOST_UID=$(id -u)
1429+ HOST_GID=$(id -g)
1430+
1431+ docker run --rm \
1432+ -v "${PWD}:/workspace" \
1433+ -w /workspace \
1434+ -e SOC_TYPE=${SOC_TYPE} \
1435+ -e BUILD_TYPE=${BUILD_TYPE} \
1436+ "${{ steps.cann-image.outputs.image }}" \
1437+ bash -lc '
1438+ set -e
1439+ yum install -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs git gcc gcc-c++ make cmake libcurl-devel
1440+ yum clean all && rm -rf /var/cache/yum
1441+ git config --global --add safe.directory "/workspace"
1442+ export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
1443+ cmake -S . -B build \
1444+ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
1445+ -DGGML_CANN=on \
1446+ -DSOC_TYPE=${SOC_TYPE}
1447+ cmake --build build -j $(nproc)
1448+
1449+ chown -R '"${HOST_UID}"':'"${HOST_GID}"' /workspace/build
1450+ '
14221451
14231452# TODO: simplify the following workflows using a matrix
14241453# TODO: run lighter CI on PRs and the full CI only on master (if needed)
@@ -1770,7 +1799,7 @@ jobs:
17701799 echo "Fetch llama2c model"
17711800 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
17721801 ./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
1773- ./bin/llama-cli -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
1802+ ./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
17741803
17751804 ubuntu-cmake-sanitizer-riscv64-native :
17761805 runs-on : RISCV64
0 commit comments