From 2c326f6ee3d52b7e9ecbc5a0a248f2acc3571f7c Mon Sep 17 00:00:00 2001 From: dje Date: Mon, 5 Jul 2021 11:27:09 -0400 Subject: [PATCH] Disable experimental ONNX support to make release package smaller. --- src/Ceres.Base/Ceres.Base.csproj | 1 - src/Ceres.Chess/Ceres.Chess.csproj | 14 ++++++++++++++ src/Ceres.Chess/NNEvaluators/NNEvaluatorFactory.cs | 4 +++- src/Ceres/APIExamples/TournamentTest.cs | 1 - 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Ceres.Base/Ceres.Base.csproj b/src/Ceres.Base/Ceres.Base.csproj index ddf72f4c..7a5d4407 100644 --- a/src/Ceres.Base/Ceres.Base.csproj +++ b/src/Ceres.Base/Ceres.Base.csproj @@ -35,7 +35,6 @@ - diff --git a/src/Ceres.Chess/Ceres.Chess.csproj b/src/Ceres.Chess/Ceres.Chess.csproj index 369e8889..dbb22556 100644 --- a/src/Ceres.Chess/Ceres.Chess.csproj +++ b/src/Ceres.Chess/Ceres.Chess.csproj @@ -16,6 +16,13 @@ ..\..\artifacts\release + + + + + + + @@ -35,6 +42,13 @@ + + + + + + + diff --git a/src/Ceres.Chess/NNEvaluators/NNEvaluatorFactory.cs b/src/Ceres.Chess/NNEvaluators/NNEvaluatorFactory.cs index e3e6fb20..8ad2a122 100644 --- a/src/Ceres.Chess/NNEvaluators/NNEvaluatorFactory.cs +++ b/src/Ceres.Chess/NNEvaluators/NNEvaluatorFactory.cs @@ -22,7 +22,6 @@ You should have received a copy of the GNU General Public License using Ceres.Chess.NNFiles; using System.Collections.Generic; using Chess.Ceres.NNEvaluators.TensorRT; -using Ceres.Chess.LC0NetInference; using Ceres.Chess.UserSettings; using Ceres.Chess.NNEvaluators.CUDA; using Ceres.Chess.LC0.NNFiles; @@ -184,6 +183,8 @@ static NNEvaluator Singleton(NNEvaluatorNetDef netDef, NNEvaluatorDeviceDef devi case NNEvaluatorType.ONNX: { + throw new NotImplementedException(); +#if NOT // TODO: fill these in properly string fn = @$"d:\weights\lczero.org\{netDef.NetworkID}.onnx"; bool isWDL = true; @@ -191,6 +192,7 @@ static NNEvaluator Singleton(NNEvaluatorNetDef netDef, NNEvaluatorDeviceDef devi ret = new NNEvaluatorEngineONNX(netDef.NetworkID, fn, deviceDef.DeviceIndex, ONNXRuntimeExecutor.NetTypeEnum.LC0, 1024, netDef.Precision, isWDL, hasMLH); break; +#endif } case NNEvaluatorType.Custom1: diff --git a/src/Ceres/APIExamples/TournamentTest.cs b/src/Ceres/APIExamples/TournamentTest.cs index 3fbe9944..74110e52 100644 --- a/src/Ceres/APIExamples/TournamentTest.cs +++ b/src/Ceres/APIExamples/TournamentTest.cs @@ -36,7 +36,6 @@ You should have received a copy of the GNU General Public License using Ceres.Base.Math; using Ceres.Base.Misc; using Ceres.Base.DataType; -using Microsoft.ML.OnnxRuntime; using Ceres.Base.OperatingSystem; #endregion