llama-cpp-turboquant/ggml/src/ggml-cpu
Reese Levine 7ca5991d2b
ggml webgpu: add support for emscripten builds (#17184)
* Faster tensors (#8)

Add fast matrix and matrix/vector multiplication.

* Use map for shader replacements instead of pair of strings

* Wasm (#9)

* webgpu : fix build on emscripten

* more debugging stuff

* test-backend-ops: force single thread on wasm

* fix single-thread case for init_tensor_uniform

* use jspi

* add pthread

* test: remember to set n_thread for cpu backend

* Add buffer label and enable dawn-specific toggles to turn off some checks

* Intermediate state

* Fast working f16/f32 vec4

* Working float fast mul mat

* Clean up naming of mul_mat to match logical model, start work on q mul_mat

* Setup for subgroup matrix mat mul

* Basic working subgroup matrix

* Working subgroup matrix tiling

* Handle weirder sg matrix sizes (but still % sg matrix size)

* Working start to gemv

* working f16 accumulation with shared memory staging

* Print out available subgroup matrix configurations

* Vectorize dst stores for sg matrix shader

* Gemv working scalar

* Minor set_rows optimization (#4)

* updated optimization, fixed errors

* non vectorized version now dispatches one thread per element

* Simplify

* Change logic for set_rows pipelines

---------

Co-authored-by: Neha Abbas <nehaabbas@macbookpro.lan>
Co-authored-by: Neha Abbas <nehaabbas@ReeseLevines-MacBook-Pro.local>
Co-authored-by: Reese Levine <reeselevine1@gmail.com>

* Comment on dawn toggles

* Working subgroup matrix code for (semi)generic sizes

* Remove some comments

* Cleanup code

* Update dawn version and move to portable subgroup size

* Try to fix new dawn release

* Update subgroup size comment

* Only check for subgroup matrix configs if they are supported

* Add toggles for subgroup matrix/f16 support on nvidia+vulkan

* Make row/col naming consistent

* Refactor shared memory loading

* Move sg matrix stores to correct file

* Working q4_0

* Formatting

* Work with emscripten builds

* Fix test-backend-ops emscripten for f16/quantized types

* Use emscripten memory64 to support get_memory

* Add build flags and try ci

---------

Co-authored-by: Xuan Son Nguyen <son@huggingface.co>

* Remove extra whitespace

* Move wasm single-thread logic out of test-backend-ops for cpu backend

* Disable multiple threads for emscripten single-thread builds in ggml_graph_plan

* Fix .gitignore

* Add memory64 option and remove unneeded macros for setting threads to 1

---------

Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
2025-12-03 10:25:34 +01:00
..
amx ggml : fix unaligned access in AMX code (#16315) 2025-10-06 16:05:27 +03:00
arch ggml : add fallback definition for HWCAP2_SVE2 (#17683) 2025-12-02 10:41:26 +02:00
cmake ggml : build backends as libraries (#10256) 2024-11-14 18:04:35 +01:00
kleidiai kleidiai: fix zero-size array declaration (#17240) 2025-11-20 11:45:49 +02:00
llamafile llamafile: PowerPC Sgemm Optimization (#15558) 2025-08-26 23:35:25 +08:00
spacemit ggml : fix SpaceMit IME array out-of-bounds in task assignment (#16629) 2025-10-17 13:01:23 +03:00
arch-fallback.h ggml-cpu: aarm64: q4_K repack gemm and gemv implementations (dotprod only) (#17494) 2025-11-27 13:25:14 +02:00
binary-ops.cpp cpu: de-duplicate some of the operators and refactor (ggml/1144) 2025-03-30 08:33:31 +03:00
binary-ops.h cpu: de-duplicate some of the operators and refactor (ggml/1144) 2025-03-30 08:33:31 +03:00
CMakeLists.txt ggml : fix ARM feature verification (#17519) 2025-11-26 15:14:41 +02:00
common.h ggml : refactor forward_dup for cpu backend (#16062) 2025-09-19 06:31:56 +02:00
ggml-cpu-impl.h ggml : LoongArch fixes (#16958) 2025-11-03 08:40:02 +02:00
ggml-cpu.c ggml webgpu: add support for emscripten builds (#17184) 2025-12-03 10:25:34 +01:00
ggml-cpu.cpp ggml: riscv: add riscv spacemit backend (#15288) 2025-09-29 17:50:44 +03:00
hbm.cpp ggml-cpu : split arch-specific implementations (#13892) 2025-06-09 16:47:13 +02:00
hbm.h ggml-cpu : split arch-specific implementations (#13892) 2025-06-09 16:47:13 +02:00
ops.cpp model: LFM2-VL fixes (#17577) 2025-11-30 21:57:31 +01:00
ops.h ggml : add ggml_top_k (#17365) 2025-11-25 15:31:43 +02:00
quants.c llama : add gpt-oss (#15091) 2025-08-05 22:10:36 +03:00
quants.h llama : add gpt-oss (#15091) 2025-08-05 22:10:36 +03:00
repack.cpp ggml-cpu: aarm64: q4_K repack gemm and gemv implementations (dotprod only) (#17494) 2025-11-27 13:25:14 +02:00
repack.h ggml-cpu: aarm64: q4_K repack gemm and gemv implementations (dotprod only) (#17494) 2025-11-27 13:25:14 +02:00
simd-mappings.h ggml : remove useless and error-prone variadic macros (#17399) 2025-11-20 11:18:27 +01:00
traits.cpp ggml : fix fallback to CPU for ununsupported ops (#15118) 2025-08-06 14:37:35 +02:00
traits.h ggml : fix fallback to CPU for ununsupported ops (#15118) 2025-08-06 14:37:35 +02:00
unary-ops.cpp ggml : add ops SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM (#17063) 2025-11-13 20:54:47 +02:00
unary-ops.h ggml : add ops SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM (#17063) 2025-11-13 20:54:47 +02:00
vec.cpp ggml-cpu : add RISC-V vector intrinsic support for silu and cvar operations (#17227) 2025-11-13 13:13:32 +01:00
vec.h ggml-cpu : add RISC-V Zvfh impl for ggml_vec_mad_f16 (#17448) 2025-11-26 15:33:05 +02:00