-
Notifications
You must be signed in to change notification settings - Fork 790
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
Enable PGO - alternative approach #17317
Conversation
✅ No release notes required |
Hi @EgorBo, so this is an alternative approach to enable PGO, without doing profile generation ourselves. Any ideas what could be wrong? |
@EgorBo any pointers on how to figure out why is profile we get from nuget is not applying, and if we generate it locally, it shows a difference? |
@psfinaki @vzarytovskii I presume you test it on |
We have tested on @psfinaki did you try to build Giraffe with and without profile applied in this PR? Does it change anything? |
So far I have only tried running published Let me try Giraffe. |
@vzarytovskii @EgorBo I'm afraid I don't see any difference in Giraffe compilation either :( it's the same execution time basically. |
Do you a MIBC that works locally? can you send it to me? I'll check weigths in it |
@EgorBo did you, by any chance, look at it? Curious what's the difference between those. |
The only @psfinaki collected looks extremely weird to me. I propose we merge this PR as is since it generally looks corret to me, the problem must be inside the dotnet-optimization repo, once we figure it out and fix it should propagate a correct MIBC and optimize things out, hopefully 🙂 I'll take a look on Friday |
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.
When I get less sick we should talk about this.
src/fsc/fsc.targets
Outdated
@@ -54,4 +54,15 @@ | |||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" /> | |||
</ItemGroup> | |||
|
|||
<Target Name="Add PGO" DependsOnTargets="Get MIBC data" BeforeTargets="Publish" Condition="'$(Configuration)' == 'Release'"> |
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.
We need to ship fsc and fsi to the dotnetsdk as il assemblies not native compiled assemblies.
The sdk native compiles F# in this project here: https://github.com/dotnet/sdk/blob/main/src/Layout/tool_fsharp/tool_fsc.csproj
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.
So imagine, we will need to work with the sdk team to enable the pgo stuff ... at least if it relies on native compilation.
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.
We called certainly add the mibc files to the package we insert into the sdk.
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.
I don't think sdk does anything, @baronfel doesn't it just repack stuff from nugets?
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.
I was looking at the tool_fsc
(and also this) and that was my impression.
Will split this into 2 parts, closing this for now. |
Description
This should eventually make the FSC and FSI start about 30% faster. The implementation is inspired by the runtime targets.
Fixes #12636
Fixes #13328