Closed Alayan-stk-2 closed 4 years ago
The default makefile settings are fine for most people . You are possibly fretting over an Elo or two for an engine rated 3500 elo. You would have to play 50,000 games for that to make an impact in results.
No need to try too fancy things. Certainly threading is not a good idea (i.e. the PGO counters updates are racy, and thus wrong, which is what the profile-correction tries to patch after the facts). PGO just provides the compiler with a hint on basic stuff such as branching probability or loop iteration counts, and it doesn't matter if the branching prob is 67% or 69%. So, I think the current setup is pretty good.
it's not clear which is better
So I am closing this issue for now :-)
Right now, the makefile instruct to run the default bench, which happens on one-core, with default hash (16MB) and default depth (13). So the question are, does this provide the best profile when intending to run stockfish with a big hash, at higher depth and with many threads. And which parameters to choose depending on the machine and intended use case. And how could SF's building system be tweaked.
The default bench with low depth and hash doesn't properly reflect the importance of memory pressure in longer use, as pretty much all the hash fits in cache. So if there is a different way to optimize the code that fares better in this situation, it could make a measurable difference.
With the submission for the TCEC FRC bonus, I had Aloril trying out a different bench run for the PGO profile.
I had suggested d28 which was taking too long, but d14 is barely above the default d13 and is a poor match for 2GB hash too.
The flag -fprofile-correction must be set for the multi-threaded profile run to run.
So from this limited data, it's not clear which is better.