-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/6.0] Fix ReadyToRun loading on Apple Silicon #64104
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. |
Changes in map and layout look good. Thanks! |
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.
LGTM but my experience with Apple Silicon is very limited, I'd feel more comfortable if JanV could take a look as well.
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.
LGTM! Thank you
The JIT\Directed\rvastatics\RVAOrderingTest is failing on both windows and x64 / arm64 Linux and OSX. |
I have tried running the |
Update: the same test also fails on @jkotas @trylek @VSadov @janvorli what is the best course of action for this particular PR? Is there anything more that is needed to get it merged? |
I have filled the request to get it approved for .NET 6 serving. Thank you for your help with this fix! |
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.
Thanks @jeffschwMSFT, as of right now we have no immediate plan to enable R2R in VS4Mac. cc @slluis FYI |
@kdubau unless the r2r is stripped from NetCoreApp you would benefit from this change as those packages have r2r enabled. |
@trylek are these crossgen2 failures related? Can we merge this? |
@safern I asked the same question. These failures are unrelated, we just ran more outerloops. It is good to merge. |
Thanks for confirming. |
Revert "[release/6.0] Fix ReadyToRun loading on Apple Silicon (#64104)"
Customer Impact
Slow startup of .NET applications on Apple Silicon. ReadyToRun images are not loaded correctly on Apple Silicon. All methods are JITed during startup.
For reference, compiling a medium-size project like ILGPU takes ~17s on a Mac Mini M1 before this change, and ~13s after this change (about 30% faster).
Testing
crossgen2 outerloop tests. Manually verified that the ReadyToRun images are loaded correctly on Apple Silicon.
Risk
Low risk. These fixes have been in dotnet/runtime:main for more than a month, however there is a risk of discovering latent Apple Silicon specific bugs in ReadyToRun with this fix.
Fixes #64103.
This PR aims at backporting a subset of the changes introduced in #61938 and #62855. The rationale behind this change is explained in more details in #64103. I believe that this change would be limited to
osx-arm64
and introduce a substantial performance gain by enabling ReadyToRun on Apple Silicon, which I imagine was supposed to work in .NET 6 in the first place.For reference, compiling a medium-size project like ILGPU takes ~17s on a Mac Mini M1 before this change, and ~13s after this change (about 30% faster). Given the focus on performance in .NET 6, I would argue that this has to be fixed in .NET 6.