From 0f0322e4ad9d6e26889bfbc04d01863a9c30d417 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sun, 15 Nov 2020 15:03:01 +0100 Subject: [PATCH] Simplify compile-time switch for NNUE embedding Disable default net by default instead of disabling Use NNUE. --- src/Makefile | 4 +--- src/benchmark.cpp | 8 -------- src/ucioption.cpp | 6 +++--- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/Makefile b/src/Makefile index bd47538..293abf7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -320,9 +320,7 @@ ifneq ($(largeboards),no) endif # Embed and enable NNUE -ifeq ($(nnue),yes) - CXXFLAGS += -DUSE_NNUE -else +ifeq ($(nnue),no) CXXFLAGS += -DNNUE_EMBEDDING_OFF endif diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 99219a6..fbf883e 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -131,11 +131,7 @@ vector setup_bench(const Position& current, istream& is) { string limit = (is >> token) ? token : "13"; string fenFile = (is >> token) ? token : "default"; string limitType = (is >> token) ? token : "depth"; -#ifdef USE_NNUE string evalType = (is >> token) ? token : "mixed"; -#else - string evalType = (is >> token) ? token : "classic"; -#endif go = limitType == "eval" ? "eval" : "go " + limitType + " " + limit; @@ -189,11 +185,7 @@ vector setup_bench(const Position& current, istream& is) { ++posCounter; } -#ifdef USE_NNUE list.emplace_back("setoption name Use NNUE value true"); -#else - list.emplace_back("setoption name Use NNUE value false"); -#endif return list; } diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 010c9c4..21473cc 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -179,12 +179,12 @@ void init(OptionsMap& o) { o["SyzygyProbeDepth"] << Option(1, 1, 100); o["Syzygy50MoveRule"] << Option(true); o["SyzygyProbeLimit"] << Option(7, 0, 7); -#ifdef USE_NNUE o["Use NNUE"] << Option(true, on_use_NNUE); +#ifndef NNUE_EMBEDDING_OFF + o["EvalFile"] << Option(EvalFileDefaultName, on_eval_file); #else - o["Use NNUE"] << Option(false, on_use_NNUE); + o["EvalFile"] << Option("", on_eval_file); #endif - o["EvalFile"] << Option(EvalFileDefaultName, on_eval_file); o["TsumeMode"] << Option(false); o["VariantPath"] << Option("", on_variant_path); } -- 1.7.0.4