]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml webgpu: shader library organization (#19530)
authorReese Levine <redacted>
Wed, 18 Feb 2026 14:51:02 +0000 (07:51 -0700)
committerGitHub <redacted>
Wed, 18 Feb 2026 14:51:02 +0000 (07:51 -0700)
commit238856ec8fb79b7968e43f1e612af6ab2e3cfe9a
treeb90aad81bb388013f41ec38669353937b3f77afa
parentea003229d30148d0cd268a25e93e57ba51bb354a
ggml webgpu: shader library organization (#19530)

* Basic JIT compilation for mul_mat, get_rows, and scale (#17)

* scale jit working

* preliminary working jit for getrows and mulmat, needs refining

* simplified mul_mat preprocessing switch statement

* get_rows fixes, mul_mat refinement

* formatted + last edits

* removed some extraneous prints

* fixed get_rows, fixed workgroup dispatch in mul_mat. no gibberish

* small fix

* some changes, working

* get_rows and mul_mat jit fixed and working

* Update formatting

* formatting

* Add header

---------

Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Reese Levine <redacted>
* Start work on all-encompassing shader library

* refactor argmax, set_rows

* Refactor all but flashattention, mat mul

* flashattention and matrix multiplication moved to new format

* clean up preprocessing

* Formatting

* remove duplicate constants

* Split large shaders into multiple static strings

---------

Co-authored-by: neha-ha <redacted>
17 files changed:
ggml/src/ggml-webgpu/ggml-webgpu-shader-lib.hpp
ggml/src/ggml-webgpu/ggml-webgpu.cpp
ggml/src/ggml-webgpu/wgsl-shaders/common_decls.tmpl
ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py
ggml/src/ggml-webgpu/wgsl-shaders/get_rows.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/get_rows.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_decls.tmpl
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_reg_tile.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_reg_tile.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_subgroup_matrix.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_subgroup_matrix.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_vec.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_vec.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/scale.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/scale.wgsl [new file with mode: 0644]