]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
ggml: Add initial WebGPU backend (llama/14521)
authorReese Levine <redacted>
Wed, 16 Jul 2025 15:18:51 +0000 (08:18 -0700)
committerGeorgi Gerganov <redacted>
Sat, 19 Jul 2025 14:47:23 +0000 (17:47 +0300)
commitb58b95d287389489c0b6b3fee1b71b1ab1be05d3
tree928ec978d0d0f8fd4ee0da992b2048a2eef218e6
parent5a0b8dc31257d4720fe0a95a01265d85c0170106
ggml: Add initial WebGPU backend (llama/14521)

* Minimal setup of webgpu backend with dawn. Just prints out the adapter and segfaults

* Initialize webgpu device

* Making progress on setting up the backend

* Finish more boilerplate/utility functions

* Organize file and work on alloc buffer

* Add webgpu_context to prepare for actually running some shaders

* Work on memset and add shader loading

* Work on memset polyfill

* Implement set_tensor as webgpu WriteBuffer, remove host_buffer stubs since webgpu doesn't support it

* Implement get_tensor and buffer_clear

* Finish rest of setup

* Start work on compute graph

* Basic mat mul working

* Work on emscripten build

* Basic WebGPU backend instructions

* Use EMSCRIPTEN flag

* Work on passing ci, implement 4d tensor multiplication

* Pass thread safety test

* Implement permuting for mul_mat and cpy

* minor cleanups

* Address feedback

* Remove division by type size in cpy op

* Fix formatting and add github action workflows for vulkan and metal (m-series) webgpu backends

* Fix name

* Fix macos dawn prefix path
CMakeLists.txt
include/ggml-webgpu.h [new file with mode: 0644]
src/CMakeLists.txt
src/ggml-backend-reg.cpp