-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathLizard.csproj
212 lines (164 loc) · 8.39 KB
/
Lizard.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<Platforms>x64</Platforms>
<StartupObject>Lizard.Program</StartupObject>
<BaseOutputPath>bin</BaseOutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>False</AppendRuntimeIdentifierToOutputPath>
<DebugType>embedded</DebugType>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GenerateDependencyFile>False</GenerateDependencyFile>
<AssemblyVersion>1.0.0</AssemblyVersion>
<NeutralLanguage>en</NeutralLanguage>
<EnablePreviewFeatures>True</EnablePreviewFeatures>
<LangVersion>Latest</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Configurations>Debug;Release;Datagen;Avx512</Configurations>
<EnforceCodeStyleInBuild>False</EnforceCodeStyleInBuild>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
<AnalysisLevel>latest-all</AnalysisLevel>
<PublishTrimmed>True</PublishTrimmed>
<PublishSingleFile>True</PublishSingleFile>
<PublishAot>False</PublishAot>
<!-- ################################################### -->
<!-- ########## Good Switches (no touchy) ########## -->
<!-- ################################################### -->
<!-- Tiered PGO lets the JIT collect information on how individual methods are called/used, and can
give them optimizations based on its observations which it otherwise couldn't have if the code was
optimized before launching.
In my testing, this can only help make methods faster, especially some of the smaller functions that are
called frequently. The JIT seems to like adding additional jumps+branches to them to address some common cases.
For example, MakeMove can be generated with an additional 200-300 bytes of generated code that are only for king moves,
which presumably help performance when it is called from some other method.
-->
<TieredPGO>true</TieredPGO>
<!-- Tiered Compilation will optimize methods in the background, after they have run a few times (30+).
It will eventually generate code that is approximately as good as FullOpts, but this can be nice to have for
a startup performance.
-->
<TieredCompilation>true</TieredCompilation>
<!-- ####################################### -->
<!-- ########## OK Switches ########## -->
<!-- ####################################### -->
<!-- R2R doesn't appear to make a meaningful performance impact.
The Microsoft docs basically states that "AOT code isn't as good as JIT code,
so tiered compilation will replace the most commonly used R2R methods with JIT code"
(https://learn.microsoft.com/en-us/dotnet/core/deploying/ready-to-run#interaction-with-tiered-compilation)
Although logically I don't see what the point is of leaving unoptimized non-"most commonly used" R2R code floating around,
but this doesn't seem to make a big difference either way
-->
<PublishReadyToRun>true</PublishReadyToRun>
<!-- Quick JIT is bad for startup performance, but might give better results later on.
If this is true, then the generated code for most methods will show up as "Tier0", "Instrumented Tier0", and later "Tier1".
If this is false and R2R is false, then TieredCompilation will be disabled as well.
For those that are curious:
In large methods, Tier1 code is basically impossible to decompile and optimize.
At the time of writing, HalfKA_HM.MakeMove goes from ~1080 bytes as FullOpts to ~2050 bytes in Tier1.
In Tier1, it even has a call to Console.WriteLine, and I couldn't say where that is coming from if my life depended on it :)
-->
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<!-- Currently better than nothing if there are no [MethodImpl(MethodImplOptions.AggressiveInlining)] attributes.
-->
<TieredCompilationQuickJitForLoops>true</TieredCompilationQuickJitForLoops>
<!-- If true, GC collections will be less frequent but more intensive and can take place on multiple threads (like an additional 12).
The process RAM usage will greatly increase before dropping sharply, as opposed to workstation GC which remains fairly constant.
This can help prevent some of the otherwise frequent ~10-15 ms pauses and defer them until a good time.
At the time of writing, a 2-threaded search uses ~180MB of ram with normal GC and ~360MB with server GC,
so if you have plenty of RAM available, this may improve performance.
-->
<ServerGarbageCollection>false</ServerGarbageCollection>
</PropertyGroup>
<!-- The "instruction-set" argument is required for AOT to generate code with intrinsics -->
<ItemGroup>
<ilcArg Include="--Ot" />
<IlcArg Condition="$(IlcInstructionSet) == ''" Include="--instruction-set=native" />
</ItemGroup>
<PropertyGroup>
<!-- Check if EVALFILE is not defined and set it to the content of network.txt if necessary -->
<ReadNetworkFile Condition="'$(EVALFILE)' == ''">
$([System.IO.File]::ReadAllText($(MSBuildThisFileDirectory)network.txt)).bin
</ReadNetworkFile>
<EVALFILE Condition="'$(EVALFILE)' == ''">$(ReadNetworkFile)</EVALFILE>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="$(EVALFILE)" />
<AssemblyAttribute Include="Lizard.Logic.Util.EvalFileAttribute">
<_Parameter1>$(EVALFILE)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<!-- Embed the BINDINGS file if it's defined and the file actually exists
-->
<ItemGroup>
<EmbeddedResource Condition="'$(BINDINGS)' != '' AND Exists('$(BINDINGS)')" Include="$(BINDINGS)" />
</ItemGroup>
<!-- Targeting the "aot" recipe in the makefile will set this to true.
-->
<ItemGroup>
<AssemblyAttribute Include="Lizard.Logic.Util.IsAOTAttribute">
<_Parameter1>$(IS_AOT)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>$(DefineConstants)</DefineConstants>
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>$(DefineConstants)</DefineConstants>
<DebugType>embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Avx512|x64'">
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>$(DefineConstants)</DefineConstants>
<DebugType>embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Datagen|x64'">
<PlatformTarget>x64</PlatformTarget>
<DebugType>embedded</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Logic\Book\**" />
<Compile Remove="Logic\Tablebase\**" />
<EmbeddedResource Remove="Logic\Book\**" />
<EmbeddedResource Remove="Logic\Tablebase\**" />
<None Remove="Logic\Book\**" />
<None Remove="Logic\Tablebase\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logic\Core\PositionRESIZE.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Bindings\" />
<Folder Include="obj\" />
</ItemGroup>
<!-- This is for using Bitmaps -->
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ZstdSharp.Port" Version="0.8.1" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>