gemma.cpp/gemma
Jan Wassenberg 301dc8067a Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul
Supports converting all weight/activation formats to native MulT (bf16/f32)

Also:
- ConstMat/MutableMat for const correctness
- Move RowVectorBatch to allocator.h so it can be used from Matmul
- Add matmul.h so MatMulEnv can be used from Activations
- Remove kMaxThreads, detect from PerClusterPools
- Build fix: -inl.h files must be textual_hdrs, and highway.h should precede -inl.h

```
zen4 new
64, 24576, 3072, add=0, MatTA=bf16, MatTB=sfp:   616.6 GFLOPS.
64, 3072, 24576, add=0, MatTA=bf16, MatTB=sfp:   460.7 GFLOPS.
64, 24576, 3072, add=0, MatTA=f32, MatTB=sfp:    598.6 GFLOPS.
64, 3072, 24576, add=0, MatTA=f32, MatTB=sfp:    435.6 GFLOPS.

zen4 old
64, 24576, 3072, add=0, MatTA=f32, MatTB=sfp:    257.5 GFLOPS.
64, 3072, 24576, add=0, MatTA=f32, MatTB=sfp:    231.9 GFLOPS.
```

PiperOrigin-RevId: 663729812
2024-08-16 07:52:20 -07:00
..
evals Add MMLU eval to github 2024-05-20 10:20:53 -07:00
instantiations Rename Gemma9B and Gemma27B to Gemma2_9B and Gemma2_27B. 2024-08-09 02:09:06 -07:00
activations.h Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul 2024-08-16 07:52:20 -07:00
common.cc Rename Gemma9B and Gemma27B to Gemma2_9B and Gemma2_27B. 2024-08-09 02:09:06 -07:00
common.h Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul 2024-08-16 07:52:20 -07:00
configs.h Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul 2024-08-16 07:52:20 -07:00
gemma-inl.h Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul 2024-08-16 07:52:20 -07:00
gemma.cc Simplify pos handling, auto-increment output arg 2024-08-15 09:25:26 -07:00
gemma.h Support directly observing activations, partially replacing LayersOutputFunc 2024-08-15 12:39:07 -07:00
kv_cache.cc Major revamp #2 of Prefill: fix token order, parallel for multi-query 2024-07-25 03:28:55 -07:00
kv_cache.h Major revamp #2 of Prefill: fix token order, parallel for multi-query 2024-07-25 03:28:55 -07:00
run.cc Simplify pos handling, auto-increment output arg 2024-08-15 09:25:26 -07:00
tokenizer.cc 7x compile time speedup: shard gemma.cc 2024-07-03 06:35:04 -07:00
tokenizer.h 7x compile time speedup: shard gemma.cc 2024-07-03 06:35:04 -07:00
weights.cc 1.3x prefill, 0.95x decode: matmul replacing last matvec 2024-08-12 03:36:01 -07:00
weights.h Major MatMul update, 1.9-2.3x speedup on Zen4 via bf16 mul 2024-08-16 07:52:20 -07:00