1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Output some basic info about the used networks

Adds size in memory as well as layer sizes as in

info string NNUE evaluation using nn-ae6a388e4a1a.nnue (132MiB, (22528, 3072, 15, 32, 1))
info string NNUE evaluation using nn-baff1ede1f90.nnue (6MiB, (22528, 128, 15, 32, 1))

For example, the size in MiB is useful to keep the fishtest memory sizes up-to-date,
the L1-L3 sizes give a useful hint about the architecture used.

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

No functional change
This commit is contained in:
Joost VandeVondele 2024-04-27 18:09:45 +02:00 committed by Disservin
parent 3502c8ae42
commit bc45cbc820

View file

@ -252,7 +252,11 @@ void Network<Arch, Transformer>::verify(std::string evalfilePath) const {
exit(EXIT_FAILURE);
}
sync_cout << "info string NNUE evaluation using " << evalfilePath << sync_endl;
size_t size = sizeof(*featureTransformer) + sizeof(*network) * LayerStacks;
sync_cout << "info string NNUE evaluation using " << evalfilePath << " ("
<< size / (1024 * 1024) << "MiB, (" << featureTransformer->InputDimensions << ", "
<< network[0]->TransformedFeatureDimensions << ", " << network[0]->FC_0_OUTPUTS
<< ", " << network[0]->FC_1_OUTPUTS << ", 1))" << sync_endl;
}