Skip to content

Commit

Permalink
Disable experimental ONNX support to make release package smaller.
Browse files Browse the repository at this point in the history
  • Loading branch information
dje-dev committed Jul 5, 2021
1 parent 13519cc commit 2c326f6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/Ceres.Base/Ceres.Base.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.EventSource" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.Gpu" Version="1.7.1" />


<PackageReference Include="protobuf-net" Version="3.0.29" />
Expand Down
14 changes: 14 additions & 0 deletions src/Ceres.Chess/Ceres.Chess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
<OutputPath>..\..\artifacts\release</OutputPath>
</PropertyGroup>

<ItemGroup>
<Compile Remove="LC0\LC0NetInference\NetExecutorONNXRuntime.cs" />
<Compile Remove="LC0\LC0NetInference\ONNXRuntimeExecutor.cs" />
<Compile Remove="LC0\LC0NetInference\ONNXRuntimeExecutorResultBatch.cs" />
<Compile Remove="NNEvaluators\Base\NNEvaluatorEngineONNX.cs" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="NNBackends\CUDA\Kernels\CU\ceres_kernels.cu" />
<EmbeddedResource Include="NNBackends\CUDA\Kernels\CU\common_kernels.cu" />
Expand All @@ -35,6 +42,13 @@
<Folder Include="TBBackends\Fathom\" />
</ItemGroup>

<ItemGroup>
<None Include="LC0\LC0NetInference\NetExecutorONNXRuntime.cs" />
<None Include="LC0\LC0NetInference\ONNXRuntimeExecutor.cs" />
<None Include="LC0\LC0NetInference\ONNXRuntimeExecutorResultBatch.cs" />
<None Include="NNEvaluators\Base\NNEvaluatorEngineONNX.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.13.0" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.13.0" />
Expand Down
4 changes: 3 additions & 1 deletion src/Ceres.Chess/NNEvaluators/NNEvaluatorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -184,13 +183,16 @@ 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;
bool hasMLH = false; // TODO: fix. Eventually put in netDef
ret = new NNEvaluatorEngineONNX(netDef.NetworkID, fn, deviceDef.DeviceIndex,
ONNXRuntimeExecutor.NetTypeEnum.LC0, 1024, netDef.Precision, isWDL, hasMLH);
break;
#endif
}

case NNEvaluatorType.Custom1:
Expand Down
1 change: 0 additions & 1 deletion src/Ceres/APIExamples/TournamentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c326f6

Please sign in to comment.