MinetaS and Joost VandeVondele
2c36d1e7e7
Fix overflow in add_dpbusd_epi32x2
...
This patch fixes 16bit overflow in *_add_dpbusd_epi32x2 functions,
that can be triggered in rare cases depending on the NNUE weights.
While the code leads to some slowdown on affected architectures
(most notably avx2), the fix is simpler than some of the other
options discussed in
https://github.com/official-stockfish/Stockfish/pull/4394
Code suggested by Sopel97.
Result of "bench 4096 1 30 default depth nnue":
| Architecture | master | patch (gcc) | patch (clang) |
|---------------------|-----------|-------------|---------------|
| x86-64-vnni512 | 762122798 | 762122798 | 762122798 |
| x86-64-avx512 | 769723503 | 762122798 | 762122798 |
| x86-64-bmi2 | 769723503 | 762122798 | 762122798 |
| x86-64-ssse3 | 769723503 | 762122798 | 762122798 |
| x86-64 | 762122798 | 762122798 | 762122798 |
Following architectures will experience ~4% slowdown due to an
additional instruction in the middle of hot path:
* x86-64-avx512
* x86-64-bmi2
* x86-64-avx2
* x86-64-sse41-popcnt (x86-64-modern)
* x86-64-ssse3
* x86-32-sse41-popcnt
This patch clearly loses Elo against master with both STC and LTC.
Failed non-regression STC (256bit fix only):
LLR: -2.95 (-2.94,2.94) <-1.75,0.25>
Total: 33528 W: 8769 L: 9049 D: 15710
Ptnml(0-2): 96, 3616, 9600, 3376, 76
https://tests.stockfishchess.org/tests/view/63e6a5b44299542b1e26a485
60+0.6 @ 30000 games:
Elo: -1.67 +-1.7 (95%) LOS: 2.8%
Total: 30000 W: 7848 L: 7992 D: 14160
Ptnml(0-2): 12, 2847, 9436, 2683, 22
nElo: -3.84 +-3.9 (95%) PairsRatio: 0.95
https://tests.stockfishchess.org/tests/view/63e7ac716d0e1db55f35a660
However, a test against nn-a3dc078bafc7.nnue, which is the latest "safe"
network not causing the bug, passed with regular bounds.
Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 160456 W: 42658 L: 42175 D: 75623
Ptnml(0-2): 487, 17638, 43469, 18173, 461
https://tests.stockfishchess.org/tests/view/63e89836d62a5d02b0fa82c8
closes https://github.com/official-stockfish/Stockfish/pull/4391
closes https://github.com/official-stockfish/Stockfish/pull/4394
No functional change
2023-02-18 13:23:18 +01:00
MinetaS and Joost VandeVondele
5a30b087c3
Expand statistics tools for engine development
...
This patch adds more debugging slots up to 32 per type and provide tools
to calculate standard deviation and Pearson's correlation coefficient.
However, due to slot being 0 at default, dbg_hit_on(c, b) has to be removed.
Initial idea from snicolet/Stockfish@d8ab604
closes https://github.com/official-stockfish/Stockfish/pull/4354
No functional change
2023-02-03 20:07:56 +01:00
MinetaS and Joost VandeVondele
7fc0f589d6
Add -Wconditional-uninitialized when using Clang
...
Add -Wconditional-uninitialized as it is not controlled by -Wall.
closes https://github.com/official-stockfish/Stockfish/pull/4371
No functional change
2023-02-02 17:49:23 +01:00
MinetaS and Joost VandeVondele
e4e61cd9cc
Remove maxNextDepth
...
This patch allows full PV search to have double extensions as well when
extension == 1 && doDeeperSearch && doEvenDeeperSearch && !doShallowerSearch
is true, which is extremely rare to occur.
Passed non-regression STC (master 3d2381d ):
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 370824 W: 97835 L: 97974 D: 175015
Ptnml(0-2): 1073, 38814, 105731, 38767, 1027
https://tests.stockfishchess.org/tests/view/63c89416a83c702aac08314c
Passed non-regression LTC (master 3d2381d ):
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 306048 W: 81173 L: 81237 D: 143638
Ptnml(0-2): 117, 27977, 96901, 27911, 118
https://tests.stockfishchess.org/tests/view/63cc4e84344bb01c191b2658
Bench: 4208265
2023-01-28 16:54:30 +01:00
MinetaS and Joost VandeVondele
20b0226462
Fix a dependency bug
...
Instead of allowing .depend for specific build-related targets, filter
non-build-related targets (i.e. help, clean) so that other targets can
normally execute .depend target.
closes https://github.com/official-stockfish/Stockfish/pull/4293
No functional change
2022-12-20 08:14:19 +01:00
MinetaS and Joost VandeVondele
74fb936dbd
Invoke .depend only on build targets
...
Add a constraint so that the dependency build only occurs when users
actually run build tasks.
This fixes a bug on some systems where gcc/g++ is not available.
closes https://github.com/official-stockfish/Stockfish/pull/4255
No functional change
2022-12-08 20:48:20 +01:00
MinetaS and Joost VandeVondele
234d2156fd
Apply -flto-partition=one / -flto=full
...
This patch fixes a potential bug derived from an incompatibility between LTO and top-level assembly code (INCBIN).
Passed non-regression STC (master e90341f ):
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 119352 W: 31986 L: 31862 D: 55504
Ptnml(0-2): 439, 12624, 33400, 12800, 413
https://tests.stockfishchess.org/tests/view/634aacf84bc7650f0755188b
closes https://github.com/official-stockfish/Stockfish/pull/4201
No functional change
2022-10-23 19:58:47 +02:00