-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Introduce System.Runtime.TieredPGO knob #26350
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Um.. I am not sure who to ask for review here, perhaps @eerhardt? |
Can you also add to the test to ensure the MSBuild settings are flown to the runtimeconfig.json file? See #12362 for an example of where to change the tests. |
@@ -487,6 +487,10 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
Condition="'$(TieredCompilationQuickJitForLoops)' != ''" | |||
Value="$(TieredCompilationQuickJitForLoops)" /> | |||
|
|||
<RuntimeHostConfigurationOption Include="System.Runtime.TieredPGO" | |||
Condition="'$(TieredPGO)' != ''" | |||
Value="$(TieredPGO)" /> |
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.
Question: Is PGO
the term we use in docs when discussing this feature with customers? These strings System.Runtime.TieredPGO
and TieredPGO
are basically public APIs, so we have to be happy with the names we are picking here. It would be a breaking change to rename them later.
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.
@eerhardt We've been advertising DOTNET_TieredPGO
environment variable since .NET 6.0 e.g.
https://devblogs.microsoft.com/dotnet/announcing-net-6/#dynamic-pgo (I was collecting feedback from users here: https://gist.github.com/EgorBo/dc181796683da3d905a5295bfd3dd95b) - it perfectly aligns with DOTNET_TieredCompilation
which maps to <TieredCompilation>true</TieredCompilation>
here.
We considered other names/options but a simple boolean property seems to be the best and simple. Eventually, we plan to enable it by default I guess (e.g. in .NET 8.0). For .NET 7.0 we just want our customers to be able to easily enable it to try the feature
Related dotnet/runtime PR: dotnet/runtime#71438
The idea is to introduce a configuration switch similar to
TieredCompilation
to expose a config switch forTieredPGO
. It's done because many of our first/third parties are interested in trying Dynamic PGO and currently it's only possible withDOTNET_TieredPGO=1
env. variable defined in the execution process.With this PR and the related SDK change customers will be able to turn it on (it's off by default) via MSBUILD or JSON config just like TieredCompilation, e.g.: