char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
d3146f2b5
char/aliceai-t5-moe
1name : CI (wasm) 2 3on : 4workflow_dispatch : # allows manual triggering 5push : 6branches : 7- master 8paths : [ 9'.github/workflows/build-wasm.yml' , 10'**/CMakeLists.txt' , 11'**/.cmake' , 12'**/*.h' , 13'**/*.hpp' , 14'**/*.c' , 15'**/*.cpp' , 16'**/*.wgsl' , 17'**/*.tmpl' , 18'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py' 19] 20 21pull_request : 22types : [ opened , synchronize , reopened ] 23paths : [ 24'.github/workflows/build-wasm.yml' , 25'**/CMakeLists.txt' , 26'**/.cmake' , 27'**/*.h' , 28'**/*.hpp' , 29'**/*.c' , 30'**/*.cpp' , 31'**/*.wgsl' , 32'**/*.tmpl' , 33'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py' 34] 35 36concurrency : 37group : ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} 38cancel-in-progress : true 39 40env : 41GGML_NLOOP : 3 42GGML_N_THREADS : 1 43LLAMA_ARG_LOG_COLORS : 1 44LLAMA_ARG_LOG_PREFIX : 1 45LLAMA_ARG_LOG_TIMESTAMPS : 1 46 47jobs : 48ubuntu-webgpu : 49runs-on : ubuntu-24.04-arm 50 51steps : 52- name : Clone 53id : checkout 54uses : actions/checkout@v6 55 56- name : ccache 57uses : ggml-org/ccache-action@v1.2.24 58with : 59key : webgpu-ubuntu-24.04-arm-wasm 60save : false 61 62- name : Install Emscripten 63run : | 64git clone https://github.com/emscripten-core/emsdk.git 65cd emsdk 66./emsdk install latest 67./emsdk activate latest 68 69- name : Fetch emdawnwebgpu 70run : | 71DAWN_TAG="v20260908.214631" 72EMDAWN_PKG="emdawnwebgpu_pkg-${DAWN_TAG}.zip" 73echo "Downloading ${EMDAWN_PKG}" 74curl -L -o emdawn.zip \ 75"https://github.com/google/dawn/releases/download/${DAWN_TAG}/${EMDAWN_PKG}" 76unzip emdawn.zip 77 78- name : ccache-buckets-restore 79uses : ./.github/actions/ccache-buckets 80env : 81HF_TOKEN : ${{ secrets.HF_TOKEN_CI }} 82with : 83key : webgpu-ubuntu-24.04-arm-wasm 84folder : llama.cpp 85hf_bucket : ggml-org/cache 86 87- name : Build WASM WebGPU 88run : | 89source emsdk/emsdk_env.sh 90emcmake cmake -B build-wasm \ 91-G "Ninja" \ 92-DCMAKE_BUILD_TYPE=Release \ 93-DGGML_WEBGPU=ON \ 94-DGGML_OPENMP=OFF \ 95-DLLAMA_OPENSSL=OFF \ 96-DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg 97 98time cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc) 99 100- name : ccache-buckets-save 101if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} 102uses : ./.github/actions/ccache-buckets 103env : 104HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }} 105with : 106key : webgpu-ubuntu-24.04-arm-wasm 107folder : llama.cpp 108evict-old-files : 1d 109hf_bucket : ggml-org/cache 110save : true