2020 ' **/*.swift' ,
2121 ' **/*.m' ,
2222 ' **/*.metal' ,
23- ' **/*.comp'
23+ ' **/*.comp' ,
24+ ' **/*.glsl'
2425 ]
2526
2627 pull_request :
4041 ' **/*.swift' ,
4142 ' **/*.m' ,
4243 ' **/*.metal' ,
43- ' **/*.comp'
44+ ' **/*.comp' ,
45+ ' **/*.glsl'
4446 ]
4547
4648concurrency :
@@ -243,7 +245,7 @@ jobs:
243245 echo "Fetch llama2c model"
244246 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
245247 ./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
248+ ./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
247249
248250 - name : Test llama2c (s390x)
249251 id : llama2c_test_s390x
@@ -252,7 +254,7 @@ jobs:
252254 cd build
253255 echo "Fetch llama2c big-endian model"
254256 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
257+ ./bin/llama-completion -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
256258
257259 ubuntu-latest-cmake-sanitizer :
258260 runs-on : ubuntu-latest
@@ -1400,25 +1402,54 @@ jobs:
14001402 chip_type : ['910b', '310p']
14011403 build : ['Release']
14021404 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' }}
14041405 steps :
14051406 - name : Checkout
14061407 uses : actions/checkout@v4
1408+ with :
1409+ fetch-depth : 0
14071410
1408- - name : Dependencies
1409- run : |
1410- yum update -y
1411- yum install -y git gcc gcc-c++ make cmake libcurl-devel
1411+ - name : Free up disk space
1412+ uses : ggml-org/free-disk-space@v1.3.1
1413+ with :
1414+ tool-cache : true
14121415
1413- - name : Build
1416+ - name : Set container image
1417+ id : cann-image
14141418 run : |
1415- export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
1419+ image="ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc2-910b-openeuler24.03-py3.11' || '8.3.rc2-310p-openeuler24.03-py3.11' }}"
1420+ echo "image=${image}" >> "${GITHUB_OUTPUT}"
14161421
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)
1422+ - name : Pull container image
1423+ run : docker pull "${{ steps.cann-image.outputs.image }}"
1424+
1425+ - name : Build
1426+ env :
1427+ BUILD_TYPE : ${{ matrix.build }}
1428+ SOC_TYPE : ascend${{ matrix.chip_type }}
1429+ run : |
1430+ HOST_UID=$(id -u)
1431+ HOST_GID=$(id -g)
1432+
1433+ docker run --rm \
1434+ -v "${PWD}:/workspace" \
1435+ -w /workspace \
1436+ -e SOC_TYPE=${SOC_TYPE} \
1437+ -e BUILD_TYPE=${BUILD_TYPE} \
1438+ "${{ steps.cann-image.outputs.image }}" \
1439+ bash -lc '
1440+ set -e
1441+ yum install -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs git gcc gcc-c++ make cmake libcurl-devel
1442+ yum clean all && rm -rf /var/cache/yum
1443+ git config --global --add safe.directory "/workspace"
1444+ export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
1445+ cmake -S . -B build \
1446+ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
1447+ -DGGML_CANN=on \
1448+ -DSOC_TYPE=${SOC_TYPE}
1449+ cmake --build build -j $(nproc)
1450+
1451+ chown -R '"${HOST_UID}"':'"${HOST_GID}"' /workspace/build
1452+ '
14221453
14231454# TODO: simplify the following workflows using a matrix
14241455# TODO: run lighter CI on PRs and the full CI only on master (if needed)
@@ -1770,7 +1801,7 @@ jobs:
17701801 echo "Fetch llama2c model"
17711802 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
17721803 ./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
1804+ ./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
17741805
17751806 ubuntu-cmake-sanitizer-riscv64-native :
17761807 runs-on : RISCV64
0 commit comments