Simplify compile-time switch for NNUE embedding
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 15 Nov 2020 14:03:01 +0000 (15:03 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 15 Nov 2020 14:03:01 +0000 (15:03 +0100)
Disable default net by default instead of disabling Use NNUE.

src/Makefile
src/benchmark.cpp
src/ucioption.cpp

index bd47538..293abf7 100644 (file)
@@ -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
 
index 99219a6..fbf883e 100644 (file)
@@ -131,11 +131,7 @@ vector<string> 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<string> 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;
 }
index 010c9c4..21473cc 100644 (file)
@@ -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("<empty>", on_eval_file);
 #endif
-  o["EvalFile"]              << Option(EvalFileDefaultName, on_eval_file);
   o["TsumeMode"]             << Option(false);
   o["VariantPath"]           << Option("<empty>", on_variant_path);
 }