mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-26 20:16:14 +08:00
Revisit NNUE initialization
this revisits the initialization of NNUE, basically only changing the state on the UCI options 'Use NNUE' and 'EvalFile' calling init_NNUE(), which sets the Eval::useNNUE variable, and loads the network if needed (i.e. useNNUE is true and the same network is not yet loaded) init_NNUE is silent (i.e. no info strings), so that it can be called at startup without confusing certain GUIs. An error message on wrong setting when asking for (i.e. the net failed to load), is delayed to the point where everything must be consistent (start of search or eval). The engine will stop if the settings are wrong at that point. Also works if the default value of Use NNUE would become true.
This commit is contained in:
@@ -76,10 +76,6 @@ std::string pv(const Position& pos, Depth depth, Value alpha, Value beta);
|
||||
std::string wdl(Value v, int ply);
|
||||
Move to_move(const Position& pos, std::string& str);
|
||||
|
||||
void init_nnue(const std::string& evalFile);
|
||||
|
||||
extern bool load_eval_finished;
|
||||
|
||||
} // namespace UCI
|
||||
|
||||
extern UCI::OptionsMap Options;
|
||||
|
||||
Reference in New Issue
Block a user