File tree Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -547,6 +547,46 @@ jobs:
547547 # This is using llvmpipe and runs slower than other backends
548548 ctest -L main --verbose --timeout 3600
549549
550+ ubuntu-24-wasm-webgpu :
551+ runs-on : ubuntu-24.04
552+
553+ steps :
554+ - name : Clone
555+ id : checkout
556+ uses : actions/checkout@v4
557+
558+ - name : ccache
559+ uses : ggml-org/ccache-action@v1.2.16
560+ with :
561+ key : ubuntu-latest-wasm-webgpu
562+ evict-old-files : 1d
563+
564+ - name : Install Emscripten
565+ run : |
566+ git clone https://github.com/emscripten-core/emsdk.git
567+ cd emsdk
568+ ./emsdk install latest
569+ ./emsdk activate latest
570+
571+ - name : Fetch emdawnwebgpu
572+ run : |
573+ DAWN_TAG="v20251027.212519"
574+ EMDAWN_PKG="emdawnwebgpu_pkg-${DAWN_TAG}.zip"
575+ echo "Downloading ${EMDAWN_PKG}"
576+ curl -L -o emdawn.zip \
577+ "https://github.com/google/dawn/releases/download/${DAWN_TAG}/${EMDAWN_PKG}"
578+ unzip emdawn.zip
579+
580+ - name : Build WASM WebGPU
581+ run : |
582+ source emsdk/emsdk_env.sh
583+ emcmake cmake -B build-wasm \
584+ -DGGML_WEBGPU=ON \
585+ -DLLAMA_CURL=OFF \
586+ -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg
587+
588+ cmake --build build-wasm --target test-backend-ops -j $(nproc)
589+
550590 ubuntu-22-cmake-hip :
551591 runs-on : ubuntu-22.04
552592 container : rocm/dev-ubuntu-22.04:6.1.2
Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ if (EMSCRIPTEN)
3838
3939 # Use 64-bit memory to support backend_get_memory queries
4040 # TODO: analyze performance impact, see https://spidermonkey.dev/blog/2025/01/15/is-memory64-actually-worth-using
41- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -sMEMORY64=1" )
42- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -sMEMORY64=1" )
41+ add_compile_options ("-sMEMORY64=1" )
42+ add_link_options ("-sMEMORY64=1" )
43+ add_link_options ("-sALLOW_MEMORY_GROWTH=1" )
4344
4445 option (LLAMA_WASM_SINGLE_FILE "llama: embed WASM inside the generated llama.js" OFF )
4546 option (LLAMA_BUILD_HTML "llama: build HTML file" ON )
You can’t perform that action at this time.
0 commit comments