-
Notifications
You must be signed in to change notification settings - Fork 279
Add NativeAOT (and CoreRT) support for micro benchmarks #2328
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
Conversation
… this application.
…as it's not supported
@DrewScoggins could you please upload |
We have retired the corert repo in 2020. It is confusing that this called corert. I assume that the bits are not coming from corert repo. Can we call it nativeaot6.0? |
The
I've already spotted one perf regression, which is most likely related to printing to console on Windows. |
I am ok with having an option to use the .NET 6 experimental bits. My point is these bits are coming from NativeAOT experimental project in runtimelab. They are not coming from https://github.com/dotnet/corert repo. It is confusing to call them |
@jkotas thanks for the explanation. I am going to rename it to |
No go ahead and add that leg. I assume this will only be on the CI side, and not the collection side, right? |
@@ -18,6 +19,7 @@ namespace MicroBenchmarks.Serializers | |||
[GenericTypeArguments(typeof(XmlElement))] | |||
[GenericTypeArguments(typeof(SimpleStructWithProperties))] | |||
[GenericTypeArguments(typeof(ClassImplementingIXmlSerialiable))] | |||
[AotFilter("Currently not supported due to missing metadata.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues caused by missing metadata can be fixed with rd.xml
. Does BDN support attaching rd.xml
for NativeAOT benchmark tests, i.e. allowing to add a <RdXmlFile Include="rd.xml" />
to ItemGroup
in the generated project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # src/harness/BenchmarkDotNet.Extensions/BenchmarkDotNet.Extensions.csproj
This PR contains 4 changes:
[AotFilter]
to filter out benchmarks that are not supported with AOTAppContext.BaseDirectory
insteadtypeof(X).Assembly.Location
to get AOT-friendly locationI have tested these changes locally on Windows for both NativeAOT and CoreRT and all benchmarks are working fine. I'll report back once I have Linux results.
I've added
nativeaot7.0
andcorert6.0
monikers to the supported framework list. I did not want to add another optional argument like--aot
because it would make it impossible to compare multiple frameworks using-f
:With this PR we will be able to compare .NET 6 with CoreRT vs .NET 7 with NativeAOT and ensure that there are no regressions.
It's also possible to specify
ILCompilerVersion
:py .\scripts\benchmarks_ci.py -f nativeaot7.0 --filter * --bdn-arguments "--ilCompilerVersion $here"
So we will be able to do things like Preview X vs Preview Y.
cc @jkotas @MichalStrehovsky @hez2010 @Beau-Gosse-dev @jeffhandley @agocke