]> git.sesse.net Git - stockfish/commit
Prevent usage of AVX-512 for the last layer.
authorTomasz Sobczyk <tomasz.sobczyk1997@gmail.com>
Mon, 4 Sep 2023 11:53:30 +0000 (13:53 +0200)
committerDisservin <disservin.social@gmail.com>
Mon, 11 Sep 2023 20:11:30 +0000 (22:11 +0200)
commit1461d861c8240e29df690f1e34dc50eee37ae1b5
treec295a5be2ae622494f9a025c06f80cb47c95411d
parenta8b4fd16716e74a9819e798fc09e5926e003013e
Prevent usage of AVX-512 for the last layer.

Add more static checks regarding the SIMD width match.

STC: https://tests.stockfishchess.org/tests/view/64f5c568a9bc5a78c669e70e
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 125216 W: 31756 L: 31636 D: 61824
Ptnml(0-2): 327, 13993, 33848, 14113, 327

Fixes a bug introduced in 2f2f45f, where with AVX-512 the weights and input to
the last layer were being read out of bounds. Now AVX-512 is only used for the
layers it can be used for. Additional static assertions have been added to
prevent more errors like this in the future.

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

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