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

Pack MIBC files #17513

Merged
merged 50 commits into from
Aug 26, 2024
Merged

Pack MIBC files #17513

merged 50 commits into from
Aug 26, 2024

Conversation

psfinaki
Copy link
Member

@psfinaki psfinaki commented Aug 8, 2024

Fixes: #12636
Fixes: #13328

Part one of implementing PGO in F# - this copying the restores MIBC files to the resulting NuGet packages.

The result looks like this:
image

@psfinaki psfinaki requested a review from a team as a code owner August 8, 2024 15:30
Copy link
Contributor

github-actions bot commented Aug 8, 2024

✅ No release notes required

@psfinaki
Copy link
Member Author

psfinaki commented Aug 9, 2024

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@psfinaki psfinaki requested a review from a team as a code owner August 9, 2024 13:25
@vzarytovskii vzarytovskii self-assigned this Aug 9, 2024
Copy link
Member

@vzarytovskii vzarytovskii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna block it to not forget to review on Monday

src/fsc/fsc.targets Outdated Show resolved Hide resolved
src/Directory.Build.props Outdated Show resolved Hide resolved
Copy link
Member

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to deploy all of the packages to the SDK. Size is not that big a deal.

src/Directory.Build.props Outdated Show resolved Hide resolved
src/fsc/fsc.targets Outdated Show resolved Hide resolved
@vzarytovskii
Copy link
Member

I pushed a fix which

  1. Produces compiler package packed with profiles
    image
  2. Applies it to proto.

All things are in place, thing left to do:

  1. Make sure it really applies r2r when building proto fsc
  2. When new artifacts arrive to dotnet/sdk, do the same there.

@vzarytovskii
Copy link
Member

There are issues with locking files. I suggest to copy initially to two different paths - mibc and mibc_proto or something. And apply to proto from mibc_proto, and copy to nuget from the other one.

@vzarytovskii
Copy link
Member

vzarytovskii commented Aug 12, 2024

Fixed (probably) fixed one part, I believe you'll figure out how to retry and or not lock it.

@psfinaki
Copy link
Member Author

Fixed (probably) fixed one part, I believe you'll figure out how to retry and or not lock it.

Sure let me try something.

@vzarytovskii
Copy link
Member

After restore, it seems that files are getting locked:

Directory.Build.targets(28,5): error MSB3026: (NETCORE_ENGINEERING_TELEMETRY=Build) Could not copy "D:\a\_work\1\s\.packages\optimization.windows_nt-x86.mibc.runtime\1.0.0-prerelease.23614.4\data\DotNet_FSharp.mibc" to "D:\a\_work\1\s\artifacts\\mibc\optimization.windows_nt-arm64.mibc.runtime\DotNet_FSharp.mibc". Beginning retry 1 in 1000ms. The process cannot access the file 'D:\a\_work\1\s\artifacts\\mibc\optimization.windows_nt-arm64.mibc.runtime\DotNet_FSharp.mibc' because it is being used by another process. 

Maybe @baronfel and/or @rainersigwald have some advise here?

@vzarytovskii
Copy link
Member

Well, worst case scenario, we can just slap Retries="1000" on Copy and hope that nuget (or whatever holds those files after restore) will release them.

@rainersigwald
Copy link
Member

Putting this in Directory.Build.targets means it'll run in every individual project, and it's copying to the same location in all of them.

You just want this once/build, right? But "in any way the build could be triggered" is why you're putting it in D.b.targets?

@vzarytovskii
Copy link
Member

Putting this in Directory.Build.targets means it'll run in every individual project, and it's copying to the same location in all of them.

That's a good point, I haven't thought about it 🤦

You just want this once/build, right? But "in any way the build could be triggered" is why you're putting it in D.b.targets?

Yep, pretty much, we want it to happen once, no matter what we're building.

@rainersigwald
Copy link
Member

In that case what I'd do is this:

  1. Create a new .targets file that does only this copy stuff.
  2. Change the D.B.targets target to do an <MSBuild task call to that new file/target, with RemoveProperties="TargetFramework" (and maybe passing along some paths that Arcade/common.targets derives for you)

Then the MSBuild engine will deduplicate the request and do the copy operation only once.

@vzarytovskii
Copy link
Member

In that case what I'd do is this:

  1. Create a new .targets file that does only this copy stuff.
  2. Change the D.B.targets target to do an <MSBuild task call to that new file/target, with RemoveProperties="TargetFramework" (and maybe passing along some paths that Arcade/common.targets derives for you)

Then the MSBuild engine will deduplicate the request and do the copy operation only once.

Ooh, nice, thanks a tonne, Rainer, will try it out tomorrow!

@psfinaki
Copy link
Member Author

@KevinRansom @vzarytovskii this is finally green! 🍾

@psfinaki
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@KevinRansom KevinRansom merged commit 2f27f48 into dotnet:main Aug 26, 2024
30 checks passed
@psfinaki psfinaki deleted the pgo-4 branch August 26, 2024 17:41
@psfinaki
Copy link
Member Author

🍾 🍾 🍾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

dotnet fsi startup overhead surprisingly high Add mibc/profile for R2R FSC/FSI for faster startup
6 participants