llama.cpp/ggml/src/ggml-webgpu
Abhijit Ramesh 7fbd36c50c
ggml-webgpu: JIT compile binary operators and handle binding overlaps (#19310)
* ggml webgpu: port binary operators to use pre-wgsl

* Add binary.wgsl: unified shader with conditionals for all 4 ops

* Add gen_binary_shaders.cpp: build tool for using pre_wgsl preprocessor

* Remove bin_op.tmpl.wgsl and binary.wgsl (Python template)

* Update CMake to generate binary operator shaders at build time

* ggml-webgpu: migrate binary ops to JIT compilation with overlap handling

* port binary operators from AOT to pre-wgsl JIT compilation

* add src1=dst overlap handling for binary ops

* use compile-time workgroup size defines instead of runtime overrides

* ggml-webgpu: complete overlap handling for binary ops

* add support for inplace & overlap case in binding setup

* restructure conditional logic to handle all overlap cases

* ensure all buffer bindings are correctly assigned for edge cases

* ggml-webgpu: remove unused binary overlap cases

Remove src0==src1 binary overlap case that never occurs in practice.

* keep INPLACE (src0==dst), OVERLAP (src1==dst), DEFAULT

* remove unused src0==src1 and all-same variant

* refactor wgsl to eliminate duplication
2026-02-06 10:33:30 -08:00
..
wgsl-shaders ggml-webgpu: JIT compile binary operators and handle binding overlaps (#19310) 2026-02-06 10:33:30 -08:00
CMakeLists.txt ggml webgpu: add support for emscripten builds (#17184) 2025-12-03 10:25:34 +01:00
ggml-webgpu-shader-lib.hpp ggml-webgpu: JIT compile binary operators and handle binding overlaps (#19310) 2026-02-06 10:33:30 -08:00
ggml-webgpu.cpp ggml-webgpu: JIT compile binary operators and handle binding overlaps (#19310) 2026-02-06 10:33:30 -08:00
pre_wgsl.hpp ggml webgpu: initial flashattention implementation (#18610) 2026-01-08 08:23:39 -08:00