]> git.sesse.net Git - stockfish/commit
Affine transform robust implementation
authorMaximMolchanov <maksym.n.molchanov@gmail.com>
Mon, 11 Jan 2021 05:49:41 +0000 (07:49 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 11 Jan 2021 17:54:18 +0000 (18:54 +0100)
commit303713b560e356a902c1830bce205716cef54a44
treef8a7011e27f8ebfec337fcd9747f4a58d260d2fb
parent4d30438400932d18c095a8b85c3e51789d5f0feb
Affine transform robust implementation

Size of the weights in the last layer is less than 512 bits. It leads to wrong data access for AVX512. There is no error because in current implementation it is guaranteed that there is an array of zeros after weights so zero multiplied by something is returned and sum is correct. It is a mistake that can lead to unexpected bugs in the future. Used AVX2 instructions for smaller input size.

No measurable slowdown on avx512.

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

No functional change.
src/nnue/layers/affine_transform.h