]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml webgpu: support for rope,div,sub,glu,scale,cont operators (#16187)
authorReese Levine <redacted>
Tue, 30 Sep 2025 16:57:51 +0000 (09:57 -0700)
committerGitHub <redacted>
Tue, 30 Sep 2025 16:57:51 +0000 (09:57 -0700)
commit8d78cd2613ccdeb3cc86f59bc8f9ddd31cfbd3ed
tree00fe1ff8c9479b3599db1eed8a411b3fe0a2d460
parentd1c84a662daa91be975863913a59975b11458141
ggml webgpu: support for rope,div,sub,glu,scale,cont operators (#16187)

* Work on rope

* Simplify inplace operation generation and combine mul/add generation

* Work on rope variants

* implement neox rope

* rope complete

* Add sub,div,glu operators

* implement scale op

* Update cpy shader to handle cont/more types

* formatting

* Update test vars printing for rope,rms_norm

* Avoid ROPE hardcoded constants

* Add TODO to change ROPE constants to enum

Co-authored-by: Georgi Gerganov <redacted>
* fix TODO comment

---------

Co-authored-by: Georgi Gerganov <redacted>
17 files changed:
ggml/include/ggml.h
ggml/src/ggml-webgpu/ggml-webgpu.cpp
ggml/src/ggml-webgpu/wgsl-shaders/add.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/add_in_place.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/bin_op.tmpl.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/cpy.tmpl.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/cpy.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py
ggml/src/ggml-webgpu/wgsl-shaders/get_rows.tmpl.wgsl
ggml/src/ggml-webgpu/wgsl-shaders/glu.tmpl.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/mul.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/mul_in_place.tmpl.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/rms_norm.wgsl
ggml/src/ggml-webgpu/wgsl-shaders/rms_norm_in_place.wgsl [deleted file]
ggml/src/ggml-webgpu/wgsl-shaders/rope.tmpl.wgsl [new file with mode: 0644]
ggml/src/ggml-webgpu/wgsl-shaders/scale.tmpl.wgsl [new file with mode: 0644]
tests/test-backend-ops.cpp