1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-03 18:19:35 +00:00
BadFish/src/nnue/layers
MaximMolchanov 23c385ec36 Affine transform refactoring.
Reordered weights in such a way that accumulated sum fits to output.
Weights are grouped in blocks of four elements because four
int8 (weight type) corresponds to one int32 (output type).
No horizontal additions.
Grouped AVX512, AVX2 and SSSE3 implementations.
Repeated code was removed.

An earlier version passed STC:

LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 15336 W: 1495 L: 1355 D: 12486
Ptnml(0-2): 44, 1054, 5350, 1158, 62
https://tests.stockfishchess.org/tests/view/5ff60e106019e097de3eefd5

Speedup depends on the architecture, up to 4% measured on a NNUE only bench.

closes https://github.com/official-stockfish/Stockfish/pull/3287

No functional change
2021-01-08 16:35:44 +01:00
..
affine_transform.h Affine transform refactoring. 2021-01-08 16:35:44 +01:00
clipped_relu.h Manually align arrays on the stack 2020-11-04 19:52:42 +01:00
input_slice.h Add NNUE evaluation 2020-08-06 16:37:45 +02:00