Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip AOT of Microsoft.CodeAnalysis.CSharp.dll for WASM, due to out-of-memory issues in CI #63958

Merged
merged 19 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
755f075
Only build stuff needed for debugging issue
directhex Jan 18, 2022
5e34fb8
Typing wih a hand in a brace is hard
directhex Jan 19, 2022
03b4fe8
don't only smoke
directhex Jan 19, 2022
2800e21
Speculative workaround from Zoltan/Ankit
directhex Jan 21, 2022
2c77204
Merge remote-tracking branch 'origin/main' into further-ci-crimes
directhex Jan 21, 2022
819547a
Merge remote-tracking branch 'origin/main' into further-ci-crimes
directhex Jan 21, 2022
579b53d
Make speculative PR not speculative any more
directhex Jan 21, 2022
1f76782
Merge remote-tracking branch 'origin/main' into further-ci-crimes
directhex Jan 24, 2022
e2d9164
Merge remote-tracking branch 'origin/main' into further-ci-crimes
directhex Feb 7, 2022
19fe64a
Make AOT skip list specified per project, not hardcoded
directhex Feb 8, 2022
abf5b8a
Re-remove excluded tests, this change was skipped due to merge error
directhex Feb 8, 2022
54ce867
Advice from Ankit
directhex Feb 8, 2022
f65edfd
Fix typo in metadata name
radical Feb 8, 2022
96a2200
Merge remote-tracking branch 'origin/main' into further-ci-crimes
radical Feb 8, 2022
874aad0
[wasm] Add aot-skipped assemblies back to the list of assemblies
radical Feb 9, 2022
cbb852a
Merge remote-tracking branch 'origin/main' into further-ci-crimes
radical Feb 9, 2022
561a2c5
Get rid of weird escaping
directhex Feb 14, 2022
4170990
Use _AOT_InternalForceInterpretAssemblies instead of HighAotMemoryUsa…
directhex Feb 14, 2022
eab3d9e
More suggestions
directhex Feb 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion eng/testing/tests.wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<BuildAOTTestsOn Condition="'$(BuildAOTTestsOn)' == ''">local</BuildAOTTestsOn>
</PropertyGroup>

<ItemGroup>
<_AOT_InternalForceInterpretAssemblies Include="@(HighAotMemoryUsageAssembly)" />
</ItemGroup>

<!--
This is running during compile time and therefore $(Scenario) is empty, unless the specific project sets it.
Any settings in the project file could be replaced on Helix.
Expand Down Expand Up @@ -118,7 +122,7 @@
<PropertyGroup>
<_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity)</_MainAssemblyPath>
<RuntimeConfigFilePath>$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))</RuntimeConfigFilePath>
<EmccLinkOptimizationFlag Condition="'$(EmccLinkOptimizationFlag)' == ''">-Oz -Wl%252C-O0 -Wl%252C-lto-O0</EmccLinkOptimizationFlag>
<EmccLinkOptimizationFlag Condition="'$(EmccLinkOptimizationFlag)' == ''">-Oz -Wl,-O0 -Wl,-lto-O0</EmccLinkOptimizationFlag>
</PropertyGroup>

<Error Text="Item WasmAssembliesToBundle is empty. This is likely an authoring error." Condition="@(WasmAssembliesToBundle->Count()) == 0" />
Expand Down Expand Up @@ -169,6 +173,9 @@
<_WasmItemsToPass Include="@(BundleFiles)" OriginalItemName__="BundleFiles" ConditionToUse__="'$(Foo)' != 'true'" />

-->

<_WasmItemsToPass Include="@(_AOT_InternalForceInterpretAssemblies)" OriginalItemName__="_AOT_InternalForceInterpretAssemblies" />

</ItemGroup>

<!-- This file gets imported by the project file on helix -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
</PropertyGroup>

<ItemGroup>
<HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

<Import Project="Microsoft.Extensions.Logging.Generators.targets"/>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<WasmNativeStrip>false</WasmNativeStrip>
</PropertyGroup>

<ItemGroup>
<HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

<Import Project="Microsoft.Extensions.Logging.Generators.targets"/>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

<Import Project="System.Text.Json.SourceGeneration.Tests.targets" />

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
</PropertyGroup>

<ItemGroup>
<HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

<Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
</PropertyGroup>

<ItemGroup>
<HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

<Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
</PropertyGroup>

<ItemGroup>
<HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.RegularExpressions\src\System.Text.RegularExpressions.csproj" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />
Expand Down
8 changes: 0 additions & 8 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@

<!-- Wasm aot on !windows -->
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true' and '$(RunAOTCompilation)' == 'true' and '$(BrowserHost)' != 'Windows'">
<!-- Exceeds VM resources in CI on compilation: https://github.com/dotnet/runtime/issues/61339 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\System.Text.RegularExpressions.Generators.Tests\System.Text.RegularExpressions.Generators.Tests.csproj" />

<!-- https://github.com/dotnet/runtime/issues/61756 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\System.Text.RegularExpressions.Tests.csproj" />
</ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/mono/wasm/build/WasmApp.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,13 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_
<_WasmAOTSearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\net7.0" />
</ItemGroup>

<ItemGroup>
<!-- Skip known-huge assemblies specified in csproj -->
<_AotInputAssemblies Condition="'%(Filename)' != '' and '@(_AotInputAssemblies->Metadata(`Filename`))' != '' and '@(_AOT_InternalForceInterpretAssemblies->Metadata(`Filename`))' != ''">
<AOT_InternalForceToInterpret>true</AOT_InternalForceToInterpret>
</_AotInputAssemblies>
</ItemGroup>

<PropertyGroup>
<!--<AOTMode Condition="'$(AOTMode)' == '' and '$(AOTProfilePath)' != ''">LLVMOnlyInterp</AOTMode>-->
<AOTMode Condition="'$(AOTMode)' == ''">LLVMOnlyInterp</AOTMode>
Expand Down Expand Up @@ -575,6 +582,9 @@ EMSCRIPTEN_KEEPALIVE void mono_wasm_load_profiler_aot (const char *desc) { mono_
<ItemGroup>
<_BitcodeFile Include="%(_WasmAssembliesInternal.LlvmBitcodeFile)" />
<_BitcodeFile ObjectFile="$(_WasmIntermediateOutputPath)%(FileName).o" />

<!-- Add the skipped assemblies -->
<_WasmAssembliesInternal Include="@(_AotInputAssemblies->WithMetadataValue('AOT_InternalForceToInterpret', 'true'))" />
</ItemGroup>
</Target>

Expand Down