Content-Length: 454181 | pFad | https://github.com/dotnet/runtime/pull/85133

0B Add options to optimize for size/speed by MichalStrehovsky · Pull Request #85133 · dotnet/runtime · GitHub
Skip to content

Add options to optimize for size/speed #85133

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

Merged
merged 3 commits into from
Apr 22, 2023

Conversation

MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Apr 21, 2023

Publicly exposing the undocumented switches, adding test legs.

Cc @dotnet/ilc-contrib @dotnet/jit-contrib

Publicly exposing the undocumented switches, adding test legs.
@ghost
Copy link

ghost commented Apr 21, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Publicly exposing the undocumented switches, adding test legs.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

@jkotas
Copy link
Member

jkotas commented Apr 21, 2023

This will need a matching PR in the docs repo.

@MichalStrehovsky
Copy link
Member Author

This will need a matching PR in the docs repo.

Typing it up as we speak :)

@MichalStrehovsky
Copy link
Member Author

Docs update: dotnet/docs#35092

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Comment on lines -40 to +41
* `<IlcOptimizationPreference>Speed</IlcOptimizationPreference>`: when generating optimized code, favor code execution speed.
* `<IlcOptimizationPreference>Size</IlcOptimizationPreference>`: when generating optimized code, favor smaller code size.
* `<OptimizationPreference>Speed</OptimizationPreference>`: when generating optimized code, favor code execution speed.
* `<OptimizationPreference>Size</OptimizationPreference>`: when generating optimized code, favor smaller code size.
Copy link
Member

Choose a reason for hiding this comment

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

Just a thought:

As the property can be set on a project level, it might look confusing to which tool the option is intended (and in which mode jit or aot). Would it make sense to add a Aot prefix to the property name, so the option becomes: AotOptimizationPreference instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was considered. I've forwarded you the email with discussion.

@MichalStrehovsky
Copy link
Member Author

This found a pre-existing issue in casting logic. I've activeissue'd it and not going to block this on that.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

I'm only slightly nervous about adding yet more extra-platforms legs
Have you considered replacing one of the existing runs for NativeAOT with one of these (or just run it with opt on).

@MichalStrehovsky
Copy link
Member Author

Have you considered replacing one of the existing runs for NativeAOT with one of these (or just run it with opt on).

I have, but it would be a test hole. It is already a test hole that we don't test any of this on e.g. Mac. We need to keep testing the mainline scenarios because the mainline matrix is already a compromise with holes. What we should consider is:

  • Separate test leg for NativeAOT testing. The fact that we run these consistently failing Mono test legs whenever we want to test NativeAOT is the main source of waste. I have not seen the Mono legs green in a year. I am also getting tired of digging through swathes of Mono leg failures just to find the one relevant Native AOT failure. The infra team doesn't optimize for this experience (and I'm not surprised they don't), but being in this "special class" makes build analysis worthless.
  • A weekly test leg for NativeAOT. We have a number of test holes already and the test holes are just growing. We need a leg that can tell us we're good for a release.

@akoeplinger
Copy link
Member

I'd recommend the first option, we have something similar with e.g. eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml which is available both as a standalone pipeline /azp run runtime-ioslike as well as included in the runtime-extra-platform.yml

@MichalPetryka
Copy link
Contributor

Should the default behaviour that happens when nothing is specified be also documented?

@MichalStrehovsky
Copy link
Member Author

Should the default behaviour that happens when nothing is specified be also documented?

It's documented in dotnet/docs#35092 (that's where docs are). Is there something you'd like to see changed?

@ghost ghost locked as resolved and limited conversation to collaborators May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/dotnet/runtime/pull/85133

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy